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

Володимир Іванець volodyaivanets at gmail.com
Fri Mar 15 16:10:23 CET 2019


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/20190315/d177a43a/attachment.html>


More information about the sr-users mailing list