[OpenSIPS-Users] socket_in(port) vs socket_in(advertised_port)

Ross McKillop ross at rsmck.co.uk
Tue Oct 25 16:11:47 UTC 2022


Hi,

Not sure if this is the intended behaviour or I’m just misunderstanding these parameters… 

Assume a simple config with a few sockets

socket=tcp:10.44.30.12:7700
socket=tcp:10.44.30.13:7730

And setting the outbound socket in route[relay] with force_send_socket(“tcp:10.44.30.12:7700”); 

The relayed SIP message has an ephemeral source port (as you’d expect) e.g. 53235 for this example.

The destination UAS replies to that port on the established connection (so the reply comes to port 53235)

I would have expected $socket_in(port) to contain the actual port that was used (53235) and $socket_in(advertised_port) to contain the port that is advertised as the listening port for that socket (e.g. 7700) - however $socket_in(port) contains 7700 and $socket_in(advertised_port) is null. 

Is this the intended behaviour and, if so, is there any way to access the *actual* destination port that was used (even if it’s ephemeral)?

Any advice anyone can offer would be much appreciated :)

Best,
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221025/cfb51128/attachment.html>


More information about the Users mailing list