<div dir="ltr">You can try using a transfer after the bridge.<div><br clear="all"><div dir="ltr"><span style="font-family:Verdana, Arial, Helvetica, sans-serif"><span style="font-size:small">-Avi</span></span></div><br><div class="gmail_quote">

2011/7/10 StanisÅ‚aw Pitucha <span dir="ltr">&lt;<a href="mailto:viraptor@gmail.com">viraptor@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi all,<br>
I&#39;ve got a simple problem to solve that doesn&#39;t seem to be so simple<br>
to execute. For some incoming call, I&#39;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&#39;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&#39;m sending the call to &quot;user/...|loopback/.../...&quot; -<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&#39;t<br>
understand it, didn&#39;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 &quot;on hangup, do<br>
this before anything else happens&quot;?<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>