[OpenSIPS-Users] $(avp(attr)[$T_branch_idx]) is NULL for second INVITE. How to solve it ?
Rodrigo Pimenta Carvalho
pimenta at inatel.br
Tue Aug 29 11:05:28 EDT 2017
Dear SIPusers,
In my project I use to keep a valuable information in table location. This is about the state of a subscriber's localization.
I have to read such information for the callees, every time a new branch is created and every time a INVITE is answered with SIP OK.
So, my OpenSIPS configuration has something similar to the following code:
1 route{
2 ... // hidden code for simplification.
3 lookup("location","m")
4 ...
5 route(relay);
6 }
7 route[relay]{
8 if (is_method("INVITE")) {
9 ...
10 t_on_branch("per_branch_ops");
11 t_on_reply("handle_nat");
12 t_on_failure("missed_call");
13 }
14 ...
15 }
16 branch_route[per_branch_ops] {
17 ....
18 $(avp(attr)[$T_branch_idx])
19 ...
20 }
21 onreply_route[handle_nat] {
22 ...
23 $(avp(attr)[$T_branch_idx])
24 ...
25 }
26 ...
In a determined call, when the OpenSIPS receives the INVITE and then a SIP OK (200), the code gets right value in lines 18 and 23.
In such call, the SIP OK (from callee) offers a kind of video that the caller can't support. In this case the caller sends another SIP INVITE with inactive video (SDP).
In this moment, OpenSIPS gets this second INVITE and create a new branch.
However, for this new branch, lines 18 and 23 give me NULL for $(avp(attr)[$T_branch_idx]).
How to solve this issue?
Any hint will be very helpful!!
Best regards!
P.S.: I'm not expert in SIP.
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170829/63f6fd68/attachment-0001.html>
More information about the Users
mailing list