Calls disconnect after seconds (maximum of 12 seconds) in PJSIP Trunk

Hello everyone, recently I set up a PJSIP trunk registration to my provider successfully and all things were working fine, but when I change new FreePBX server and after successful PJSIP trunk registration internal calls between extensions works fine, but all inbound and outbound calls that use the PJSIP trunk have no audio and the calls disconnect after maximum of 13 seconds:

Asterisk Version: 18.16.0
FreePBX:16.0.33

Setup Info for the log file
One of the FreePBX Server is connected to the GPON Modem of the provider and the other is connected to the LAN.

172.x.x.11 = FreePBX Server (LAN Interface)
192.x.x.12 = FreePBX Server (Interface that connect to the GPON)
172.x.x.46 = My Computer where softphone is installed (with extension 5005)
10.x.x.1 = Provider Proxy

Here is traffic flow
Image 001

Here is log output

in the below log output I do not have any idea about the 10.x.x.200 IP

v=0
o=- 1715238124 2097056105 IN IP4 10.x.x.200
s=-
c=IN IP4 10.x.x.200
t=0 0
m=audio 42812 RTP/AVP 0 101
c=IN IP4 10.x.x.200
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-15
a=sendrecv

Here is a log from “rtp set debug on”, I am receiving RTP packet from 10.x.x.200 not from my proxy server (IDK if this is the issue)

Sent RTP packet to 10.x.x.200:52040 (type 00, seq 007436, ts 123680, len 000160)
Got RTP packet from 172.x.x.46:4002 (type 00, seq 007373, ts 123840, len 000160)
Sent RTP packet to 10.x.x.200:52040 (type 00, seq 007437, ts 123840, len 000160)
Got RTP packet from 172.x.x.46:4002 (type 00, seq 007374, ts 124000, len 000160)
Sent RTP packet to 10.x.x.200:52040 (type 00, seq 007438, ts 124000, len 000160)
Got RTP packet from 172.x.x.46:4002 (type 00, seq 007375, ts 124160, len 000160)
Sent RTP packet to 10.x.x.200:52040 (type 00, seq 007439, ts 124160, len 000160)
Got RTP packet from 172.x.x.46:4002 (type 00, seq 007376, ts 124320, len 000160)
Sent RTP packet to 10.x.x.200:52040 (type 00, seq 007440, ts 124320, len 000160)
Got RTP packet from 172.x.x.46:4002 (type 00, seq 007377, ts 124480, len 000160)
Sent RTP packet to 10.x.x.200:52040 (type 00, seq 007441, ts 124480, len 000160)

The provider terminated the call, their SBC gave this reason:

Reason: SIP;text= "Released the session because of netfail by no media"

Possibly something to do with media, but why exactly no idea.

Either the provider has a very badly configured system, or they are providing access over a private network. In the latter case, you need to make sure you have a route to that address.

Given that the signalling is coming from a public address, I suggest the former is the case. symmetric_media, which I think is the default, for chan_pjsip, is the workaround, but that will only work if you receive media, from the correct address, first, which means it is essential that, if you are behind NAT, you have the correct external addresses configured. They should fix their system.

I am not behind behind a NAT device, one of the interfaces of the FreePBX server directly connect to the Providers GPON Modem (no other device in the middle),

Here is the IP address configuration in the FreePBX

Under General SIP Settings

Under SIP Settings (chan_pjsip)

I misunderstood the source address of their traffic as being 172…46. It’s actually going to be 192.168…, in which case you probably need to define a route to 10/8 via the interface connected to the GPON.

Note that the 198 address, in your local networks, is an error, and you don’t need local networks if there is no NAT.

Make sure that direct media is disabled as that won’t work.

Thanks @david55, the problem was I only add route to the proxy IP address, so I thought if I can ping/reach the proxy (and register successfully) everything should work, but when I add route to the whole subnet (10.x.x.x/8) it start to work.

Thanks all again.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.