PJSIP - Incoming call is interrupted by freepbx after 30 seconds

Hi, I’m new to the world of voip, my isp moved to voip technology and I had to adapt it.
Unfortunately I have a problem, if I receive a phone call my server after 30 seconds sends a “Bye” through the trunk and to the extension that answered the call.

Unfortunately I do not understand what this problem can be caused by.
I am attaching the log, hoping that someone can understand why the call is interrupted.
If necessary, I attach the pjsip configuration I am using.



When the call is answered, Asterisk sends a 200 OK response to Eutelia, but an ACK is never received. The 200 gets retransmitted for 30 seconds until Asterisk gives up and sends a BYE. Unfortunately, I don’t see anything wrong with the response.

First, check that the 151.xxx.xxx.xxx value in the Contact header of of the response matches your current public IP address from Wind ending .118 . Is this a static IP address? If incorrect, fix it in General SIP Settings / Chan PJSIP Settings. If changed since Asterisk was last restarted, restart it now; Apply Changes sometimes doesn’t update network settings properly.

Possibly your router has a SIP ALG causing trouble. Try turning off any SIP related options.

If no luck, describe your network connection: Wind modem make/model? Configured as router? Separate router (if any) make/model? Special settings for FreePBX? Do you have a way to capture traffic on WAN side of router?

1 Like

I have toticed that Eutelia never replay with a ACK.

The public ip is correct (I’m under nat). My local ip is static. I have also tried with diferent extensions.
I also tried to reboot the server but without luck.

My network diagram:
FTTH [pppoe vlan 835] --> Ufiber Nano G [pppoe vlan 835] —> Zyxel Managed Switch —> Pfsense Router [pppoe vlan 835] --> Lan vlan 1

I have setup pfsense on using static ports (I was having problems also on registration but the guys on IRC helped me with that but not with this.)

If you haven’t already done so, review https://doc.pfsense.org/index.php/VoIP_Configuration .

If that doesn’t help, capture traffic on the WAN interface and post a failing call. See https://doc.pfsense.org/index.php/Sniffers,_Packet_Capture .

Also, your assumption that it’s FreePBX breaking the call may be incorrect. There are several settings in the router that can cause a call to die at the 30 second point. Search the forum for “30 second call” and see how many people have reported this error.

After exactly 30 seconds Asterisk send a BYE to the trunk and to the extension. Both reply with 200.
Now, i’m not sure why freepbx send that out.

Anyway I have reinstalled Freepbx and I have configured it back and looks like that the problem is gone.

I’m testing it right now.

We need a bot that goes through every post and replies something like ‘Don’t use PFsense, it hates VoIP’ or something similar. People always spend hours messing around with it, and they’ll have random problems crop up without any reason at all some point in the future.

Highly not recommended.

I have seen the meme on IRC about pfsense. But you guys should work with them to solve those problems.
You both offer commercial grade equipment!

No. Virtually every single Firewall/Router manufacturer has some quirk or other that requires the user be knowledgeable about configuration. Many (perhaps most) routers have a SIP ALG enabled by default that wreaks havoc on SIP. There are also many NAT implementations that require tweaks or port forwards to make SIP work as expected.

I am not a pfsense user (so only going on second hand information), but the issue as I understand it, is that the default pfsense settings are just plain unfriendly to SIP. This is not an issue specific to Asterisk. I understand (again repeating second hand info) that tickets have been filed requesting changes to the default config, and the devs have opted not to fix. I presume they have a good reason for doing so, most likely they believe that an abrupt change to default settings will create more problems than it would fix.


I understand. it would take a good disclaimer somewhere before users lose their heads. Or a nice guide for those who use pfsense with the most common problems and solutions. (For example, an index that points to various threads)

The problem has returned. No Idea on what to do :frowning:

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