Multiple sockets and force_send_socket

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple sockets and force_send_socket

Chen-Che Huang
Hi all,

In my testing environment, I have one SIP outbound proxy and one internal SIP server. The SIP outbound proxy listens tls:172.16.1.1:5061, udp:172.16.1.1:5060, and udp:10.1.1.1:5060 while the SIP server listens on udp:10.1.1.2:5060. For the SIP outbound proxy, tls:172.16.1.1:5061 and udp:172.16.1.1:5060 are used for receiving SIP messages from outside clients and udp:10.1.1.1:5060 is used for communicating with the internal SIP server.

When receiving an INVITE from a caller, the SIP outbound proxy uses force_send_socket(udp:10.1.1.1:5060) to relay the INVITE to the SIP server. The SIP server send the INVITE to udp:10.1.1.1:5060 to make SIP outbound proxy send to the callee. The SIP outbound proxy calls force_send_socket(172.16.1.1) to send the INVITE to the callee. In OpenSIPS 1.9, the force_send_socket function will use udp:172.16.1.1:5060 if the callee registers via UDP and use tls:172.16.1.1:5061 if the callee registers via TLS. However, in OpenSIPS 1.11.5, the force_send_socket will use udp:172.16.1.1:5060 even when the callee register via TLS.

How could I config OpenSIPS such that it can use the right socket to send INVITEs to callees based on the UDP or TLS the callee register via? Thanks for any comment.

Best regards,
Chen-Che

Reply | Threaded
Open this post in threaded view
|

Re: Multiple sockets and force_send_socket

Podrigal, Aron
This issue has been raised on this list a number of times, either it is a bug or a feature. However, you need to explicitly provide the `proto` to force_send_socket (based on `transport=tls` and direction of your message). I know this has been documented and will even give you an error in versions 2.x. https://github.com/OpenSIPS/opensips/issues/447
 

On Thu, Sep 24, 2015 at 2:42 AM, microx <[hidden email]> wrote:
Hi all,

In my testing environment, I have one SIP outbound proxy and one internal
SIP server. The SIP outbound proxy listens tls:172.16.1.1:5061,
udp:172.16.1.1:5060, and udp:10.1.1.1:5060 while the SIP server listens on
udp:10.1.1.2:5060. For the SIP outbound proxy, tls:172.16.1.1:5061 and
udp:172.16.1.1:5060 are used for receiving SIP messages from outside clients
and udp:10.1.1.1:5060 is used for communicating with the internal SIP
server.

When receiving an INVITE from a caller, the SIP outbound proxy uses
force_send_socket(udp:10.1.1.1:5060) to relay the INVITE to the SIP server.
The SIP server send the INVITE to udp:10.1.1.1:5060 to make SIP outbound
proxy send to the callee. The SIP outbound proxy calls
force_send_socket(172.16.1.1) to send the INVITE to the callee. In OpenSIPS
1.9, the force_send_socket function will use udp:172.16.1.1:5060 if the
callee registers via UDP and use tls:172.16.1.1:5061 if the callee registers
via TLS. However, in OpenSIPS 1.11.5, the force_send_socket will use
udp:172.16.1.1:5060 even when the callee register via TLS.

How could I config OpenSIPS such that it can use the right socket to send
INVITEs to callees based on the UDP or TLS the callee register via? Thanks
for any comment.

Best regards,
Chen-Che





--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Multiple-sockets-and-force-send-socket-tp7599170.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Aron Podrigal
-
'1000001', '1110010', '1101111', '1101110'   '1010000', '1101111', '1100100', '1110010', '1101001', '1100111', '1100001', '1101100'

P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Multiple sockets and force_send_socket

Chen-Che Huang
This post was updated on .
Hi Aron,

I have modified the config with the addition of
if ($(ru{uri.transport}) == "tls")
    force_send_socket(tls:172.16.1.1:5061);
else
    force_send_socket(udp:10.1.1.1:5060);
to fulfill my purpose. Thanks for your answer.

Best regards,
Chen-Che