typically you would use transfer to the dest<br><br>then in the dialplan for XXXX you would <br><br>set hangup_after_bridge=true<br>
try to call the phone<br>transfer back to your ivr<br><br>you can use channel variables to keep track of state.<br><br><br><div class="gmail_quote">On Tue, Apr 14, 2009 at 12:02 PM, Peter Olsson <span dir="ltr"><<a href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="SV">
<div>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Allright – last question :) I’ll try to be a little
more specific. Lets say I whant to do the following;</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p style="text-indent: -18pt;"><span style="font-size: 10pt; color: rgb(31, 73, 125);"><span>1.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span><span style="font-size: 10pt; color: rgb(31, 73, 125);">Dial into FreeSWITCH, to some kind of application (javascript or
whatever).</span></p>
<p style="text-indent: -18pt;"><span style="font-size: 10pt; color: rgb(31, 73, 125);"><span>2.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span><span style="font-size: 10pt; color: rgb(31, 73, 125);">Answer that call, and let the user choose what to do; 1: record
message, 2: transfer to XXX etc. The user presses 2.</span></p>
<p style="text-indent: -18pt;"><span style="font-size: 10pt; color: rgb(31, 73, 125);"><span>3.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span><span style="font-size: 10pt; color: rgb(31, 73, 125);">I don’t want to release the first call leg yet, since I
need to be really sure that 2 is reachable (or else I will give the user
choices again, with som kind of ”the call could not be transferred”).
So lets say I play some music for the user while trying to connect the call.</span></p>
<p style="text-indent: -18pt;"><span style="font-size: 10pt; color: rgb(31, 73, 125);"><span>4.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span><span style="font-size: 10pt; color: rgb(31, 73, 125);">I originate another call – now I understand I have two
choices, either I originate directly to a SIP phone (sofia/internal...), or I
let the dialplan do the work – and if I want the dialplan to be the one
to transfer the call somewhere (maybe to the same extension), I must use
loopback – right?</span></p>
<p style="text-indent: -18pt;"><span style="font-size: 10pt; color: rgb(31, 73, 125);"><span>5.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span><span style="font-size: 10pt; color: rgb(31, 73, 125);">If the new call answers, bridge the two calls, if it fails,
start over again, after reading an error message.</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Whould this also be possible with transfer? If I understand
everything right I loose control of the call, and won’t be able to handle
the failed transfer? Or is it possible to solve in a better way?</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">What I guess I’d really want to do is to ask the dialplan ”hey,
I want to dial XXXX – give me the full sofia profile string” so I
can originate the call directly, and I won’t need a loopback. I could of
course connect to the sofia string directly, but it would be nice to leave that
kind of lookup logic to the dialplan.</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Thanks for staying with me – I hope you understand my
problem :)</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Regards,</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Peter</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p><b><span style="font-size: 10pt;">Från:</span></b><span style="font-size: 10pt;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>För </b>Anthony
Minessale<br>
<b>Skickat:</b> den 14 april 2009 18:26<div><div></div><div class="h5"><br>
<b>Till:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
<b>Ämne:</b> Re: [Freeswitch-users] Use of loopback channels and bridge() in
scripts...</div></div></span></p>
</div><div><div></div><div class="h5">
<p> </p>
<p style="margin-bottom: 12pt;">The bridge application will let
you bridge right to a destination on *another* box.<br>
If you want to connect to a local extension like 5000 you can use the transfer
application or method.<br>
<br>
session.transfer("5000");<br>
exit();<br>
<br>
or<br>
<br>
session.execute("transfer", "5000");<br>
exit();<br>
<br>
<br>
</p>
<div>
<p>On Tue, Apr 14, 2009 at 10:59 AM, Peter Olsson <<a href="mailto:peter.olsson@visionutveckling.se" target="_blank">peter.olsson@visionutveckling.se</a>>
wrote:</p>
<div>
<div>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Yes, I’m starting to
realize that... :) but you to get everything right – if I want to bridge
a call, using the dialplan, then the only way is to use loopback, right? If I
don’t want a loopback I’m able to bridge to the destination
directly?</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">//Peter</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p><b><span style="font-size: 10pt;">Från:</span></b><span style="font-size: 10pt;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>För </b>Anthony Minessale<br>
<b>Skickat:</b> den 14 april 2009 17:27</span></p>
<div>
<div>
<p><span style="font-size: 10pt;"><br>
<b>Till:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
<b>Ämne:</b> Re: [Freeswitch-users] Use of loopback channels and bridge() in
scripts...</span></p>
</div>
</div>
</div>
<div>
<div>
<p> </p>
<p style="margin-bottom: 12pt;">yes,<br>
<br>
But if you plan is to bridge the call, the loopback channel is completely
unnecessary.<br>
Be careful how much control you want =D getting a phone call up and running is
more work<br>
than you think (see switch_ivr_originate.c)</p>
<div>
<p>On Tue, Apr 14, 2009 at 8:24 AM, Peter Olsson <<a href="mailto:peter.olsson@visionutveckling.se" target="_blank">peter.olsson@visionutveckling.se</a>>
wrote:</p>
<div>
<div>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Anthony,</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Yes, it seems to work correct
now. I did a couple of test calls, and tha audio was good – thanks!</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Another question about this
scenario...</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">When doing a session.transfer(”5000”),
this will transfer the call directly into the dialplan without the use of
loopback-channels. But that way it’s not possible to do it in a
controlled way. Shouldn’t it be possible to do the same thing with a
bridge? As soon as the call is bridged, it gets ”rid of”
unneccecary loopback channels, and connecting the two endpoints directly
– cause by then it should be two ”normal” endpoints talking?</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Regards,</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);">Peter</span></p>
<p><span style="font-size: 10pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p><b><span style="font-size: 10pt;">Från:</span></b><span style="font-size: 10pt;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>För </b>Anthony Minessale<br>
<b>Skickat:</b> den 13 april 2009 20:38<br>
<b>Till:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
<b>Ämne:</b> Re: [Freeswitch-users] Use of loopback channels and bridge() in
scripts...</span></p>
</div>
<div>
<div>
<p> </p>
<p style="margin-bottom: 12pt;">see how it works in latest trunk 13011<br>
<br>
nontheless you can just say <br>
<br>
session.execute("bridge", "loopback/5000");<br>
<br>
and get the same result without touching that other channel.<br>
<br>
when the call fails, you will have an originate_disposition variable in session
you can check.</p>
<div>
<p>On Mon, Apr 13, 2009 at 11:21 AM, Peter Olsson <<a href="mailto:peter.olsson@visionutveckling.se" target="_blank">peter.olsson@visionutveckling.se</a>>
wrote:</p>
<p> 1. The latest trunk I've tried with is 13008. Since I'm not
doing anything for production yet (just testing/evaluating), so I tend to
update as soon as there is new version available..<br>
2. Yep, you will find it below. In javascript - my sample for .NET
does basically the same thing, with the same result, except that it also won't
drop the loopback-a call leg.<br>
3. Hmm.. Not really - I'm just in the middle of learning FS, so I
guess I'm not 100% sure what I'm doing.. :) What I want to be able to do is to
dial into a script, let the script dial another extension, and bridge them together
when the other party answers the call. I also need to take care of call setup
problems - if the other part doesn't respond, is unavailable or busy in the
phone - so I though this was the only way? If I use the
session.execute("bridge"..), will I be able to control the call if it
couldn't be connected?<br>
<br>
---<br>
<br>
if (session.ready()) {<br>
<br>
session.answer();<br>
<br>
new_session = new Session("loopback/5000", session);<br>
new_session.waitForAnswer();<br>
<br>
bridge(session, new_session);<br>
<br>
// Not sure if this is needed - I've tried with it both enabled and
disabled<br>
session.hangup();<br>
new_session.hangup();<br>
}<br>
<span style="color: rgb(136, 136, 136);"><br>
Peter</span></p>
<div>
<div>
<p><br>
<br>
On 09-04-13 17.54, "Anthony Minessale" <<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>>
wrote:<br>
<br>
1) When you say latest, which rev does that mean? we change revs pretty often.<br>
2) Do you have a minimal script that reproduces your issue.<br>
3) is there a reason you cannot just session.execute("bridge", dest);<br>
instead of doing it manually (which is a process not for the faint
at heart)?<br>
<br>
<br>
<br>
On Mon, Apr 13, 2009 at 10:29 AM, Peter Olsson <<a href="mailto:peter.olsson@visionutveckling.se" target="_blank">peter.olsson@visionutveckling.se</a>>
wrote:<br>
I have two problems that I haven't been able to solve. I've done the same tests
in both javascript, and in .NET.<br>
<br>
The two scripts are pretty simple, they just answer an incomming call, creates
a new session, wait for an answer on the second call leg, and then bridge the
two channels together.<br>
<br>
In both cases everything works just fine, but the audio is distorted. The
destination I'm calling is "loopback/5000" - the sample IVR
application included in FreeSWITCH. I first thought it was a codec issue, but
even after trying to switch to different codecs the problem was the same. It more
sounds like it's a timestamping issue - the voice is not distorted enough to be
a bad codec, but it reads way to fast (mayby twice the "normal"
speed). When doing a direct transfer() to the other destination this works just
fine, but I need to be able to have some extra logic to tell if the destination
is available or not.<br>
<br>
The second problem occurs only in .NET. After doing this sample there is as
loopback channel still hanging around. It seems like the call creates a
loopback-a and loopback-b, the loopback-b dissapears as it should (when the
call has been disconnected), but the other one stays there. When doing the same
in javascript this doesn't seem to occur.<br>
<br>
I'm using the latest SVN trunk, and my OS is Windows XP.<br>
<br>
I found bug FSCORE-349 in Jira, which seems to point in to the direction that
there might be a bug with the loopback channels in some cases, but I could not
find anything about the audio which plays too fast.<br>
<br>
Has anyone else experienced this?<br>
<br>
Regards,<br>
<br>
Peter Olsson<br>
<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>
<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></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<p><br>
<br clear="all">
<br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
#freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400</p>
</div>
</div>
</div>
</div>
<p style="margin-bottom: 12pt;"><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></p>
</div>
</div>
</div>
<div>
<div>
<p><br>
<br clear="all">
<br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
#freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400</p>
</div>
</div>
</div>
</div>
<p style="margin-bottom: 12pt;"><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></p>
</div>
</div></div><p></p><div><div></div><div class="h5"><br>
<br clear="all">
<br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400<br></div></div>
!DSPAM:49e4bcb132932104520616!
</div>
</div>
<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><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>