SOLVED Problem with external IP in contact header

chopsywa

New Member
Sep 23, 2024
9
1
3
63
I have FusionPBX setup internally behind NAT. I have all the relevant internal and external IPs setup and I am using split DNS, so internal resolution goes to the private IP, whilst external resolution goes to the public IP.

The issue I have is that when an internal handset makes a call through the PBX, the switch uses the public IP in the contact header. It uses the correct internal IPs in the SDP, so it is not a simple issue of it not knowing the endpoint is internal. This causes problems as can be expected. Is there something someone can point me at that might mitigate this?

It's running on a pi, so not a packaged version.
Freeswitch version: 1.10.11-release~32bit
FusionPBX version: 5.2.4

Here is the SIP profile status. This seems a bit odd as it is showing listening on the public IP, but the switch is actually on a private IP (192.168.45.144)

1727346486760.png

The following snippet is a dialogue from an affected call. All dialogs have the same issue.

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.45.3:49667;branch=z9hG4bK36762a42123116b3;rport=49667
From: "Mark 102" <sip:102@fusionpbx.hereshow.com.au>;tag=63b2543e4c621634
To: <sip:0418XXXXXX@fusionpbx.hereshow.com.au;transport=udp>;tag=B4mjSZ2KKmNyj
Call-ID: 79af54af0ba17916
CSeq: 5487 INVITE
Contact: <sip:0418XXXXXX@202.90.246.242:5060;transport=udp>
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 224
Remote-Party-ID: "0418XXXXXX" <sip:0418XXXXXX@fusionpbx.hereshow.com.au>;party=calling;privacy=off;screen=no

v=0
o=FreeSWITCH 1727228560 1727228561 IN IP4 192.168.45.144
s=FreeSWITCH
c=IN IP4 192.168.45.144
t=0 0
m=audio 25200 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20