Oh yeah, hehe, now I get it. You can&#39;t bypass media in a loopback.<br><br>I probably should have asked these questions before:<br><br>Why are you trying to bypass media at all?<br>Also, why are you trying to bypass media and yet at the same time trying to record (x74991)?<br>
<br>I think the best question to ask is this: using plain language, could you please describe what you are trying to accomplish? I have a feeling that we are doing a classic <a href="http://mywiki.wooledge.org/XyProblem">XY</a> dance.<br>
<br>Thanks,<br>MC<br><br><div class="gmail_quote">On Mon, Feb 27, 2012 at 3:09 PM, Liu, Xingkun <span dir="ltr">&lt;<a href="mailto:X.Liu@hw.ac.uk">X.Liu@hw.ac.uk</a>&gt;</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>Now I also tried: bypass_media_after_bridge=true<br>
<br>
I got:<br>
<br>
 switch_ivr_bridge.c:246 Cannot bypass media while bridged to a loopback address.<br>
<br>
then I changed loopback/74991 to sofia/internal/74991@${domain} and tried again<br>
<br>
I got the same results as I tested in the very beginning:<br>
<br>
Hangup sofia/internal/1003 [CS_CONSUME_MEDIA] [ORIGINATOR_CANCEL]<br>
<br>
Regards,<br>
Xing<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 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 &quot;set&quot; apps that<br>
occur before the &quot;bridge&quot; with &quot;export&quot; or use the {} notation to specify<br>
them in the dialstring:<br>
<br>
    &lt;action application=&quot;export&quot; data=&quot;call_timeout=30&quot;/&gt;<br>
    &lt;action application=&quot;export&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;<br>
    &lt;action application=&quot;export&quot; data=&quot;bypass_media=true&quot;/&gt;<br>
    &lt;action application=&quot;export&quot; data=&quot;ignore_early_media=true&quot;/&gt;<br>
<br>
or remove all the above lines and just do this for your bridge line:<br>
<br>
    &lt;action application=&quot;bridge&quot;<br>
data=&quot;{call_timeout=30,hangup_after_bridge=false,bypass_media=true,ignore_early_media=true}sofia/internal/1003%${sip_profile},loopback/74991&quot;/&gt;<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" target="_blank">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 &lt;<a href="mailto:X.Liu@hw.ac.uk" target="_blank">X.Liu@hw.ac.uk</a>&gt; wrote:<br>
<br>
&gt; **<br>
&gt;<br>
&gt; Hi Michael,<br>
&gt;<br>
&gt; Thanks for your suggestion!<br>
&gt;<br>
&gt; I tried your suggestion. I saw the softphone(extension 1003) immediately<br>
&gt; hung up after it was reached,<br>
&gt; the I heard &quot;bye&quot; and the extension 74991 hung up.<br>
&gt;<br>
&gt; I copied the terminal and my dialplan for extension 74991 below:<br>
&gt;<br>
&gt; &lt;extension name=&quot;testRecordingOnly2_bridge&quot;&gt;<br>
&gt;   &lt;condition field=&quot;destination_number&quot; expression=&quot;^(74995)$&quot;&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;call_timeout=30&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;bypass_media=true&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot;/&gt;<br>
&gt;     &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;sofia/internal/1003%${sip_profile},loopback/74991&quot;/&gt;<br>
&gt;   &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt; &lt;extension name=&quot;testRecordingOnly2&quot;&gt;<br>
&gt;   &lt;condition field=&quot;destination_number&quot; expression=&quot;^(74991)$&quot;&gt;<br>
&gt;     &lt;action application=&quot;answer&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_TITLE=Recording<br>
&gt; ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_COPYRIGHT=(c) 1980 Factory<br>
&gt; Records, Inc.&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_SOFTWARE=FreeSWITCH&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_ARTIST=Ian Curtis&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_COMMENT=Love will tear us<br>
&gt; apart&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_DATE=${strftime(%Y-%m-%d<br>
&gt; %H:%M)}&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;RECORD_STEREO=true&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;record_waste_resources=true&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;tts_engine=flite&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;tts_voice=rms&quot;/&gt;<br>
&gt;     &lt;action application=&quot;speak&quot; data=&quot;please say something to start<br>
&gt; recording.&quot;/&gt;<br>
&gt;     &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot;/&gt;<br>
&gt;     &lt;action application=&quot;log&quot; data=&quot;XX-BaseDir $${base_dir}&quot;/&gt;<br>
&gt;     &lt;action application=&quot;record&quot;<br>
&gt; data=&quot;$${base_dir}/testRecording/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav<br>
&gt; 120 200&quot;/&gt;<br>
&gt;   &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt;  -----------------------------------------------<br>
&gt; 2012-02-27 21:41:29.004622 [INFO] switch_time.c:423 Clock synchronized to<br>
&gt; system time.<br>
&gt; 2012-02-27 21:41:50.788883 [NOTICE] switch_channel.c:920 New Channel<br>
&gt; sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>[db748000-618b-11e1-9bae-07e90bb2f0c8]<br>
&gt; 2012-02-27 21:41:50.788883 [INFO] mod_dialplan_xml.c:481 Processing<br>
&gt; 07875086426 &lt;07875086426&gt;-&gt;74995 in context public<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel<br>
&gt; sofia/internal/1003 [db7641f6-618b-11e1-9bb2-07e90bb2f0c8]<br>
&gt; 2012-02-27 21:41:50.809112 [INFO] mod_loopback.c:885 Sending early media<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] mod_sofia.c:2521 Pre-Answer<br>
&gt; sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>!<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel<br>
&gt; loopback/7499611-a [db777864-618b-11e1-9bb7-07e90bb2f0c8]<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:918 Rename Channel<br>
&gt; loopback/7499611-a-&gt;loopback/7499611-a<br>
&gt; [db777864-618b-11e1-9bb7-07e90bb2f0c8]<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] switch_channel.c:920 New Channel<br>
&gt; loopback/7499611-b [db778ffc-618b-11e1-9bbb-07e90bb2f0c8]<br>
&gt; 2012-02-27 21:41:50.809112 [INFO] mod_dialplan_xml.c:481 Processing<br>
&gt; 07875086426 &lt;07875086426&gt;-&gt;7499611 in context public<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] mod_loopback.c:755 Channel<br>
&gt; [loopback/7499611-a] has been answered<br>
&gt; 2012-02-27 21:41:50.809112 [NOTICE] mod_dptools.c:1117 Channel<br>
&gt; [loopback/7499611-b] has been answered<br>
&gt; 2012-02-27 21:41:50.833830 [NOTICE] switch_ivr_originate.c:3182 Hangup<br>
&gt; sofia/internal/1003 [CS_CONSUME_MEDIA] [LOSE_RACE]<br>
&gt; 2012-02-27 21:41:50.833830 [NOTICE] switch_ivr_originate.c:3209 Channel<br>
&gt; [sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>] has been answered<br>
&gt; 2012-02-27 21:41:50.833830 [NOTICE] switch_core_session.c:1395 Session 2<br>
&gt; (sofia/internal/1003) Ended<br>
&gt; 2012-02-27 21:41:50.833830 [NOTICE] switch_core_session.c:1397 Close<br>
&gt; Channel sofia/internal/1003 [CS_DESTROY]<br>
&gt; 2012-02-27 21:42:08.288866 [NOTICE] switch_core_state_machine.c:226<br>
&gt; loopback/7499611-b has executed the last dialplan instruction, hanging up.<br>
&gt; 2012-02-27 21:42:08.288866 [NOTICE] switch_core_state_machine.c:228 Hangup<br>
&gt; loopback/7499611-b [CS_EXECUTE] [NORMAL_CLEARING]<br>
&gt; 2012-02-27 21:42:08.288866 [NOTICE] mod_loopback.c:438 Hangup<br>
&gt; loopback/7499611-a [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_state_machine.c:226<br>
&gt; sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> has executed the last dialplan<br>
&gt; instruction, hanging up.<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_state_machine.c:228 Hangup<br>
&gt; sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> [CS_EXECUTE] [NORMAL_CLEARING]<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 4<br>
&gt; (loopback/7499611-b) Ended<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close<br>
&gt; Channel loopback/7499611-b [CS_DESTROY]<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 3<br>
&gt; (loopback/7499611-a) Ended<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close<br>
&gt; Channel loopback/7499611-a [CS_DESTROY]<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1395 Session 1<br>
&gt; (sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a>) Ended<br>
&gt; 2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close<br>
&gt; Channel sofia/external/<a href="mailto:07875086426@sipgate.co.uk" target="_blank">07875086426@sipgate.co.uk</a> [CS_DESTROY]<br>
&gt;<br>
&gt;  --------------------------------------------------<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> on behalf of Michael<br>
&gt; Collins<br>
&gt; Sent: Mon 2/27/2012 19:59<br>
&gt; To: FreeSWITCH Users Help<br>
&gt; Subject: Re: [Freeswitch-users] How to bridge a call to an extension<br>
&gt; defined in dialplan<br>
&gt;<br>
&gt; How about this for your bridge line:<br>
&gt;<br>
&gt; &lt;action application=&quot;bridge&quot;<br>
&gt; data=&quot;sofia/internal/1003%${sip_profile},loopback/74991&quot;/&gt;<br>
&gt;<br>
&gt; -MC<br>
&gt;<br>
&gt; On Sun, Feb 26, 2012 at 2:29 PM, Liu, Xingkun &lt;<a href="mailto:X.Liu@hw.ac.uk" target="_blank">X.Liu@hw.ac.uk</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; **<br>
&gt; &gt;<br>
&gt; &gt; Hello,<br>
&gt; &gt;<br>
&gt; &gt; I&#39;d like to bridge an incoming to two endpoints simultaneuously:<br>
&gt; &gt; one is a softphone which is registered to FS (to user 1003),<br>
&gt; &gt; another is just an extension which is defined in conf/dialplan/public.xml<br>
&gt; &gt;<br>
&gt; &gt; It looks like:<br>
&gt; &gt;<br>
&gt; &gt; &lt;extension name=&quot;testRecording_bridge&quot;&gt;<br>
&gt; &gt;   &lt;condition field=&quot;destination_number&quot; expression=&quot;^(74990)$&quot;&gt;<br>
&gt; &gt;     &lt;action application=&quot;bridge&quot;<br>
&gt; &gt;<br>
&gt; data=&quot;sofia/internal/1003%${sip_profile},sofia/internal/74991%${sip_profile}&quot;/&gt;<br>
&gt; &gt;   &lt;/condition&gt;<br>
&gt; &gt; &lt;/extension&gt;<br>
&gt; &gt;<br>
&gt; &gt; &lt;extension name=&quot;testRecordingOnly&quot;&gt;<br>
&gt; &gt;     &lt;condition field=&quot;destination_number&quot; expression=&quot;^74991$&quot;&gt;<br>
&gt; &gt;       &lt;action application=&quot;set&quot; data=&quot;record_waste_resources=true&quot;/&gt;<br>
&gt; &gt;       &lt;action application=&quot;javascript&quot; data=&quot;testRecordFile.js&quot;/&gt;<br>
&gt; &gt;     &lt;/condition&gt;<br>
&gt; &gt;   &lt;/extension&gt;<br>
&gt; &gt;<br>
&gt; &gt; The incoming call dial to extension 74990, from there I want to bridge<br>
&gt; the<br>
&gt; &gt; call to the sofphone at 1003 and<br>
&gt; &gt; to the extension 74991.<br>
&gt; &gt;<br>
&gt; &gt; The problem is that FS can not locate user 74991. So my question is what<br>
&gt; &gt; else I need to modify in order<br>
&gt; &gt; to bridge the call also to extension 74991 at the same time?<br>
&gt; &gt;<br>
&gt; &gt; I did lots of Googling, checked the wiki and tried various ways but still<br>
&gt; &gt; without success.<br>
&gt; &gt;<br>
&gt; &gt; Any advices please?<br>
&gt; &gt;<br>
&gt; &gt; Many Thanks!<br>
&gt; &gt; Xing<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------<br>
&gt; &gt;<br>
&gt; &gt;  *Heriot-Watt University is the Sunday Times Scottish University of the<br>
&gt; &gt; Year 2011-2012.*<br>
&gt; &gt;<br>
&gt; &gt;  Heriot-Watt University is a Scottish charity registered under charity<br>
&gt; &gt; number SC000278.<br>
&gt; &gt;<br>
&gt; &gt; _________________________________________________________________________<br>
&gt; &gt; Professional FreeSWITCH Consulting Services:<br>
&gt; &gt; <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
&gt; &gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt; &gt;<br>
&gt; &gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; &gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt; &gt;<br>
&gt; &gt; Official FreeSWITCH Sites<br>
&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; &gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt; &gt;<br>
&gt; &gt; FreeSWITCH-users mailing list<br>
&gt; &gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; ------------------------------<br>
&gt;<br>
&gt;  *Heriot-Watt University is the Sunday Times Scottish University of the<br>
&gt; Year 2011-2012.*<br>
&gt;<br>
&gt;  Heriot-Watt University is a Scottish charity registered under charity<br>
&gt; number SC000278.<br>
&gt;<br>
&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<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>