[OpenSIPS-Users] Paid Consultation Request

Iñaki Baz Castillo ibc at aliax.net
Wed Feb 11 23:10:49 CET 2009


I don't understand the following:


-----------------------------------------------
########################################################################
## Handles relay of INVITE messages
## with round-robin load balancing
########################################################################
route[1]{
	ds_select_domain("1","4");
	t_on_reply("1");
	t_on_failure("1");
	t_relay();
}

[...]

#######################################################################
## Handles failure of INVITE forwarding
#######################################################################
failure_route[1]{
	xlog("L_INFO","Failure route, trying again\n");

	if(t_check_status("408")){
		xlog("L_INFO","Got a 408 Timeout, flagging dest as invalid\n");
		ds_mark_dst();
		route(1);
----------------------------------------------


In failure_route[1] you call route[1], and in route[1] you 
execute "ds_select_domain()".
According to the doc:
  http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id271282
"ds_select_domain()" can only be called from REQUEST_ROUTE, and not from 
FAILURE_ROUTE.
I wonder why you don't get an error when starting your OpenSIPS. ¿?

I expect you should use "ds_next_domain" in FAILURE_ROUTE:
  http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id271328

Are you 100% sure that this script works in your lab? How have you simulated 
the "408" from a server?


Other point: you consider the case of a 408 to dissable a gateway. I've worked 
with OpenSIPS in front of an Asterisk acting as PSTN gateway using PRI. 
Sometimes, when the PSTN called doesn't answer after XX seconds, the telco 
replies a ISUP code that Asterisk converts to "408". Be careful because if 
that occurs your OpenSIPS will mark that Asterisk as "dead".


Other point: why do you only consider 408 to dissable a gateway? Imagine that 
the Asterisk has a problem and replies 500 (Internal Error) or 503. But if 
you add those casees, be sure of adding "Hangup" at the end of each possible 
extension in your Asterisk dialplan. If not, Asterisk will reply 503.



  



-- 
Iñaki Baz Castillo



More information about the Users mailing list