Asterisk Session Timers!

Well… this is an interesting one I’ve been battling with all weekend that I thought I’d share with you…

I’ve got a couple of FreePBX customers that use to have their phone systems onsite… I decided to move their FreePBX Virtual Servers (installed on VMware vSphere 6) back to my newly build Data Centre at my head office…

After doing this my customers started to complain that Incoming calls were dropping after 15mins exactly and Outgoing calls were dropping after 30mins… I took a look into the problem and correcly so… they were!

After loads of digging around the Trunk Settings, calling up the SIP provider (GammaTelecoms) blaming them… I found a setting from running the command from the Asterisk Debug “asterisk -rvvv” sip show settings > Global Signaling Settings:

Session Timers: Accept
Session Expires: 1800 (30mins)

Hey presto!!! I’ve found the issue… the only thing been that it doesnt happen on my own office FreePBX setup which is setup exactly the same way as my customers… APART FROM ONE MAJOR THING…

My customers desk phones connect from their office via small micro server that I’ve installed PFSense on and created an OpenVPN link back to my main PFsense Router at my Data Centre to which their FreePBX phone server sit…

The network topology looks like this for my OpenVPN customers…

PFSense DC Subnet > Connected to the Customer Site PFSense Subnet where the phone reside over OpenVPN link >

Asterisk/FrePBXServer ( - External IP of the Asterisk/Pfsense server)

Phones at customer site - 50

For some strange reason the desk phones SIP sessions seem to be ended within the 30mins “sessions-timers 1800 seconds/30mins” window causing Asterisk to thing the phone isn’t on the network anymore and cuts the call off at the 30min mark…

Now… when you change the “session-timers” setting from “Accept” to “Refuse” this problem goes away and calls can last forever until either side hang up the call… You put this setting in the following file in the following asterisk location:


Just thought I’d share this one in case anyone else ends up banging their heads against the desk like I’ve been doing for the last 3 days! :slight_smile:


Thank you💚

You can also put the session-timers=refuse in the Advanced SIP settings in the SIP settings UI page.


1 Like

I agree with you. My inbound call is drop after 60 seconds.
I had changed setting extension.
Go to a extension => Advanced.

I do not recommend this. Better to fix the SIP signaling problem (NAT, SIP ALG) that is interfering with the re-INVITEs.