[SR-Users] [sr-dev] [regression] Message flags set in branch_route not saved into transaction

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 25 13:07:35 CEST 2011



On 8/25/11 1:02 PM, Alex Hermann wrote:
> On Thursday 25 August 2011, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> On 8/22/11 6:35 PM, Alex Hermann wrote:
>>> On Monday 22 August 2011 16:43:43 Alex Hermann wrote:
>>>> On Monday 22 August 2011, Alex Hermann wrote:
>>>>> It seems kamailio 3 does not save message flags set in branch route
>>>>> into the transaction. In reply_route and failure_route the flag set in
>>>>> branch_route is unset. In 1.4 this used to work. I would like to get
>>>>> that behaviour back, is this possible?
>>>> This patch seems to restore old functionality. Would this be ok to
>>>> commit?
>>> Nevermind, i just found t_flush_flags(), which does exactly what i need.
>> was the auto-update of the flags in 1.x? That would have made
>> t_flush_flags() redundant, or maybe the auto-update was in branch route
>> and t_flush_flags() purpose was for failure_route. I want to be sure we
>> don't omit things from 1.x -- t_flush_flags() was also forgotten, added
>> later after a report from Juha.
> In 1.4, message flags were updated in the transaction unconditionally after
> branch_route had run. The patch i provided is an exact copy of the relevant
> code from 1.4 and provides backward compatibility.
I see, then we should add the patch. Using t_flush_flags() will become 
redundant for this case, but harmless.
>
> Adding t_flush_flags() to the end of branch_route in the script accomplishes
> the same functionality, but requires a script update by the user.
>
> IIRC, flags were also copied to the transaction from failure_route in 1.4.
> Haven't tested though.
We have to check and make it the same. The t_flush_flags() will stay 
then for the route blocks, where the transaction is created with 
t_newtrans() -- which seems to be its description in 1.4.x:

http://www.kamailio.org/docs/modules/1.4.x/tm.html#id2531069

Cheers,
Daniel
>

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list