<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Freeswitch-users] How to bridge a call to an extension defined in dialplan</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I tried {} notation before but not tried "export". Now I tried both "export" and {} notation.<BR>
but still got the same problem.<BR>
<BR>
I will look at bypass_media_after_bridge as well.<BR>
<BR>
Thanks,<BR>
Xing<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Michael Collins<BR>
Sent: Mon 2/27/2012 22:27<BR>
To: FreeSWITCH Users Help<BR>
Subject: Re: [Freeswitch-users] How to bridge a call to an extension defined in dialplan<BR>
<BR>
I saw one other issue with your dialplan: replace all those "set" apps that<BR>
occur before the "bridge" with "export" or use the {} notation to specify<BR>
them in the dialstring:<BR>
<BR>
<action application="export" data="call_timeout=30"/><BR>
<action application="export" data="hangup_after_bridge=false"/><BR>
<action application="export" data="bypass_media=true"/><BR>
<action application="export" data="ignore_early_media=true"/><BR>
<BR>
or remove all the above lines and just do this for your bridge line:<BR>
<BR>
<action application="bridge"<BR>
data="{call_timeout=30,hangup_after_bridge=false,bypass_media=true,ignore_early_media=true}sofia/internal/1003%${sip_profile},loopback/74991"/><BR>
<BR>
Also, you may want to use this instead of bypass_media:<BR>
<BR>
<A HREF="http://wiki.freeswitch.org/wiki/Channel_Variables#bypass_media_after_bridge">http://wiki.freeswitch.org/wiki/Channel_Variables#bypass_media_after_bridge</A><BR>
<BR>
Give that a try and let us know how it goes.<BR>
-MC<BR>
<BR>
On Mon, Feb 27, 2012 at 1:51 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:<BR>
<BR>
> **<BR>
><BR>
> Hi Michael,<BR>
><BR>
> Thanks for your suggestion!<BR>
><BR>
> I tried your suggestion. I saw the softphone(extension 1003) immediately<BR>
> hung up after it was reached,<BR>
> the I heard "bye" and the extension 74991 hung up.<BR>
><BR>
> I copied the terminal and my dialplan for extension 74991 below:<BR>
><BR>
> <extension name="testRecordingOnly2_bridge"><BR>
> <condition field="destination_number" expression="^(74995)$"><BR>
> <action application="set" data="call_timeout=30"/><BR>
> <action application="set" data="hangup_after_bridge=false"/><BR>
> <action application="set" data="bypass_media=true"/><BR>
> <action application="set" data="ignore_early_media=true"/><BR>
> <action application="bridge"<BR>
> data="sofia/internal/1003%${sip_profile},loopback/74991"/><BR>
> </condition><BR>
> </extension><BR>
> <extension name="testRecordingOnly2"><BR>
> <condition field="destination_number" expression="^(74991)$"><BR>
> <action application="answer"/><BR>
> <action application="set" data="RECORD_TITLE=Recording<BR>
> ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/><BR>
> <action application="set" data="RECORD_COPYRIGHT=(c) 1980 Factory<BR>
> Records, Inc."/><BR>
> <action application="set" data="RECORD_SOFTWARE=FreeSWITCH"/><BR>
> <action application="set" data="RECORD_ARTIST=Ian Curtis"/><BR>
> <action application="set" data="RECORD_COMMENT=Love will tear us<BR>
> apart"/><BR>
> <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d<BR>
> %H:%M)}"/><BR>
> <action application="set" data="RECORD_STEREO=true"/><BR>
> <action application="set" data="record_waste_resources=true"/><BR>
> <action application="set" data="tts_engine=flite"/><BR>
> <action application="set" data="tts_voice=rms"/><BR>
> <action application="speak" data="please say something to start<BR>
> recording."/><BR>
> <action application="set" data="ignore_early_media=true"/><BR>
> <action application="log" data="XX-BaseDir $${base_dir}"/><BR>
> <action application="record"<BR>
> data="$${base_dir}/testRecording/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav<BR>
> 120 200"/><BR>
> </condition><BR>
> </extension><BR>
><BR>
> -----------------------------------------------<BR>
> 2012-02-27 21:41:29.004622 [INFO] switch_time.c:423 Clock synchronized to<BR>
> system time.<BR>
> 2012-02-27 21:41:50.788883 [NOTICE] switch_channel.c:920 New Channel<BR>
> sofia/external/07875086426@sipgate.co.uk[db748000-618b-11e1-9bae-07e90bb2f0c8]<BR>
> 2012-02-27 21:41:50.788883 [INFO] mod_dialplan_xml.c:481 Processing<BR>
> 07875086426 <07875086426>->74995 in context public<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel<BR>
> sofia/internal/1003 [db7641f6-618b-11e1-9bb2-07e90bb2f0c8]<BR>
> 2012-02-27 21:41:50.809112 [INFO] mod_loopback.c:885 Sending early media<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] mod_sofia.c:2521 Pre-Answer<BR>
> sofia/external/07875086426@sipgate.co.uk!<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel<BR>
> loopback/7499611-a [db777864-618b-11e1-9bb7-07e90bb2f0c8]<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:918 Rename Channel<BR>
> loopback/7499611-a->loopback/7499611-a<BR>
> [db777864-618b-11e1-9bb7-07e90bb2f0c8]<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel<BR>
> loopback/7499611-b [db778ffc-618b-11e1-9bbb-07e90bb2f0c8]<BR>
> 2012-02-27 21:41:50.809112 [INFO] mod_dialplan_xml.c:481 Processing<BR>
> 07875086426 <07875086426>->7499611 in context public<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] mod_loopback.c:755 Channel<BR>
> [loopback/7499611-a] has been answered<BR>
> 2012-02-27 21:41:50.809112 [NOTICE] mod_dptools.c:1117 Channel<BR>
> [loopback/7499611-b] has been answered<BR>
> 2012-02-27 21:41:50.833830 [NOTICE] switch_ivr_originate.c:3182 Hangup<BR>
> sofia/internal/1003 [CS_CONSUME_MEDIA] [LOSE_RACE]<BR>
> 2012-02-27 21:41:50.833830 [NOTICE] switch_ivr_originate.c:3209 Channel<BR>
> [sofia/external/07875086426@sipgate.co.uk] has been answered<BR>
> 2012-02-27 21:41:50.833830 [NOTICE] switch_core_session.c:1395 Session 2<BR>
> (sofia/internal/1003) Ended<BR>
> 2012-02-27 21:41:50.833830 [NOTICE] switch_core_session.c:1397 Close<BR>
> Channel sofia/internal/1003 [CS_DESTROY]<BR>
> 2012-02-27 21:42:08.288866 [NOTICE] switch_core_state_machine.c:226<BR>
> loopback/7499611-b has executed the last dialplan instruction, hanging up.<BR>
> 2012-02-27 21:42:08.288866 [NOTICE] switch_core_state_machine.c:228 Hangup<BR>
> loopback/7499611-b [CS_EXECUTE] [NORMAL_CLEARING]<BR>
> 2012-02-27 21:42:08.288866 [NOTICE] mod_loopback.c:438 Hangup<BR>
> loopback/7499611-a [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_state_machine.c:226<BR>
> sofia/external/07875086426@sipgate.co.uk has executed the last dialplan<BR>
> instruction, hanging up.<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_state_machine.c:228 Hangup<BR>
> sofia/external/07875086426@sipgate.co.uk [CS_EXECUTE] [NORMAL_CLEARING]<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 4<BR>
> (loopback/7499611-b) Ended<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close<BR>
> Channel loopback/7499611-b [CS_DESTROY]<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 3<BR>
> (loopback/7499611-a) Ended<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close<BR>
> Channel loopback/7499611-a [CS_DESTROY]<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 1<BR>
> (sofia/external/07875086426@sipgate.co.uk) Ended<BR>
> 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close<BR>
> Channel sofia/external/07875086426@sipgate.co.uk [CS_DESTROY]<BR>
><BR>
> --------------------------------------------------<BR>
><BR>
> -----Original Message-----<BR>
> From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Michael<BR>
> Collins<BR>
> Sent: Mon 2/27/2012 19:59<BR>
> To: FreeSWITCH Users Help<BR>
> Subject: Re: [Freeswitch-users] How to bridge a call to an extension<BR>
> defined in dialplan<BR>
><BR>
> How about this for your bridge line:<BR>
><BR>
> <action application="bridge"<BR>
> data="sofia/internal/1003%${sip_profile},loopback/74991"/><BR>
><BR>
> -MC<BR>
><BR>
> On Sun, Feb 26, 2012 at 2:29 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:<BR>
><BR>
> > **<BR>
> ><BR>
> > Hello,<BR>
> ><BR>
> > I'd like to bridge an incoming to two endpoints simultaneuously:<BR>
> > one is a softphone which is registered to FS (to user 1003),<BR>
> > another is just an extension which is defined in conf/dialplan/public.xml<BR>
> ><BR>
> > It looks like:<BR>
> ><BR>
> > <extension name="testRecording_bridge"><BR>
> > <condition field="destination_number" expression="^(74990)$"><BR>
> > <action application="bridge"<BR>
> ><BR>
> data="sofia/internal/1003%${sip_profile},sofia/internal/74991%${sip_profile}"/><BR>
> > </condition><BR>
> > </extension><BR>
> ><BR>
> > <extension name="testRecordingOnly"><BR>
> > <condition field="destination_number" expression="^74991$"><BR>
> > <action application="set" data="record_waste_resources=true"/><BR>
> > <action application="javascript" data="testRecordFile.js"/><BR>
> > </condition><BR>
> > </extension><BR>
> ><BR>
> > The incoming call dial to extension 74990, from there I want to bridge<BR>
> the<BR>
> > call to the sofphone at 1003 and<BR>
> > to the extension 74991.<BR>
> ><BR>
> > The problem is that FS can not locate user 74991. So my question is what<BR>
> > else I need to modify in order<BR>
> > to bridge the call also to extension 74991 at the same time?<BR>
> ><BR>
> > I did lots of Googling, checked the wiki and tried various ways but still<BR>
> > without success.<BR>
> ><BR>
> > Any advices please?<BR>
> ><BR>
> > Many Thanks!<BR>
> > Xing<BR>
> ><BR>
> > ------------------------------<BR>
> ><BR>
> > *Heriot-Watt University is the Sunday Times Scottish University of the<BR>
> > Year 2011-2012.*<BR>
> ><BR>
> > Heriot-Watt University is a Scottish charity registered under charity<BR>
> > number SC000278.<BR>
> ><BR>
> > _________________________________________________________________________<BR>
> > Professional FreeSWITCH Consulting Services:<BR>
> > consulting@freeswitch.org<BR>
> > <A HREF="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</A><BR>
> ><BR>
> > FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR>
> > <A HREF="http://www.cudatel.com">http://www.cudatel.com</A><BR>
> ><BR>
> > Official FreeSWITCH Sites<BR>
> > <A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A><BR>
> > <A HREF="http://wiki.freeswitch.org">http://wiki.freeswitch.org</A><BR>
> > <A HREF="http://www.cluecon.com">http://www.cluecon.com</A><BR>
> ><BR>
> > FreeSWITCH-users mailing list<BR>
> > FreeSWITCH-users@lists.freeswitch.org<BR>
> > <A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>
> > UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR>
> > <A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A><BR>
> ><BR>
> ><BR>
><BR>
><BR>
> ------------------------------<BR>
><BR>
> *Heriot-Watt University is the Sunday Times Scottish University of the<BR>
> Year 2011-2012.*<BR>
><BR>
> Heriot-Watt University is a Scottish charity registered under charity<BR>
> number SC000278.<BR>
><BR>
> _________________________________________________________________________<BR>
> Professional FreeSWITCH Consulting Services:<BR>
> consulting@freeswitch.org<BR>
> <A HREF="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</A><BR>
><BR>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR>
> <A HREF="http://www.cudatel.com">http://www.cudatel.com</A><BR>
><BR>
> Official FreeSWITCH Sites<BR>
> <A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A><BR>
> <A HREF="http://wiki.freeswitch.org">http://wiki.freeswitch.org</A><BR>
> <A HREF="http://www.cluecon.com">http://www.cluecon.com</A><BR>
><BR>
> FreeSWITCH-users mailing list<BR>
> FreeSWITCH-users@lists.freeswitch.org<BR>
> <A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>
> UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR>
> <A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A><BR>
><BR>
><BR>
<BR>
</FONT>
</P>
<br>
<hr>
<br>
<font face="arial, helvetica">
<b>Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.</b>
</font>
<br><br>
<font face="arial,helvetica" size="-1">
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
<br>
</font>
</BODY>
</HTML>