[Freeswitch-users] How to bridge a call to an extension defined in dialplan

Michael Collins msc at freeswitch.org
Tue Feb 28 02:03:52 MSK 2012


Okay, go ahead and pastebin your console debug log of the call from start
to finish and also the relevant dialplan code. Use
pastebin.freeswitch.organd select "FreeSWITCH Log" for syntax
highlighting.

-MC

On Mon, Feb 27, 2012 at 2:46 PM, Liu, Xingkun <X.Liu at hw.ac.uk> wrote:

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


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