[SR-Users] event_route tm:branch-failure and onreply_route shared variables

Володимир Іванець volodyaivanets at gmail.com
Mon Mar 18 11:43:25 CET 2019


I found much better description of the problem here
https://lists.kamailio.org/pipermail/users/2008-August/019070.html.
Also I figured that calling *reg_fetch_contacts* and saving appropriate
*$(ulc(callee=>addr)[$var(i)])* in
*event_route[tm:branch-failure:FAILURE]* will
allow to match *t_on_reply("REPLY")* by *$T(ruid)*.

пт, 15 бер. 2019 о 17:10 Володимир Іванець <volodyaivanets at gmail.com> пише:

> Hello!
>
> I have Kamailio setup with registrar configured to allow multiple
> registrations. *branch_route[MANAGE_BRANCH]* contains
> *t_on_reply("REPLY")* and *t_on_branch_failure("FAILURE")*.
>
> *event_route[tm:branch-failure:FAILURE]* is used to do some logic, store
> information in htable and in the end it calls *t_relay* function. This
> creates new branch.
>
> Replies for this branch go to* onreply_route[REPLY]*. The problem is that
> I can not find appropriate variable that would be available in both
> *event_route tm:branch-failure* and *onreply_route*. I need it to get
> saved data from htable. $T_reply_ruid is available in first one but not in
> second. $T_branch_idx obviously changes so it can not be used. Some
> registrations do not have *Received* value so source IP address and ports
> can not be used. *Address* value can be compared with *Contact* header
> from responce tacket but it is so long that it looks like it's not optimal
> way to do.
>
> What interesting is that $T_reply_ruid is accessible in original replies
> for branches that have not failed.
>
> Does anyone know what variable can be used in this case or how to make
> sure that $T_reply_ruid will be set?
>
> Thanks a lot!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190318/6f94176f/attachment.html>


More information about the sr-users mailing list