[sr-dev] [ openser-Bugs-2822344 ] Branch route has wrong ruri or missing headers

Alex alex at speakup.nl
Thu Sep 24 10:28:22 CEST 2009


On Friday 04 September 2009, Juha Heinanen wrote:
> SourceForge.net writes:
>  > I would either expect the ruri and all other variables and headers to
>  > be exactly the same as at t_relay time for each branch, or (for
>  > DNS-based failover ONLY) the packet sent to a failover destination to
>  > be exactly the same as the first branch (including any added headers
>  > / from replacement, etc.) Not a mix of both.
> 
> if i add a header in branch route, i want it to be there ONLY for that
> branch, not for any other branch.

Of course, and you'd probably expect that changing the RURI in branch route 
is only for that branch. Unfortunately both statements are not fulfilled by 
Kamailio.

If you add a header for a specific destination domain, you'd probably want 
it to be sent to every ip if there are multiple ip's in the domains SRV 
records. Currently it doesn't work for DNS based failover:

In case a 503 is received, you can add the header again from the script, as 
branch route is called again for the next IP. Keep in mind you don't get the 
RURI you set before t_relay(), but the RURI set in the previous branch 
route.

In case there is a timeout, you're lost. No branch route is called, and the 
header is missing.

Unfortunately the above is a very common scenario: LCR. When every carrier 
requires a specific RURI format, require some additional headers and that 
the carriers are reachable over SRV records. 


A quick workaround would be that on DNS based failover in case of a timeout, 
branch route is called again. I tried to find in the source the place where 
the decision is made whether or not to call branch route on DNS failover, 
but got lost.


Alex.



More information about the sr-dev mailing list