[Freeswitch-users] bridging 2 call legs after a conference

Tihomir Culjaga tculjaga at gmail.com
Mon May 27 18:13:44 MSD 2013


hello folks,


im controlling FS via ESL and what im trying to do is  to make a 3-way
conference and this works fine. What i have an issue with is when one
conference member hangs up, i want to return back to a normal bridge
between the 2 remaining members ...

so what im doing is:

On Incoming call from 1013 to FS
answer the call:
["sendmsg 00349e91-117e-4dcc-b2db-45d3a54c5fee","call-command:
execute","execute-app-name: answer"])

play an announcement to A leg:
CMD uuid_broadcast "bgapi uuid_broadcast
00349e91-117e-4dcc-b2db-45d3a54c5fee 'greeting1.wav'"


originate a new call and parks it:
CMD originate "bgapi originate
{origination_uuid=fc3e44c5-63af-45bb-8a8e-8a35bac52234,ignore_early_media=false,originate_timeout=15}user/1002
&park"


bridge these 2 legs into a call:
CMD uuid_bridge "bgapi uuid_bridge fc3e44c5-63af-45bb-8a8e-8a35bac52234
00349e91-117e-4dcc-b2db-45d3a54c5fee"



originate a 2nd new call into a conference:
CMD originate "bgapi originate
{origination_uuid=3f516dc9-61a8-4c36-97f0-ea7ac18c6b9f,ignore_early_media=false,originate_timeout=0}user/1014
&conference(supervizor36 at silent+flags{mute}) &park"


join the 1st new call (user/1002)
CMD_MULTI conference ["sendmsg
fc3e44c5-63af-45bb-8a8e-8a35bac52234","call-command:
execute","execute-app-name: conference","execute-app-arg:
supervizor36 at silent"]

join incoming call into the same conference
CMD_MULTI conference ["sendmsg
00349e91-117e-4dcc-b2db-45d3a54c5fee","call-command:
execute","execute-app-name: conference","execute-app-arg:
supervizor36 at silent"]


unmute uuid=fc3e44c5-63af-45bb-8a8e-8a35bac52234
CMD api "api conference supervizor36 unmute 20"


Incoming call 00349e91-117e-4dcc-b2db-45d3a54c5fee must not hear
uuid=fc3e44c5-63af-45bb-8a8e-8a35bac52234
CMD api "api conference supervizor36 relate 21 20 nohear"


so far its great!

now, call uuid=3f516dc9-61a8-4c36-97f0-ea7ac18c6b9f (the one originated
into the conference) hangs up, 2 remaining calls (incoming call and 1st
originated calls) can still hear each others... but i want to get rid of a
conference since there are just 2 members hence no sense keeping the
conference up...

so i do:
bridge the two remaining conference members together
CMD uuid_bridge "bgapi uuid_bridge fc3e44c5-63af-45bb-8a8e-8a35bac52234
00349e91-117e-4dcc-b2db-45d3a54c5fee"

and i get no audio!!



looks like FS setting both channels on park ??

any idea ?



   1. 2013-05-27 15:34:13.724037 [NOTICE] switch_core_session.c:1367
    Session 30 (sofia/internal/sip:1014 at 192.168.254.112:5060) Ended
   2. 2013-05-27 15:34:13.724037 [NOTICE] switch_core_session.c:1369 Close
   Channel sofia/internal/sip:1014 at 192.168.254.112:5060 [CS_DESTROY]
   3. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_state_machine.c:491 (
   sofia/internal/sip:1014 at 192.168.254.112:5060) Callstate Change HANGUP ->
   DOWN
   4. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_state_machine.c:494 (
   sofia/internal/sip:1014 at 192.168.254.112:5060) Running State Change
   CS_DESTROY
   5. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_state_machine.c:504 (
   sofia/internal/sip:1014 at 192.168.254.112:5060) State DESTROY
   6. 2013-05-27 15:34:13.724037 [DEBUG] mod_sofia.c:363 sofia/internal/sip:
   1014 at 192.168.254.112:5060 SOFIA DESTROY
   7. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_state_machine.c:86
    sofia/internal/sip:1014 at 192.168.254.112:5060 Standard DESTROY
   8. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_state_machine.c:504 (
   sofia/internal/sip:1014 at 192.168.254.112:5060) State DESTROY going to
   sleep
   9.
   2013-05-27 15:34:13.724037 [DEBUG] switch_ivr_bridge.c:1521 (sofia/internal/
   sip:1002 at 192.168.254.116:5060) State Change CS_SOFT_EXECUTE ->
   CS_HIBERNATE
   10. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_session.c:1175 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   11. 2013-05-27 15:34:13.724037 [DEBUG] switch_ivr_bridge.c:1523 (
   sofia/external/1013 at 192.168.254.93) State Change CS_EXCHANGE_MEDIA ->
   CS_HIBERNATE
   12. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_session.c:1175 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   13. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_session.c:786 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   14. 2013-05-27 15:34:13.724037 [DEBUG] switch_core_session.c:786 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   15. 2013-05-27 15:34:13.744036 [DEBUG] mod_conference.c:2899 Channel
   leaving conference, cause: NONE
   16. 2013-05-27 15:34:13.744036 [DEBUG] mod_conference.c:2899 Channel
   leaving conference, cause: NONE
   17. 2013-05-27 15:34:13.744036 [DEBUG] switch_core_session.c:724 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   18. 2013-05-27 15:34:13.744036 [DEBUG] switch_core_codec.c:141
    sofia/internal/sip:1002 at 192.168.254.116:5060 Restore previous codec
   PCMA:8.
   19. 2013-05-27 15:34:13.744036 [DEBUG] switch_core_session.c:724 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   20. 2013-05-27 15:34:13.744036 [DEBUG] switch_ivr_bridge.c:329 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   21. 2013-05-27 15:34:13.744036 [DEBUG] switch_core_session.c:724 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   22. 2013-05-27 15:34:13.744036 [DEBUG] switch_core_codec.c:141
    sofia/external/1013 at 192.168.254.93 Restore previous codec PCMA:8.
   23. 2013-05-27 15:34:13.744036 [DEBUG] switch_core_session.c:724 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   24. 2013-05-27 15:34:13.744036 [DEBUG] switch_ivr_bridge.c:329 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   25. 2013-05-27 15:34:13.764036 [DEBUG] mod_conference.c:1602 Write Lock
   ON
   26. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:586 BRIDGE
   THREAD DONE [sofia/internal/sip:1002 at 192.168.254.116:5060]
   27. 2013-05-27 15:34:13.764036 [DEBUG] mod_conference.c:1605 Write Lock
   OFF
   28. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:606 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   29. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:724 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   30. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:724 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   31. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:1366 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) State Change CS_HIBERNATE
   -> CS_RESET
   32. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:1175 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   33.
   2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:423
(sofia/internal/
   sip:1002 at 192.168.254.116:5060) State SOFT_EXECUTE going to sleep
   34. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:362 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) Running State Change
   CS_RESET
   35. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:413 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) State RESET
   36. 2013-05-27 15:34:13.764036 [DEBUG] mod_sofia.c:166
    sofia/internal/sip:1002 at 192.168.254.116:5060 SOFIA RESET
   37. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:721
    sofia/internal/sip:1002 at 192.168.254.116:5060 CUSTOM RESET
   38. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:728 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) State Change CS_RESET ->
   CS_SOFT_EXECUTE
   39. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:1175 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   40. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:413 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) State RESET going to sleep
   41. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:362 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) Running State Change
   CS_SOFT_EXECUTE
   42. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:423 (
   sofia/internal/sip:1002 at 192.168.254.116:5060) State SOFT_EXECUTE
   43. 2013-05-27 15:34:13.764036 [DEBUG] mod_sofia.c:572 SOFIA SOFT_EXECUTE
   44. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:746
    sofia/internal/sip:1002 at 192.168.254.116:5060 CUSTOM SOFT_EXECUTE
   45. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:586 BRIDGE
   THREAD DONE [sofia/external/1013 at 192.168.254.93]
   46. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:606 Send
   signal sofia/internal/sip:1002 at 192.168.254.116:5060 [BREAK]
   47. 2013-05-27 15:34:13.764036 [DEBUG] switch_ivr.c:2422 (sofia/external/
   1013 at 192.168.254.93) State Change CS_HIBERNATE -> CS_PARK
   48. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:1175 Send
   signal sofia/external/1013 at 192.168.254.93 [BREAK]
   49. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:420 (
   sofia/external/1013 at 192.168.254.93) State EXCHANGE_MEDIA going to sleep
   50. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:362 (
   sofia/external/1013 at 192.168.254.93) Running State Change CS_PARK
   51. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:426 (
   sofia/external/1013 at 192.168.254.93) State PARK
   52. 2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:247
    sofia/external/1013 at 192.168.254.93 Standard PARK
   53.
   54.
   55.
   56. freeswitch at internal> 2013-05-27 15:34:18.457165 [WARNING]
    sofia_reg.c:1400 SIP auth challenge (REGISTER) on sofia profile
   'internal' for [1014 at 192.168.254.93]from ip 192.168.254.112
   57.
   58. freeswitch at internal>
   59. freeswitch at internal>
   60. freeswitch at internal> show calls
   61.
   uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid,hostname,sent_callee_name,sent_callee_num,b_uuid,b_direction,b_created,b_created_epoch,b_name,b_state,b_cid_name,b_cid_num,b_ip_addr,b_dest,b_presence_id,b_presence_data,b_callstate,b_callee_name,b_callee_num,b_callee_direction,b_sent_callee_name,b_sent_callee_num,call_created_epoch
   62. 00349e91-117e-4dcc-b2db-45d3a54c5fee,inbound,2013-05-2715:32:49,
   1369661569,sofia/external/1013 at 192.168.254.93,CS_PARK,1013,1013,192.168
   .254.112,38515494471,,,ACTIVE,,,SEND,00349e91-117e-4dcc-b2db-45d3a54c5fee,cc01,Outbound
   Call,1002,,,,,,,,,,,,,,,,,,,
   63. fc3e44c5-63af-45bb-8a8e-8a35bac52234,outbound,2013-05-27 15:33:05,
   1369661585,sofia/internal/sip:1002 at 192.168.254.116:5060,CS_SOFT_EXECUTE,Outbound
   Call,1002,,1002,1002 at 192.168.254.93
   ,,ACTIVE,,,SEND,fc3e44c5-63af-45bb-8a8e-8a35bac52234,cc01,1013,1013
   ,,,,,,,,,,,,,,,,,,,
   64.
   65. 2 total.
   66.
   67. freeswitch at internal> show channels
   68.
   uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,read_bit_rate,write_codec,write_rate,write_bit_rate,secure,hostname,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid,sent_callee_name,sent_callee_num
   69. 00349e91-117e-4dcc-b2db-45d3a54c5fee,inbound,2013-05-2715:32:49,
   1369661569,sofia/external/1013 at 192.168.254.93,CS_PARK,1013,1013,192.168
   .254.112,38515494471,conference,supervizor36 at silent,XML,default,PCMA,8000
   ,64000,PCMA,8000,64000,,cc01,,,ACTIVE,,,SEND,00349e91-117e-4dcc-b2db-45d3a54c5fee,Outbound
   Call,1002
   70. fc3e44c5-63af-45bb-8a8e-8a35bac52234,outbound,2013-05-27 15:33:05,
   1369661585,sofia/internal/sip:1002 at 192.168.254.116:5060,CS_SOFT_EXECUTE,Outbound
   Call,1002,,1002,conference,supervizor36 at silent,,default,PCMA,8000,64000
   ,PCMA,8000,64000,,cc01,1002 at 192.168.254.93
   ,,ACTIVE,,,SEND,fc3e44c5-63af-45bb-8a8e-8a35bac52234,1013,1013
   71.
   72. 2 total.
   73.
   74. freeswitch at internal>
   75. freeswitch at internal>
   76. freeswitch at internal>
   77. freeswitch at internal> 2013-05-27 15:34:57.732290 [DEBUG]
    switch_core_session.c:870 Send signal sofia/internal/sip:1002 at 192.168
   .254.116:5060 [BREAK]





Tihomir.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130527/b87f1cca/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list