Remote extensions work with CHAN_SIP but not PJSIP

Hello all, I have a weird issue. I have a use case where I need two phones that are hosted outside of the office, and they do not support OpenVPN.

When I went to make a call from the external IP phone it would not work with the PJSIP driver. I simply had no audio. I verified everything was correct in my network configuration and was still having issues with no audio. After 3 days of pulling out my hair, I decided to try the old CHAN_SIP driver and it worked on the first try.

I can verify thoroughly that the following ports are open and are sent to my PBX:

  • 5060
  • 5061
  • 5160
  • 5161
  • 10000-20000

I have also verified my network settings on my FreePBX box, and it also appears to be correct. NAT is set to Yes, I am on the correct subnet. Yet I still have issues.

My network setup is as follows

Any suggestions are greatly appreciated.

Update: I am running FreePBX

Possibly, the Xfinity box has a SIP ALG that’s causing trouble. Can you put it in bridge mode? Or, can you turn off the ALG? Or, is it feasible to put pjsip on a port other than 5060 (you’d have to reconfigure other pjsip extensions, and any pjsip non-register trunks)? Also, make sure that you have turned off SIP ALG on the USG.

Otherwise, let’s look at the traffic to see what is going wrong. At the Asterisk command prompt, type
pjsip set logger on
and make a failing test call from a remote extension. Paste the Asterisk log for the call, which will include a SIP trace, at and post the link here.

Also, please post: Remote site modem make/model? Separate router, if any? Your modem/router make/model?

Hello, thank you for the fast response.

I have attempted turning the xfinity modem to bridge mode. No luck.

In my earlier stages of debugging, I did try changing the port to 6050-6051 to no avail.

Here is the log file.

The modem for my current network is a Xfinity X1 - cgm4140com

As for the remote network information that varies. I have tested on several networks including a hotspot and they do not work. For the time being, I am connected to my hotspot via my iPhone. However, I have also tried my neighbors network with a zyxel-c3000z and a netgear router.

Update: I forgot to mention I cannot turn off ALG on the xfinity modem as it is already off (, but it is turned off in UNIFI.

I also should mention that my netmask for the unifi USG is and from xfinity it is

Ha! I figured it out. It occurred to me that the calls were ending after 30 seconds which was my RTP timeout setting. I changed it to 45 seconds, and it still timed out confirming that the issue was with RTP not reaching the endpoints.

I began another round of google-fu and found this post

This gave me the idea to look play with my network settings more, and instead of using the auto-detected values, I reversed them. So instead of my Local Networks IP list looking like so


I changed it to be


I had audio! But then I did not have any ringing on any of my phones, remote or local. I decided to do a simple fwconsole reload and boom everything started working.

Changes to local networks generally need an asterisk restart on newer Freepbx systems because of the default for pjsip on Freepbx 15 being allow_reload=no.


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