Perfect Thanks.. <br><br>Is there a definition on what relates to what error code (404 - NO_ROUTE_DESTINATION)? I looked in the src/switch_channel.c but it just defines it NO_ROUTE_DESTINATION.<br><br><div class="gmail_quote">
On Mon, Jul 7, 2008 at 12:35 AM, Brian West <<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can do this with the continue_on_fail session variable.<br>
<br>
404 = NO_ROUTE_DESTINATION<br>
500 & 503 = NORMAL_TEMPORARY_FAILURE<br>
and 485 is USER_BUSY<br>
<br>
So if you set the variable continue_on_fail to a comma separated list<br>
ie:<br>
<br>
<action application="set"<br>
data="NO_ROUTE_DESTINATION,NORMAL_TEMPORARY_FAILURE"/><br>
<action application="bridge" data="sofia/gateway/<a href="http://blah.com/5551212" target="_blank">blah.com/5551212</a>"/><br>
<action application="bridge" data="sofia/gateway/<a href="http://blah2.com/5551212" target="_blank">blah2.com/5551212</a>"/><br>
<br>
This would cause the dialplan to continue processing if <a href="http://blah.com" target="_blank">blah.com</a><br>
returned any of the above causes.<br>
<br>
<a href="http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail" target="_blank">http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail</a><br>
<br>
<a href="http://wiki.freeswitch.org/wiki/Hangup_causes" target="_blank">http://wiki.freeswitch.org/wiki/Hangup_causes</a><br>
<br>
/b<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
On Jul 6, 2008, at 11:09 PM, Joseph Bajin wrote:<br>
<br>
><br>
> I will use xml_curl to query a db for the cheapest routes to use.<br>
> It will come back with a couple of different gateways to use. (LCR<br>
> idea) Based on the response I get from the first gateway<br>
> (404,503,500, 486), I want to either reroute to another gateway or<br>
> send back to the originator the result that I found (486 in this<br>
> case, other messages should be rerouted unless we hit the last and<br>
> then send back a final response).<br>
><br>
> How can I do that in a dialplan? Can you point me some documention<br>
> maybe?<br>
><br>
</div></div>> _______________________________________________<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>
<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><br clear="all"><br>-- <br>--Joe<br><br>"Success is easy if you think of it like Rust: It's inevitable if you keep at it. Guys claim there are magic moments, but that's just bullshit." --Fred Franzia (The famous wine guy)