Daniel-Constantin Mierla wrote:
On 12/10/09 5:49 PM, Nathan Angelacos wrote:
Daniel-Constantin Mierla wrote:
Hello,
On 12/10/09 5:29 AM, Nathan Angelacos wrote:
According to the 1.5.x TM module documentation, DNS failover is triggered by a 503 reply or a timeout.
When using SRV records, it appears a 503 triggers the failure_route instead.
Given:
host -t srv _sip._udp.voip.example.net _sip._udp.voip.example.net has SRV record 1 0 5060 fast-server.example.net. _sip._udp.voip.example.net has SRV record 2 0 5060 slow-server.example.net.
On an invite to voip.example.net, if fast-server does not respond within "fr_timer" seconds, t_relay fires off a serial branch (t_on_branch is triggered) and the invite goes to slow-server.
If fast-server responds with a 503, the t_on_failure route is triggered instead, and the invite is not sent on to slow-server.
If its not a bug in the module, does anyone have clues of how to coax the next DNS SRV record out of the t_on_failure route? Or what can be done to get t_relay to consume the 503?
does the 503 reply include a retry-after header?
It did not. Adding one generates the expected results. Thanks!
(Now to convince the customer to add the header - "It worked before with the other provider...")
then maybe is easier to patch kamailio 1.5. Look in modules/tm/t_reply.c
At line 708, replace:
/* is the Retry-After header present (if present, * it should be already parsed) */ hdr = t->uac[picked_branch].reply->headers; for( ; hdr ; hdr=hdr->next) if (hdr->type==HDR_RETRY_AFTER_T) return 1; return 0;
with:
return 1;
Thanks!
I'm still a newbie... I really appreciate your patience and help.
Thanks for checking the 3.0 code as well. Good to know that we could try to wait for it as well.