I have installed FreePBX 15 and Asterisk 16 on one of my virtual servers running CentOS 7 64-bit at Linode. This server has a public static IP; therefore I can access both FreePBX and Asterisk on that IP with no problem. I have 2 extensions for testing 112 and 113. I’ve configured them on softphones (3CX Phone on PC and GS Wave on Android) and they register successfully.
The problem is that, when either extension calls the other, there is no audio and the call is dropped on the 30th second with the following message: NOTICE: chan_sip.c:29981 check_rtp_timeout: Disconnecting call 'SIP/100-00000001' for lack of RTP activity in 31 seconds
Since last week, I have been attempting different configuration suggestions found online but nothing worked. Tried enabling and disabling NAT with no luck.
What is the best way to configure FreePBX 15 and Asterisk 16 so that it works when the box is connected directly to the Internet?
I’m posting here because I have tried everything, now I just don’t know what else to do. The same installation and configuration works perfectly on the server in the office. The box in the office connects to a 4G router, to which my PC and mobile also connect. This is the same router through which all these devices connect to the Internet. When I change the IP of the SIP Server, extensions are registered successfull, but calls only last 30 seconds with no audio both ways.
I have tried allowing all necessary ports through firewalld and even disabling the freiwall altogether with no luck. Selinux and IPTables are also disabled.
I look forward to your assistance. Thanks.
As for the current configuration:
sip_general_additional contains the following information (IP is not the real one):
Asterisk SIP Settings: Set the public IP in the external address field, no local networks. On chan_sip set Nat=no, IP=public. Restart asterisk.
For chan_sip extensions, advanced tab, set Nat=yes if not already. You can change the default setting for this param in Advanced Settings so new extensions have it set already. PJSIP extensions require no specific setting.
I have tried that but it didn’t work. Calls are still dropped after 30 seconds.
Under Asterisk SIP Settings, I’ve also tried NAT=no and IP=static (same as External IP) with no luck.
Is there any other place I can look?
If using pjsip extensions, check the advanced tab an ensure direct media = no. Otherwise, I think it likely that your router is interfering. If you have the option of using TLS signalling, that may resolve.
Thank you for your post @billsimon, I’ve been checking my router’s settings to see whether I can find anything that deals with SIP; this I cannot see anything.
Up until 3 months ago, I had another server at Linode that was running CentOS 7 64-bit, Asterisk 13 and FreePBX 14.
On my Android phone I configured one extension on Zoiper app, and this extension was connected successfully and there was no audio issues. I’ve not change the router settings.
One day the Asterisk stops connecting and I decided to re-install.
@lgaetz: wow, I wouldn’t have seen that, thank you for checking. This is something to do with the ISP changing the public dynamic IP as I’m using a 4G router.
Let me try another mobile network.
I’ll post soon.
That’s not correct; it should be set to no. However, that’s not your trouble, because no actual re-invite occurred.
I suggest doing simpler tests. For example, dial *43 (echo test) from each extension. If both fail, try GS wave over mobile data. If you have a working trunk on this system, make an outbound call to your mobile to see whether outgoing audio is working.
Otherwise, use tcpdump on the PBX to capture a failing call between the extensions (including any RTP received and sent). Move the capture file to your PC and analyze it with Wireshark. If you have trouble interpreting it, make a .tgz from the capture file and upload it here.
I’ve asked someone to test using softphones on 2 smartphones that connect to a WiFi with a public dynamic IP that changes rarely and this worked perfectly.
Therefore I can confirm that the issue is not with my configuration but the fact that the public IP from the mobile operator changes more often.
To make sure that it’s working, I’ve used the server that I have at home. Like I mentioned before, this works as expected.
So, I set up an IAX2 trunk between 2 servers (through a VPN tunnel) and an extension from one server could call one from the other with no problem. Call quality was perfect.
I didn’t think about asking people to try for me, as it used to work, so was trying to fix it from my end.