I saw one other issue with your dialplan: replace all those "set" apps that occur before the "bridge" with "export" or use the {} notation to specify them in the dialstring:<br><br><font> <action application="export" data="call_timeout=30"/><br>
<action application="export" data="hangup_after_bridge=false"/></font><br><font> <action application="export" data="bypass_media=true"/><br>
<action application="export" data="ignore_early_media=true"/></font><br><br>or remove all the above lines and just do this for your bridge line:<br><br><font> <action application="bridge" data="{call_timeout=30,hangup_after_bridge=false,bypass_media=true,ignore_early_media=true}sofia/internal/1003%${sip_profile},loopback/74991"/></font><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><div class="gmail_quote">On Mon, Feb 27, 2012 at 1:51 PM, Liu, Xingkun <span dir="ltr"><<a href="mailto:X.Liu@hw.ac.uk">X.Liu@hw.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<p><font>Hi Michael,<br>
<br>
Thanks for your suggestion!<br>
<br>
I tried your suggestion. I saw the softphone(extension 1003) immediately 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" 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 ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/><br>
<action application="set" data="RECORD_COPYRIGHT=(c) 1980 Factory 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 apart"/><br>
<action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %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 recording."/><br>
<action application="set" data="ignore_early_media=true"/><br>
<action application="log" data="XX-BaseDir $${base_dir}"/><br>
<action application="record" data="$${base_dir}/testRecording/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav 120 200"/><br>
</condition><br>
</extension><br>
<br>
-----------------------------------------------<br>
2012-02-27 21:41:29.004622 [INFO] switch_time.c:423 Clock synchronized to system time.<br>
2012-02-27 21:41:50.788883 [NOTICE] switch_channel.c:920 New Channel sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> [db748000-618b-11e1-9bae-07e90bb2f0c8]<br>
2012-02-27 21:41:50.788883 [INFO] mod_dialplan_xml.c:481 Processing 07875086426 <07875086426>->74995 in context public<br>
2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel 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 sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>!<br>
2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel loopback/7499611-a [db777864-618b-11e1-9bb7-07e90bb2f0c8]<br>
2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:918 Rename Channel loopback/7499611-a->loopback/7499611-a [db777864-618b-11e1-9bb7-07e90bb2f0c8]<br>
2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel loopback/7499611-b [db778ffc-618b-11e1-9bbb-07e90bb2f0c8]<br>
2012-02-27 21:41:50.809112 [INFO] mod_dialplan_xml.c:481 Processing 07875086426 <07875086426>->7499611 in context public<br>
2012-02-27 21:41:50.809112 [NOTICE] mod_loopback.c:755 Channel [loopback/7499611-a] has been answered<br>
2012-02-27 21:41:50.809112 [NOTICE] mod_dptools.c:1117 Channel [loopback/7499611-b] has been answered<br>
2012-02-27 21:41:50.833830 [NOTICE] switch_ivr_originate.c:3182 Hangup sofia/internal/1003 [CS_CONSUME_MEDIA] [LOSE_RACE]<br>
2012-02-27 21:41:50.833830 [NOTICE] switch_ivr_originate.c:3209 Channel [sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>] has been answered<br>
2012-02-27 21:41:50.833830 [NOTICE] switch_core_session.c:1395 Session 2 (sofia/internal/1003) Ended<br>
2012-02-27 21:41:50.833830 [NOTICE] switch_core_session.c:1397 Close Channel sofia/internal/1003 [CS_DESTROY]<br>
2012-02-27 21:42:08.288866 [NOTICE] switch_core_state_machine.c:226 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 loopback/7499611-b [CS_EXECUTE] [NORMAL_CLEARING]<br>
2012-02-27 21:42:08.288866 [NOTICE] mod_loopback.c:438 Hangup loopback/7499611-a [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_state_machine.c:226 sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> has executed the last dialplan instruction, hanging up.<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_state_machine.c:228 Hangup sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> [CS_EXECUTE] [NORMAL_CLEARING]<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 4 (loopback/7499611-b) Ended<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close Channel loopback/7499611-b [CS_DESTROY]<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 3 (loopback/7499611-a) Ended<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close Channel loopback/7499611-a [CS_DESTROY]<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 1 (sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>) Ended<br>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close Channel sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> [CS_DESTROY]<br>
<br>
--------------------------------------------------<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> on behalf of Michael 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 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 <<a href="mailto:X.Liu@hw.ac.uk" target="_blank">X.Liu@hw.ac.uk</a>> 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>
> 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 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>
> <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">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>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>