<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Look in&nbsp;sofia_glue.c it maps the numbers to causes.<div><br></div><div>/b</div><div><br><div><html>On Jul 7, 2008, at 8:22 AM, Joseph Bajin wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite">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&nbsp; NO_ROUTE_DESTINATION.<br><br><div class="gmail_quote"> On Mon, Jul 7, 2008 at 12:35 AM, Brian West &lt;<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 &amp; 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> &lt;action application="set"<br> data="NO_ROUTE_DESTINATION,NORMAL_TEMPORARY_FAILURE"/><br> &lt;action application="bridge" data="sofia/gateway/<a href="http://blah.com/5551212" target="_blank">blah.com/5551212</a>"/><br> &lt;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 &nbsp;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) _______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Brian West</div><div><a href="sip:brian@freeswitch.org">sip:brian@freeswitch.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>