That 408 doesn't make sense to me.. <div><br></div><div>If you got a 408 back, the gateway you are sending to WORKS, but IT'S destination is failing.</div><div><br></div><div>say for example you send to a gateway and that gateway sends to 10 different providers.. if this call routes to provider A, which doesn't respond, then your gateway may respond back with a 408. Where the failure isn't your gateway, it's your gateway's upstream..</div>
<div>-Brett</div><div><br><br><div class="gmail_quote">On Wed, Feb 11, 2009 at 4:10 PM, Iñaki Baz Castillo <span dir="ltr"><<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I don't understand the following:<br>
<br>
<br>
-----------------------------------------------<br>
########################################################################<br>
## Handles relay of INVITE messages<br>
## with round-robin load balancing<br>
########################################################################<br>
route[1]{<br>
ds_select_domain("1","4");<br>
t_on_reply("1");<br>
t_on_failure("1");<br>
t_relay();<br>
}<br>
<br>
[...]<br>
<br>
#######################################################################<br>
## Handles failure of INVITE forwarding<br>
#######################################################################<br>
failure_route[1]{<br>
xlog("L_INFO","Failure route, trying again\n");<br>
<br>
if(t_check_status("408")){<br>
xlog("L_INFO","Got a 408 Timeout, flagging dest as invalid\n");<br>
ds_mark_dst();<br>
route(1);<br>
----------------------------------------------<br>
<br>
<br>
In failure_route[1] you call route[1], and in route[1] you<br>
execute "ds_select_domain()".<br>
According to the doc:<br>
<a href="http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id271282" target="_blank">http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id271282</a><br>
"ds_select_domain()" can only be called from REQUEST_ROUTE, and not from<br>
FAILURE_ROUTE.<br>
I wonder why you don't get an error when starting your OpenSIPS. ¿?<br>
<br>
I expect you should use "ds_next_domain" in FAILURE_ROUTE:<br>
<a href="http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id271328" target="_blank">http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id271328</a><br>
<br>
Are you 100% sure that this script works in your lab? How have you simulated<br>
the "408" from a server?<br>
<br>
<br>
Other point: you consider the case of a 408 to dissable a gateway. I've worked<br>
with OpenSIPS in front of an Asterisk acting as PSTN gateway using PRI.<br>
Sometimes, when the PSTN called doesn't answer after XX seconds, the telco<br>
replies a ISUP code that Asterisk converts to "408". Be careful because if<br>
that occurs your OpenSIPS will mark that Asterisk as "dead".<br>
<br>
<br>
Other point: why do you only consider 408 to dissable a gateway? Imagine that<br>
the Asterisk has a problem and replies 500 (Internal Error) or 503. But if<br>
you add those casees, be sure of adding "Hangup" at the end of each possible<br>
extension in your Asterisk dialplan. If not, Asterisk will reply 503.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
<font color="#888888">Iñaki Baz Castillo<br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>