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

Dave R. Kompel drk at drkngs.net
Mon May 27 20:31:56 MSD 2013


Getting the calls parked is the right way, but there is an easier way to do it. The two legs that you want to remain in the call after the conference bridge, you can just uuid_transfer them both to park as an inline dialplan right in the transfer, then you're free to do the uuid_bridge.  
   
The variable "park_after_bridge" is used in the core by switch_ivr_bridge() funciton. It really only applies to a call that's been bridged via that function, which would not apply in all cases. For example if you called conference form the dialplan, or some other dp app that doesn't use "switch_ivr_bridge". It also checks the variable on terminating the bridge. This allows you to set the variable after the fact, while the channel is bridged.  
   
However, since the call may of not started out bridged, the park_after_bridge will not have any meaning. So just to be safe, and not have to track every call via ESL, to know how it got to the state, I would do a "uuid_transfer <uuid> park inline" to each channel you want to remove from the conference, and then you can do the "uuid_bridge".  
   
--Dave
      _____  

  From: Tihomir Culjaga [mailto:tculjaga at gmail.com]
To: FreeSWITCH Users Help [mailto:freeswitch-users at lists.freeswitch.org]
Sent: Mon, 27 May 2013 08:21:02 -0700
Subject: Re: [Freeswitch-users] bridging 2 call legs after a conference

  
ya, i have park_after_bridge=true on the incoming call leg :=) ... thats why it goes on park after leaving the conference...  

  
never thought park_after_bridge affects conference as well ... :)  

  
thanks anyway.  

  
T.   


  
On Mon, May 27, 2013 at 4:13 PM, Tihomir Culjaga <tculjaga at gmail.com> wrote:
    
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 ?  

  

  
  
  
*   
  
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  
*   
  
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]  
*   
  
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  
*   
  
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  
*   
  
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  
*   
  
2013-05-27 15:34:13.724037 [DEBUG] mod_sofia.c:363 sofia/internal/sip:1014 at 192.168.254.112:5060 SOFIA DESTROY  
*   
  
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  
*   
  
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  
*   
  
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  
*   
  
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]  
*   
  
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  
*   
  
2013-05-27 15:34:13.724037 [DEBUG] switch_core_session.c:1175 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
2013-05-27 15:34:13.724037 [DEBUG] switch_core_session.c:786 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
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]  
*   
  
2013-05-27 15:34:13.744036 [DEBUG] mod_conference.c:2899 Channel leaving conference, cause: NONE  
*   
  
2013-05-27 15:34:13.744036 [DEBUG] mod_conference.c:2899 Channel leaving conference, cause: NONE  
*   
  
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]  
*   
  
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.  
*   
  
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]  
*   
  
2013-05-27 15:34:13.744036 [DEBUG] switch_ivr_bridge.c:329 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
2013-05-27 15:34:13.744036 [DEBUG] switch_core_session.c:724 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
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.  
*   
  
2013-05-27 15:34:13.744036 [DEBUG] switch_core_session.c:724 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
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]  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] mod_conference.c:1602 Write Lock ON  
*   
  
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]  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] mod_conference.c:1605 Write Lock OFF  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:606 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:724 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
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]  
*   
  
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  
*   
  
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]  
*   
  
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  
*   
  
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  
*   
  
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  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] mod_sofia.c:166 sofia/internal/sip:1002 at 192.168.254.116:5060 SOFIA RESET  
*   
  
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  
*   
  
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  
*   
  
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]  
*   
  
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  
*   
  
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  
*   
  
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  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] mod_sofia.c:572 SOFIA SOFT_EXECUTE  
*   
  
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  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] switch_ivr_bridge.c:586 BRIDGE THREAD DONE [sofia/external/1013 at 192.168.254.93]  
*   
  
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]  
*   
  
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  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] switch_core_session.c:1175 Send signal sofia/external/1013 at 192.168.254.93 [BREAK]  
*   
  
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  
*   
  
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  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:426 (sofia/external/1013 at 192.168.254.93) State PARK  
*   
  
2013-05-27 15:34:13.764036 [DEBUG] switch_core_state_machine.c:247 sofia/external/1013 at 192.168.254.93 Standard PARK  
*   

  
*   

  
*   
   
*   
  
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  
*   
   
*   
freeswitch at internal>  
*   
freeswitch at internal>  
*   
freeswitch at internal> show calls  
*   
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  
*   
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,,,,,,,,,,,,,,,,,,,  
*   
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,,,,,,,,,,,,,,,,,,,  
*   
   
*   
2 total.  
*   
   
*   
freeswitch at internal> show channels  
*   
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  
*   
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  
*   
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  
*   
   
*   
2 total.  
*   
   
*   
freeswitch at internal>  
*   
freeswitch at internal>  
*   
freeswitch at internal>  
*   
  
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/3114c1e1/attachment-0001.html 


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