[Kamailio-Users] Identifying branch in ONREPLY-ROUTE?

Daniel-Constantin Mierla miconda at gmail.com
Mon Aug 11 13:01:52 CEST 2008


Hello,

On 08/11/08 13:35, Alex Balashov wrote:
> I suppose I can extract the 'branch' parameter from the topmost Via: in 
> the reply, but are there are any prebuilt API/module functions for 
> manipulating the Via?  Or is it plain old textops time?
>   
you found a good solution and with transformations should be easy to 
get. honestly I had no need so far and I think the right approach is to 
ma $T_branch_index return the branch of the processed reply.

Cheers,
Daniel

> Alex Balashov wrote:
>
>   
>> What is the simplest way to identify the branch (by branch index) to 
>> which a reply belongs in an ONREPLY-ROUTE?
>>
>> I have parallel forking with my registrar and do passive call 
>> statekeeping.  The problem is that it must be branch-aware;  I need to 
>> know if, for example, I got a successful provisional reply on one branch 
>> of the call and a failure on the other, and deal with those separately.
>>
>> Right now my statekeeping information is keyed by Call-ID, but since 
>> that persists across two branches, obviously some sort of 
>> branch-identifying information has to be present.
>>
>> I've tried setting a persistent variable to the value of $T_branch_idx 
>> inside a BRANCH-ROUTE, but in ONREPLY-ROUTE that just shows up with the 
>> most recent branch index, regardless of which branch the reply actually 
>> came in on.
>>
>> I'm probably missing something quite obvious here, so I ask - how do I 
>> incorporate some form of branch awareness into ONREPLY-ROUTEs?  I really 
>> do not care what form that is - be it branch index, or some other 
>> built-in value, as long as it is consistent.
>>
>>     
>
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the sr-users mailing list