FreePBX | Register | Issues | Wiki | Portal | Support

PJSIP - Incoming call is interrupted by freepbx after 30 seconds

(Nicolò Veronese) #1

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 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?

(Nicolò Veronese) #3

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 .

If that doesn’t help, capture traffic on the WAN interface and post a failing call. See,_Packet_Capture .

(Dave Burgess) #5

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.

(Nicolò Veronese) #6

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.

(Rob Thomas) #7

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.

(Nicolò Veronese) #8

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!

(Lorne Gaetz) #9

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.

(Nicolò Veronese) #10

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)

(Nicolò Veronese) #11

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