<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Michael,<br>
<br>
First apologies if I didn't make myself clear.:-)<br>
<br>
In the beginning I didn't figure out the syntax for using "bridge"
to bridge a call to an extension defined in the dialplan<br>
though I found a lot of examples in which bridging a call to
registered users are shown.<br>
so my first post was just to find its syntax, then the question was
developed while I was trying <br>
different things. Sorry again.<br>
<br>
I described my goal when I replied Peter's question, and I copy and
rephrase it here for your info:<br>
<pre wrap="">My goal is simply to record the user's call by my app (java app using ESL)
and at the same time I want to listen what the user is saying through my computer's speaker.
What I am trying to do is to bridge the call to my app for recording and to
a softphone for listening user's voice.
My java app will do the recording and also allow me to send TTS to the user via a GUI.
</pre>
Regarding to "bypass media", I tried to set bypass media=false but
without any help to my problem,<br>
then I tried to set it true and wanted to see if there was any help.
<br>
<br>
Hector's suggestion sounds quite promising, but at the moment I am
not quite sure how to do it.<br>
I am going to look into it.<br>
<br>
Cheers,<br>
Xing<br>
<br>
<br>
<br>
On 02/27/2012 11:21 PM, Michael Collins wrote:
<blockquote
cite="mid:CAKzWOxVyW6X1CK__EL1bWSj9J0bpx=YzEX5eEOVO00eoS+1r5A@mail.gmail.com"
type="cite">Oh yeah, hehe, now I get it. You can'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
moz-do-not-send="true"
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"><<a moz-do-not-send="true"
href="mailto:X.Liu@hw.ac.uk">X.Liu@hw.ac.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<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 moz-do-not-send="true"
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 "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 moz-do-not-send="true"
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 <<a
moz-do-not-send="true" href="mailto:X.Liu@hw.ac.uk"
target="_blank">X.Liu@hw.ac.uk</a>> 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/<a moz-do-not-send="true"
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<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/<a moz-do-not-send="true"
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<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/<a moz-do-not-send="true"
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<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/<a moz-do-not-send="true"
href="mailto:07875086426@sipgate.co.uk"
target="_blank">07875086426@sipgate.co.uk</a> 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/<a moz-do-not-send="true"
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<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/<a moz-do-not-send="true"
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<br>
> Channel sofia/external/<a moz-do-not-send="true"
href="mailto:07875086426@sipgate.co.uk"
target="_blank">07875086426@sipgate.co.uk</a>
[CS_DESTROY]<br>
><br>
> --------------------------------------------------<br>
><br>
> -----Original Message-----<br>
> From: <a moz-do-not-send="true"
href="mailto:freeswitch-users-bounces@lists.freeswitch.org"
target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>
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 <<a
moz-do-not-send="true" 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>
> ><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>
> > <a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org"
target="_blank">consulting@freeswitch.org</a><br>
> > <a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com"
target="_blank">http://www.freeswitchsolutions.com</a><br>
> ><br>
> > FreeSWITCH-powered IP PBX: The CudaTel
Communication Server<br>
> > <a moz-do-not-send="true"
href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
> ><br>
> > Official FreeSWITCH Sites<br>
> > <a moz-do-not-send="true"
href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> > <a moz-do-not-send="true"
href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> > <a moz-do-not-send="true"
href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
> ><br>
> > FreeSWITCH-users mailing list<br>
> > <a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org"
target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> > <a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> > UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> > <a moz-do-not-send="true"
href="http://www.freeswitch.org" target="_blank">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>
> <a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org"
target="_blank">consulting@freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com"
target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel
Communication Server<br>
> <a moz-do-not-send="true"
href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a moz-do-not-send="true"
href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org"
target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a moz-do-not-send="true" href="http://www.cudatel.com"
target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org"
target="_blank">http://wiki.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://www.cluecon.com"
target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
<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>