[OpenSIPS-Users] b2b_logic modules and transport protocol (TCP/TLS) conversion
ross at rsmck.co.uk
Wed Dec 21 11:17:18 UTC 2022
I’m hoping I’m missing something obvious here (and explain well enough below what the problem is) - I can get logs etc if required of course.
I’m using the OpenSIPS b2bua module(s) in a scenario where one side of the leg is TCP and the other is TLS as follows.
Host A —TLS---> OpenSIPS —TCP—> Host B
The configuration is something like the below (variables replaced with what they contain for clarity)
b2b_client_new(“c”, “sip:user at hostb.example.com:5555;transport=tcp”, “sip:hostb.example.com:5555;transport=tcp”)
# have also tried the above without the proxy parameter
b2b_init_request(“b2b_ab”, “”, “b2b_ab_request”, “b2b_ab_reply”);
If the incoming A leg is also TCP this works as expected, however if the incoming leg is TLS the connection attempt is made to hostb.example.com on port 5061 (default TLS port, ignoring the 5555 specified in the b2b_client_new call)
The INVITE RURI is correct (e.g. INVITE sip:user at hostb.example.com:5555;transport=tcp) but the Contact header contains a reference to the TLS listening port (e.g. Contact: <sip:caller at opensips.example.com:8555;transport=tls>)
As this is acting as a B2BUA I would have expected the Contact to be the TCP interface on the opensips, and the INVITE to be sent to the URI (and transport protocol) provided in the b2b_init_request in the config.
I’ve also tried setting b2bl_from_spec_param as follows;
However, this doesn’t change the observed behaviour.
Why is the port and transport selection being ignored, or am I missing something?
(All the above is based on opensips 3.3.2, if the behaviour has been changed/corrected in 3.4 then accept my apologies, I’ll be trying that shortly, but wanted to ask here first in case I was missing something obvious!)
Any insight anyone can offer would be much appreciated.
More information about the Users