[sr-dev] [ openser-Bugs-2822344 ] Branch route has wrong ruri or missing headers
Daniel-Constantin Mierla
miconda at gmail.com
Thu Sep 24 11:27:53 CEST 2009
On 24.09.2009 11:18 Uhr, Andrei Pelinescu-Onciul wrote:
> On Sep 24, 2009 at 10:38, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
>
>> On 24.09.2009 10:28 Uhr, Alex wrote:
>>
>>> 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.
>>>
>>>
>> not sure I got this one. Headers and r-uri on updated on a branch route
>> are visible on that branch only.
>>
>>
>>
>>> 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.
>>>
>>>
>> DNS failover is pretty much hidden to script writer, and each step
>> creates a new branch. Also remember that this is serial forking, so a
>> branch from a branch, not parallel, branches from initial invite.
>>
>>
>>> In case there is a timeout, you're lost. No branch route is called, and
>>> the header is missing.
>>>
>>>
>> Failure route is processing the initial message. Hopefully lot of such
>> limitations will be removed in kamailio 3.0 with the new function
>> msg_apply_changes() from textops where the script writer can apply
>> changes, therefore make new headers permanent before creating the
>> transaction and going into the forking logic.
>>
>
> I don't think it would be needed in this case. By default sip-router tm
> uses exactly what was sent on the last branch when doing dns failover.
> See
> http://sip-router.org/docbook/sip-router/branch/master/modules/tm/tm.html#reparse_on_dns_failover
>
> So this should solve the header added in a branch route and not
> preserved on dns failover and you don't have to add anything to the
> script (provided you use sip-router or kamailio 3.0).
>
good to know. Another goodie then of SR/K 3.0.
Cheers,
Daniel
> One thing to note though, is that branch route is not called when doing
> dns failover, if reparse_on_dns_failover is set to 1.
>
> Andrei
>
--
Daniel-Constantin Mierla
* http://www.asipto.com/
More information about the sr-dev
mailing list