[SR-Users] append_branch and t_replicate issue

Daniel-Constantin Mierla miconda at gmail.com
Thu Jul 24 18:26:05 CEST 2014


Hello,

On 24/07/14 17:29, Asgaroth wrote:
> Hi,
>
> Thanks for the suggestion, I tried it but t_replicate() seems to cause 
> an issue with config parsing, looking at TM module v4.1.x 
> documentation, it looks like t_replicate *must* have paramteres.

checking docs, it seems like that. I will have to look at the code and 
eventually make an option without parameter. Otherwise, like it is not, 
the parameter forces an outbound proxy to be used for forwarding.

You sent me the sip trace and you can see there that two register 
requests are sent out, both to the address in the parameter of the 
t_replicate(), but one has the address from append_branch() in r-uri. So 
the forking was done.

Maybe you can try with a look via kamailio itself:

$ru = uri1;
append_branch("uri2");
t_replicate("sip:kamailioip:kamailioport");

Then you see that is coming with src_ip==myself and simply do t_relay() 
and the r-uri should point to where it needs to be forwarded.

Cheers,
Daniel

>
> Here's my test snip:
>
>             $ru = "sip:" + BACKUP_REGISTRAR_1 + ":5060";
>             append_branch("sip:" + BACKUP_REGISTRAR_2 + ":5060");
>             t_replicate();
>
> The kamailio restart throws the following error (I do have the tm 
> module loaded):
>
>     Not starting : invalid configuration file!
>
>      0(15737) ERROR: <core> [cfg.y:3273]: yyparse(): cfg. parser: 
> failed to find command t_replicate (params 0)
>      0(15737) : <core> [cfg.y:3412]: yyerror_at(): parse error in 
> config file //etc/kamailio/kamailio.cfg, line 190, column 25: unknown 
> command, missing loadmodule?
>
>     ERROR: bad config file (1 errors)
>
> Thanks
> Bruce
>
> On 24/07/2014 15:52, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> you use t_replicate(uri1) -- by that you force outbound proxy to uri1 
>> parameter.
>>
>> Can you try like in the next example?
>>
>> $ru = uri1;
>> append_branch("uri2");
>> t_replicate();
>>
>> Cheers,
>> Daniel
>>
>> On 22/07/14 17:40, Daniel-Constantin Mierla wrote:
>>> Hello,
>>>
>>> ok, I will look it up and investigate when I get the first chance.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 22/07/14 16:43, Asgaroth wrote:
>>>> Hi,
>>>>
>>>> On 22/07/2014 11:38, Daniel-Constantin Mierla wrote:
>>>>> Hello,
>>>>>
>>>>> looking a bit at the source code, append branch should still 
>>>>> create a new destination point and message to be sent there. I 
>>>>> would need the log messages printed with debug=3 in kamailio.cfg 
>>>>> for the case when you use append branch. Can you provide them?
>>>>
>>>> Just for completeness, I sent the debug output directly to your 
>>>> gmail address.
>>>>
>>>> Thanks for looking at this Daniel.
>>>>
>>>> Cheers
>>>> Bruce
>>>
>>
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list