FreePBX 220.127.116.11 / Asterisk 16.15.1 / all modules up to date
I know the fact that calls disconnect after 15 minutes and 30 seconds is a known issue. For example:
and from what I’ve seen from the replies, proposed solutions can be controverted by some. I, too, see calls disconnecting after 15 min. 30 sec., but my question is a little different, and I’m hoping someone can point me in the right direction.
The issues cited above, as far as I can tell, refer to chan_sip. In my case, the Cisco SPA 504G and Cisco SPA 525G2 phones are configured with chan_pjsip, and the VoIP.ms trunks where the issue occurs have been configured as chan_pjsip trunks (altho’ I have additional trunks from other providers, like Flowroute, BulkVS, Call48, and Anveo, some of which are chan_sip and the others chan_pjsip).
I firstly went to VoIP.ms support, and here is a transcript of what they said on this issue:
09:47:54 AM [Edward] Hi, good morning
09:50:44 AM [Stewart] Good morning Edward. I’m seeing an issue with calls spontaneously disconnecting after 15 minutes and 30 seconds. I’m using FreePBX 18.104.22.168 with the latest patches. I am using vancouver.voip.ms chan_pjsip trunk.
This is apparently a known issue https://community.freepbx.org/t/call-disconnects-after-15-minutes-and-30-seconds/39548
Can you advise?
09:52:21 AM [Edward] It is. It happens when the device or system sends in the outbound calls a header to have a session timer in the call. The default is usually 15 minutes, so every 15 minutes the server will send a re-INVITE, which your system has to follow accordingly. If it fails to follow the re-INVITE process then the call gets disconnected a few seconds later
09:52:51 AM [Edward] so basically the issue is the inability of your system to follow the re-INVITE process, usually due to NAT/UDP session time outs
09:53:56 AM [Edward] Alternatively you can disable the session timer
09:54:19 AM [Stewart] So the problem is a configuration issue with my FreePBX, specifically with the trunk configuration.
09:55:06 AM [Edward] Correct. The session timer is usually intended to end stuck outbound calls that did not end correctly
09:55:14 AM [Edward] But you can disable it
09:55:31 AM [Edward] If it is asterisk based, you can add the following line to the peer details
09:57:15 AM [Stewart] Yes, FreePBX is Asterisk based. I’m using chan_pjsip trunks so I’ll try to find where to add the “session-timers=refuse” in the trunk configuration, or I’ll change the trunk to chan_sip.
Thanks for your speedy help.
09:57:58 AM [Edward] You are very welcome!
09:58:17 AM [Stewart] That’s all for now. Have a good day my friend.
After the reply from VoIP.ms support, and after reading through the issues cited above, I added a field at the bottom of Settings==>Asterisk Sip Settings==>Other SIP Settings in the FreePBX GUI to say:
session-expires = 7200
A second fix might be:
Presumably the config changes above will address the issue with calls disconnecting after 15 min. 30 sec. with chan_sip, but can someone point me to a similar setting in the pj_sip configuration to fix this issue?