SIP sending internal IP instead of Public

Status
Not open for further replies.

Daniel Dussault

Joined
Aug 16, 2018
Messages
10
Reaction score
0
I am configuring a new 3CX system using a SIP Trunk to do the setup before putting a gateway with a PRI

The trunk provider is setup by IP address and instead of receiving the external IP address, it receives the internal one. I modified the Put Public IP in SIP VIA Header and Select which IP to use in 'Contact' (SIP) and 'Connection'(SDP) fields but still no go.

Is there another place to configure the system to tell it to use the external IP or it's linked to my firewall (watchguard)

Thanks
 
Do you use STUN, or a static Public IP? Was the static Public IP used, in the settings when 3CX was first set-up?
 
Static Public IP, i used the static ip setting in the first setup but had to change it because of a conflict with a port used
 
Hello @Daniel Dussault

Where is your provider seeing the local IP? The settings you mentioned should place the public of the PBX in the Invite message. Also is this a supported provider?
 
Not sure where they see it, they just told me they receive the internal IP address.
For the supported provider, not sure as it's a broker that provides me the line so I don't know who they give it to them
 
Without knowing what they want to receive or what they do receive it's hard to see how or if this can be adjusted. Ask them where they want the public IP displayed or run capture of an outbound call and see what the PBX is sending.
 
I know they receive the internal IP address of the 3CX.
If i do modifications to the configuration, do I need to restart any service to make it active ?
 
If i do modifications to the configuration, do I need to restart any service to make it active ?
No restart is required for provider template changes.
 
ok got the log from my provider, replaced the actual addresses by text

INVITE sip:PHONE_AND_PREFIX@SIP_PROVIDER_IP:5060 SIP/2.0
Via: SIP/2.0/UDP INTERNAL_3CX_IP:5060;branch=z9hG4bK-524287-1---7d538531b8984b52;rport
Max-Forwards: 70
Contact: <sip:PUBLIC_IP:5060>
To: "PHONE_AND_PREFIX"<sip:P[email protected]:5060>
 
Have you placed the correct public IP in the " Put Public IP in SIP VIA Header" option of the trunk?
If you have run a capture from the PBX and perform a call. Check the Invite message and see if you can see the public IP there.
 
The Public IP is correct in the field, my supplier receives the internal IP on his side of the INVITE. i'll try to see within my firewall to get a capture
 
Reinstalled the system completely as i'm still in tests and made sure everything was ok from the start and it seems ok. (On Debian)
I checked the activity log of the 3cx and here's what I get:

08/20/2018 3:30:57 PM - Call to T:Line:10000>>SIPPrefix+XXXXXXXXXXX@[Dev:sip:10000@SIPProviderIP:5060] from L:11.1[Extn:XXX] failed, cause: Cause: 404 Not Found/INVITE from SIPProviderIP:5060
 
The error seems to be sent from the providers side so make sure that the number format you are using is correct and acceptable by the voip provider. Also there may be something in the Invite message they don't like so they should be able to tell you what adjustments need to be made.
 
Talked to my SIP provider and 3CX is still sending the internal IP address even if everything is configured

PBX Delivers Audio
Put Public IP in SIP VIA header: it's my public IP address
Select which IP to use in 'Contact' (SIP) and 'Connection'(SDP) fields
configured to use specific address with my Public IP address
 
I would recommend running a Capture from the PBX while making a call. You can do so from the management console by navigating to Dashboard / Activity log and clicking on Capture. Make an outbound call and wait until it fails. Once it does save and open the capture and look for the Invite message to the provider. Expand that and check what IP is sent in the VIA header.
 
I have been doing the capture from the PBX and that's where I see the internal IP address

INVITE sip:484@PHONE_INTERNAL_IP:5060 SIP/2.0
Via: SIP/2.0/UDP 3CX_INTERNAL_IP:5060;branch=z9hG4bK-524287-1---3af05814b27c1a58;rport
 
There should be 2 Invite messages. One from the phone to the PBX and one from the PBX to the provider. The one you posted looks like it is the one from the phone to the PBX.
 
here's the full capture for the call
 

Attachments

You need to take a Wireshark log between your 3CX server and your firewall. If the SIP packets have the external IP in the header at that point then the problem is being introduced by your firewall (probably a SIP ALG).
 
As far as i can see from the provided info the PBX is sending its Public IP to the provider.

If you look the Invites in order, the phone initiates the call to the PBX and of course the phone will use its local IP.
Code:
INVITE sip:STRING_PHONE@3CX_INTERNAL_IP:5060 SIP/2.0
Via: SIP/2.0/UDP PHONE_IP:5060;branch=z9hG4bK711861436
From: "Test" <sip:484@3CX_INTERNAL_IP:5060>;tag=1458439143
To: <sip:STRING_PHONE@3CX_INTERNAL_IP:5060>
Call-ID: 0_2065279221@PHONE_IP
CSeq: 1 INVITE
Contact: <sip:484@PHONE_IP:5060>
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T42S 66.83.0.20
Allow-Events: talk,hold,conference,refer,check-sync
Supported: replaces
Content-Length: 312

Then the PBX will request Authentication from the phone so the phone will re-send the Invite with the authentication and once verified the PBX will send an Invite to the provider

Code:
INVITE sip:STRING_PHONE@SIP_PROVIDER_IP:5060 SIP/2.0
Via: SIP/2.0/UDP EXTERNAL_IP:5060;branch=z9hG4bK-524287-1---9c935765e80f5c31;rport
Max-Forwards: 70
Contact: <sip:EXTERNAL_IP:5060>
To: <sip:STRING_PHONE@SIP_PROVIDER_IP:5060>
From: "SIPNUMBER"<sip:SIP_PROVIDER_IP:5060>;tag=22f3cf27
Call-ID: bbnNyMZ08Wjwc_uuGRByLQ..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE, UPDATE
Content-Type: application/sdp
Supported: replaces, timer
User-Agent: 3CXPhoneSystem 15.5.15060.6 (15060)
Remote-Party-ID: "SIPNUMBER"<sip:SIPNUMBER@SIP_PROVIDER_IP:5060>;party=calling
Content-Length: 267

The PBX sends the Invite multiple times but there is no reply from the provider. With that in mind please make sure that you pass the firewall checker to make sure that nothing is wring there and if everything checks out i would recommend switching to a supported provider to avoid these issues in the future.
https://www.3cx.com/partners/sip-trunks/
 
Status
Not open for further replies.

Forum statistics

Threads
112,095
Messages
590,726
Members
165,071
Latest member
RobertDung