Page tree

Applies to VoipNow 3 and higher!

This article describes what happens when your server is located behind the NAT and apparently you can’t receive any calls, recommending a quick solution that can fix the problem.

Step-by-step guide

In our example, the VoipNow server is located behind NAT and the deployment infrastructure is set on NAT with the correct configuration for public and local IP addresses. Some requests will be received by the SIP server to a port number different to 5060.

STEP 1: We made a call from +16462050525 to a server deployed as described above.

INVITE request to 59595959

INVITE sip:59595959@XX.XX.XXX.XXX:62497 SIP/2.0

Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK79b21b6f;rport

Max-Forwards: 70

From: "+16462050525" <sip:+16462050525@YY.YY.YY.YY>;tag=as69204759

To: <sip:59234740@XX.XX.XXX.XXX:62497>

Contact: <sip:+16462050525@YY.YY.YY.YY>

Call-ID: 30ef100f2e053af72ffbe6c61dcceda3@YY.YY.YY.YY

STEP 2: As you can easily see in the INVITE request above, the port number where the request is sent is 62497. This is why the SIP server rejects the call assuming that the request is not destined to the called server.

STEP 3: Analyze the SIP server log.

#tail -f /var/log/kamailio/kamailio.log
Jun 21 07:56:24 localhost /usr/sbin/kamailio[4122]: DEBUG: Incoming request is not destined to the register server.
Jun 21 07:56:26 localhost /usr/sbin/kamailio[4118]: DEBUG: Incoming request is not destined to the register server.
Jun 21 07:56:27 localhost /usr/sbin/kamailio[4124]: DEBUG: Incoming request is not destined to the register server.

STEP 4: The caller receives a response similar to the one below.

SIP/2.0 603 Declined

Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK79b21b6f;rport=5060

From: "+16462050525" <sip:+16462050525@YY.YY.YY.YY>;tag=as69204759

To: <sip:59595959@XX.XX.XXX.XXX:62497>;tag=d59693969ebb5dd7ed15bd6ee6eb1305.44be

Call-ID: 30ef100f2e053af72ffbe6c61dcceda3@YY.YY.YY.YY

Solution

Log in to VoipNow web management interface as admin and go to Unified Communication → Zero Priority.

Open the SIP tab and add the IP address of the router in the Accept SIP requests to domain field. Also, in the Important SIP Domains, set the public IP address of the router (which is in front of the VoipNow server) without a port number.

This way all requests coming to a different port number will be accepted.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.