Hi Ross,

before creating the client, try to force the outbound socket to a TCP one https://opensips.org/Documentation/Script-CoreVar-3-2#socket_out

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 12/21/22 1:17 PM, Ross McKillop via Users wrote:
Hi,

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_server_new(“s”);
        b2b_client_new(“c”, “sip:u...@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:u...@hostb.example.com:5555;transport=tcp) but the Contact header contains a 
reference to the TLS listening port (e.g. Contact: 
<sip:cal...@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;

        modparam("b2b_logic", 
"b2bl_from_spec_param”,”sip:opensips.example.com:5060;transport=tcp”)

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.

Best,
Ross
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to