[OpenSIPS-Devel] [opensips] Possible bug in 2.1 implementation of force_send_socket (#690)

petekelly notifications at github.com
Wed Nov 4 12:29:56 CET 2015


I am trying to relay a SUBSCRIBE message onwards to another proxy using the force_send_socket() function to force the use of TLS.

The relay is working as expected, however OpenSIPS is not populating the Record-Route headers correctly on relay. Instead of using the TLS port it is putting the TCP listen port into the Record-Route:

e.g.

OpenSIPS is configured thusly:

~~~~~
listen=udp:1.2.3.4:5060
listen=tcp:1.2.3.4:5060
listen=ws:1.2.3.4:10080
listen=tls:1.2.3.4:5061
~~~~~

I am using force_send_socket to ensure the relay uses tls:

~~~~~
force_send_socket(tls:1.2.3.4:5061);
~~~~~

OpenSIPS sends out the request from port 5061(and via TLS) as expected

~~~~~
T 2015/11/04 12:14:30.294673 1.2.3.4:5061 -> 5.6.7.8:41904
~~~~~

However the Record-Route that OpenSIPS adds is seemingly using the incorrect port, and indeed I see inbound TLS requests to port 5060 afterwards

~~~~~
Record-Route: <sip:1.2.3.4:5060;transport=tls;r2=on;lr;ftag=79mm8laopq>.
~~~~~

Is this a misunderstanding on my part about how to use force_send_socket, or a potential bug?




---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/690
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20151104/21aafedd/attachment.htm>


More information about the Devel mailing list