Ok, that works just fine, thanks. Although for more interesting logic I need to do transfer, so can't failover from there this way.<br><br><span style="font-family:Prelude, Verdana, san-serif;">So I worked around that specific case, but what about the other questions? Why doesn't loopback work? What's the event based solution?<br><br></span><span id="signature"><div style="font-family: arial, sans-serif; font-size: 12px;color: #999999">-- Sent from my HP TouchPad</div></span><span style="color:navy; font-family:Prelude, Verdana, san-serif; "><hr align="left" style="width:75%">On 9 Jul 2011 22:31, Avi Marcus <avi@avimarcus.net> wrote: <br></span><div dir="ltr">You can try using a transfer after the bridge.<div><br clear="all"><div dir="ltr"><span><span>-Avi</span></span></div><br><div class="gmail_quote">
2011/7/10 Stanisław Pitucha <span dir="ltr"><<a href="mailto:viraptor@gmail.com">viraptor@gmail.com</a>></span><br><blockquote class="gmail_quote">
Hi all,<br>
I've got a simple problem to solve that doesn't seem to be so simple<br>
to execute. For some incoming call, I'd like to call one destination,<br>
then if it fails (user not registered / busy / any other failure) call<br>
another destination. Both destinations should be arbitrary, but for<br>
now I'm ok with the first being set to a `user/...`. Second needs to<br>
be sent through the dialplan (might need setting billing details,<br>
etc.), or might be another user.<br>
<br>
At the moment, I'm sending the call to "user/...|loopback/.../..." -<br>
which often results in the call being simply hungup right after<br>
loopback answers.<br>
>From #freeswitch I learned that loopback can do that (still don't<br>
understand it, didn't find any related bug either) and I should use<br>
xml_curl or event sockets - but no real examples. So after doing a bit<br>
of research, I run into the following problems:<br>
<br>
- If I use dialplan via xml curl, I would either need to pass the<br>
control back to some other context (using loopback seems to be the<br>
only option), or compute all parameters in one go and do a transfer to<br>
the final set of destinations (not possible in every case)<br>
<br>
- If I use eventsocket, how can I react to the connection failure? It<br>
seems that I will only get an event about the hangup and the channel<br>
will disappear on its own. Is there even a way to do a "on hangup, do<br>
this before anything else happens"?<br>
<br>
Are there any examples of a similar scenario on the web? Any links /<br>
longer explanations would be appreciated.<br>
<br>
PS. is it defined somewhere why/when does loopback destroy the call on<br>
accepted connection?<br>
<br>
--<br>
KTHXBYE,<br>
<br>
Stanisław Pitucha<br>
<br>
_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<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>
</blockquote></div><br></div></div>