[OpenSIPS-Users] uac_replace_from/to on a Branch Route

Antonio Anderson Souza antonio at voicetechnology.com.br
Fri Jun 11 18:45:26 CEST 2010


Hi Bogdan,

I've changed mu script to execute all of the uac_replace only on branch
route, and it's working perfectly.

Thank you very much for the help.

Best regards,

Antonio Anderson Souza
Voice Technology
http://www.antonioams.com


On Thu, Jun 10, 2010 at 5:59 PM, Antonio Anderson Souza <
antonio at voicetechnology.com.br> wrote:

> Hi Bogdan,
>
> Thank you very much for the explanation, I haven't understood that the
> changes made in the main branch is inherited by the new ones.
>
> I'll change my logic to concentrate the changes in the Branch route, and
> provide a feedback to the list.
>
> Thank you very much!
>
>
> Antonio Anderson Souza
> Voice Technology
> http://www.antonioams.com
>
>
> On Thu, Jun 10, 2010 at 5:13 PM, Bogdan-Andrei Iancu <
> bogdan at voice-system.ro> wrote:
>
>> Hi Antonio,
>>
>> OpenSIPS allows you to do only one TO / FROM change per branch.
>>
>> Changes you do in main Route are inherited by all future branches
>> (including default branch 0).  Changes you do in branch route will
>> affect only that branch
>>
>> Antonio Anderson Souza wrote:
>> > Dear All,
>> >
>> > I'm getting the From/To header inconsistnet after a
>> > uac_replace_from/to, I'm using uac_replace_from/to one time in the
>> > main Route, and and another on a BranchRoute after got a failure in
>> > the first branch.
>> => you do 2 changes for the branch (global change and per-branch change)
>>
>> >
>> > As i could understand in the UAC documentation it's not possible to
>> > call the replace function more then once in a branch, but it's not may
>> > case I'm creating a new branch on the failure route, and calling the
>> > replace from the branch route, follow the script snippet bellow [1]:
>>
>> use also branch route for changing the first branch. and only branch
>> route (if you want to do changes per branch:
>>
>> route {
>>    t_on_failure("1");
>>    t_on_branch("1");
>>    t_relay();
>> }
>>
>> branch_route[1] {
>>   uac_replace_from("", "sip:$avp(s:from)@$fd");
>>   uac_replace_to("", "sip:$avp(s:to)@$td");
>> }
>>
>> failure_route[1] {
>>  t_on_branch("1");
>>  if(!next_routing()) {
>>    t_reply("$err.rcode", "$err.rreason");
>>    exit;
>>  }
>>   t_relay();
>> }
>>
>>
>> Regards,
>> Bogdan
>> >
>> > The request generated for the second GW (Branch route) generates the
>> > From/To header wrongly, the header becomes the first branch value
>> > concatenated with the second branch value, see bellow:
>> >
>> > From: *sip:111133445566 at 192.168.191.105<sip%3A111133445566 at 192.168.191.105>
>> > <mailto:sip%3A111133445566 at 192.168.191.105<sip%253A111133445566 at 192.168.191.105>
>> >sip:221133445566 at 192.168.191.105 <sip%3A221133445566 at 192.168.191.105>
>> > <mailto:sip%3A221133445566 at 192.168.191.105<sip%253A221133445566 at 192.168.191.105>
>> >*;tag=BSHdtMPF6bZNkSKa7YW3PsS1hWtAdLJC.
>> > To: *sip:110001888888 at 192.168.191.105<sip%3A110001888888 at 192.168.191.105>
>> > <mailto:sip%3A110001888888 at 192.168.191.105<sip%253A110001888888 at 192.168.191.105>
>> >**sip:220001888888 at 192.168.191.105 <sip%3A220001888888 at 192.168.191.105>
>> > <mailto:sip%3A220001888888 at 192.168.191.105<sip%253A220001888888 at 192.168.191.105>
>> >*.
>> >
>> > The red values are the first branch values, and the blue values are
>> > the second branch values.
>> >
>> > Does anybody has some idea to help me? Am I making something wrong?
>> >
>> > [1] -------------------------------------------------
>> > route{
>> >   ...
>> >   uac_replace_from("", "sip:$avp(s:from)@$fd");
>> >   uac_replace_to("", "sip:$avp(s:to)@$td");
>> >   ...
>> >
>> >   if (!t_relay()) {
>> >     sl_reply_error();
>> >   };
>> > }
>> >
>> >
>> > failure_route[1] {
>> >   t_on_branch("1");
>> >   if(!next_routing()) {
>> >     t_reply("$err.rcode", "$err.rreason");
>> >     exit;
>> >   }
>> >   append_branch();
>> >
>> >   if (!t_relay()) {
>> >     sl_reply_error();
>> >   };
>> > }
>> >
>> > branch_route[1] {
>> >   ...
>> >   uac_replace_from("", "sip:$avp(s:from)@$fd");
>> >   uac_replace_to("", "sip:$avp(s:to)@$td");
>> >   ...
>> > }
>> >
>> > Best regards,
>> >
>> > Antonio Anderson Souza
>> > Voice Technology
>> > http://www.antonioams.com
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>>
>>
>> --
>> Bogdan-Andrei Iancu
>> www.voice-system.ro
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100611/c99ee81e/attachment.htm 


More information about the Users mailing list