<!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>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/07875086426@sipgate.co.uk [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/07875086426@sipgate.co.uk!<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/07875086426@sipgate.co.uk] 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/07875086426@sipgate.co.uk 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/07875086426@sipgate.co.uk [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/07875086426@sipgate.co.uk) Ended<BR>
2012-02-27 21:42:08.308864 [NOTICE] switch_core_session.c:1397 Close 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 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 <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>
> 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>
> 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>