Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Wrong IP getting placed in Contact field on 200 OK response

Discussion in '3CX Phone System - General' started by lemuppet, Feb 7, 2013.

Thread Status:
Not open for further replies.
  1. lemuppet

    Mar 23, 2010
    Likes Received:

    I have a 3CX system that is sat behind a correctly (i am sure this is OK) NAT'd firewall (DrayTek 2920). The firewall is there as there are 2 x WAN both used for SIP inbound. One is a private SIP network provided by our SIP trunk provider (this has certain numbers incoming on it). The second is an open internet connection that also has SIP forwarded on the right port numbers and is used by a second provider for incoming numbers. Neither provider can provide all of the numbers hence why we have two.

    The 3CX system is therefore sat on the inside of the network and has an internal address of and needs to effectively send outbound traffic depending on the provider (which drives the routing through WAN1 or WAN2 on the router).

    This all seems fine, traffic is going the right way outbound, etc. and we have voice on both provider 1 connections and provider 2 connections.

    These problems started when we moved the WAN connection behind the firewall (before it was connected directly to the NIC of the server) which is also when we added the second provider. Now when I get an inbound call on Provider 1 if it disconnects from the calling phone I do not get a BYE signal. It also disconnects after 30 seconds regardless and I can see no further SIP traffix is coming in on port 5060 after the first invite. Provider 2 however is fine.

    I have compared provider 1 and provider 2 outgoing SIP packets using Wireshark and the Log viewer in 3CX and have been able to summise the following:
    LogViewer - Provider 2 has a line after the inbound routing rule is identifed that states the IP is not local, it then has a line that starts Dev(4) sip: xxxxx@xxx.xxx.xxx.xxx:5060 PBX contact is public IP.
    LogViewer - Provider 1 has the same line after the inbound routing rule is identifed that states the IP is not local, it then has a line stating the Exact match is not found, first IP of the interface is selected: xxx.xxx.xxx.xxx, it then has a different line that starts Dev(3) sip: xxxxx@xxx.xxx.xxx.xxx:5060 PBX contact is local IP.
    Wireshark seems to confirms this fact and shows the 200 OK message that is sent back to the inbound SIP server as a private IP on provider 1 and the public IP on provider 2.

    Does anyone know why
    is being triggered as the 2 providers are almost identical and both match the inbound rule correctly?

    Secondly - even though I have specified a different contact IP to be sent in the outbound parameters of the provider (and the regidtration contact IP, the IP from the network settings is the one that is getting sent on a reply as the contact field in the SIP header.

    Any help would be much appreciated!

Thread Status:
Not open for further replies.