Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
562f8c8a
Commit
562f8c8a
authored
3 years ago
by
Olivier Dion
Browse files
Options
Downloads
Patches
Plain Diff
agent/examples: Fix examples
Change-Id: Idf54e78391eb77c7964c6650b6f70df71b8eac3a
parent
914a8ec5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/agent/examples/active-agent.scm
+16
-10
16 additions, 10 deletions
test/agent/examples/active-agent.scm
test/agent/examples/passive-agent.scm
+10
-8
10 additions, 8 deletions
test/agent/examples/passive-agent.scm
with
26 additions
and
18 deletions
test/agent/examples/active-agent.scm
+
16
−
10
View file @
562f8c8a
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
(
success
#f
)
(
success
#f
)
(
over
#f
))
(
over
#f
))
(
jami:on-signal
'
call-
state-changed
(
jami:on-signal
'state-changed
(
lambda
(
call-id
state
code
)
(
lambda
(
call-id
state
code
)
(
with-mutex
mtx
(
with-mutex
mtx
(
let
((
ret
(
cond
(
let
((
ret
(
cond
...
@@ -52,12 +52,18 @@
...
@@ -52,12 +52,18 @@
(
agent:ensure-account
)
(
agent:ensure-account
)
(
while
#t
(
let
((
account
(
fluid-ref
agent:account-id
))
(
begin
(
peer
"FIXME"
))
(
make-a-call
agent:account-id
"bcebc2f134fc15eb06c64366c1882de2e0f1e54f"
)
(
jami:info
"Disabling account"
)
(
when
(
string=
peer
"FIXME"
)
(
account:send-register
agent:account-id
#f
)
(
throw
'bad-peer
(
sleep
30
)
"Peer was not set! Please set variable `peer` to a valid Jami's ID"
))
(
jami:info
"Enabling account"
)
(
while
#t
(
account:send-register
agent:account-id
#t
)
(
begin
(
sleep
30
)))
(
make-a-call
account
peer
)
(
jami:info
"Disabling account"
)
(
account:send-register
account
#f
)
(
sleep
30
)
(
jami:info
"Enabling account"
)
(
account:send-register
account
#t
)
(
sleep
30
))))
This diff is collapsed.
Click to expand it.
test/agent/examples/passive-agent.scm
+
10
−
8
View file @
562f8c8a
...
@@ -10,11 +10,13 @@
...
@@ -10,11 +10,13 @@
(
agent:ensure-account
)
(
agent:ensure-account
)
(
jami:on-signal
'incomming-call
(
jami:info
"Agent peer-id: ~a"
(
fluid-ref
agent:peer-id
))
(
lambda
(
account-id
call-id
peer-display-name
media-list
)
(
when
(
string=
account-id
agent:account-id
)
(
let
((
account
(
fluid-ref
agent:account-id
)))
(
jami:info
(
jami:on-signal
'incoming-call/media
"Incoming [call:~a] from peer ~a~%"
(
lambda
(
account-id
call-id
peer
media-lst
)
call-id
peer-display-name
)
(
when
(
string=
account-id
account
)
(
call:accept
call-id
media-list
))
(
jami:info
"Incoming [call:~a] from peer ~a~%"
call-id
peer
)
#t
))
(
call:accept
call-id
media-lst
))
#t
)))
(
while
#t
(
pause
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment