[OpenSIPS-Devel] issue of get_redirects, serialize_branches and next_branche for rediect call scenarios
Di-Shi Sun
di-shi.sun at transnexus.com
Mon Apr 23 11:03:35 EDT 2018
All,
We are testing OpenSIPS for simple redirect call scenarios. We expect OpenSIPS to try all Contact headers in the SIP 3xx respectively based on q value. For the SIP 3xx with multiple Contact headers, our configuration works fine. But for the SIP 3xx with one Contact header, it does not work.
Configuration:
failure_route[1] {
if (t_check_status("3[0-9][0-9]")) {
get_redirects("*");
serialize_branches(1);
next_branches();
t_relay();
}
}
>From OpenSIPS source code, we know that
1. get_redirects puts the 1st Contact header URI into RURI, puts the 2nd Contact header URI into the 1st branch, etc.
2. serialize_branches sorts RURI and all branches, and puts them in a AVP.
3. next_branches extracts next hop from the AVP.
When there are multiple Contact headers, all (get_redirects, serialize_branches and next_branch) work fine. When there is only one Contact header, get_redirects still works fine. But since there is not branch, serialize_branches does nothing especially does not set the AVP, then next_branches does nothing too since the AVP is empty.
The questions are,
1. Should serialize_branches still set the AVP when there is one Contact header?
2. According the comments for next_branches, in failure route, all Contact headers should be mapped to branches. Then, is the behavior of get_redirects, which can only be called in failure route block, correct?
If these are the designed behaviors, we can live on it. It is easy to write a working configuration.
Thanks,
Di-Shi Sun
VoIP Routing, Accounting, Security
www.TransNexus.com <http://www.transnexus.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20180423/54e82787/attachment.html>
More information about the Devel
mailing list