[OpenSIPS-Users] reply_to_via and topmost Via addressing

John Quick john.quick at smartvox.co.uk
Mon Mar 4 16:20:08 EST 2019

Using v2.4.4 OpenSIPS server in a rather complex NAT'd network environment
using containers. Using sngrep to capture the SIP packets on the host

I'm puzzled by what is observed:
An INVITE arrives from a peer via a NAT router and the topmost Via has the
true address of that peer ( and does not have rport defined.
The source address of the request appears to be because there
is a NAT router/interface between the peer and the OpenSIPS Proxy.

INVITE sip:221222 at;line=4yh07htg SIP/2.0
Record-Route: <sip:;lr;ftag=KN32XDQyXv16D;mydg=cb6.db4ef483>
Via: SIP/2.0/UDP;branch=z9hG4bKfa55.ce70bde1.0
Via: SIP/2.0/UDP;received=;rport=1024;branch=z9hG4bKpm809p8y95m4N

The opensips.cfg script does not call the force_rport() or
fix_nated_contact() functions.

...and yet the "100 Giving a try" response is *not* sent to, but
instead is sent to the apparent source address of the INVITE request.

I found a setting in the documentation called "reply_to_via" (CoreParameters
section 2.55) which looked like it might alter this behaviour.
However, when a line is added to opensips.cfg "reply_to_via=1" it causes
syntax error on line and OpenSIPS will not start.

Any help would be much appreciated.

John Quick
Smartvox Limited

More information about the Users mailing list