Disable reinvite on PJSIP trunk? Is this possible thru gui?

I’m running FreePBX Distro 10.13.66 (Stable) and have been having problems that are apparently related to session timers and reinvites with res_pjsip. All our outgoing calls drop after 15 minutes and 30 seconds, and we can find no combination of session timer settings that will prevent this.

We’d like to try completely disabling reinvite on the pjsip trunk, but so far haven’t found a way to do this with the FreePBX GUI. Is this possible? If not, what would be the correct way to modify the trunk settings using the various pjsip custom.conf files?

Also, some posts have suggested that “direct_media” may be part of the problem, but we can find no way to manipulate that via the FreePBX GUI, either?

While this doesn’t exactly answer your question, you might consider switching your trunks to Chan-SIP. This should give you much more “fine-grained” control and avoid some of these issues. While PJ-SIP is a good protocol for phones in the local network, there appear to be some issues with it out in “the wild”, especially when it comes to working with trunks.

We were able to solve the 15-minute hangup problem by using the pjsip.endpoint_custom_post.conf file. By adding “timers=no” to the trunk, the calls stopped timing out. I wish there had been a way to configure this in the pjsip trunk settings.

pjsip.endpoint_custom_post.conf

[mytrunk](+)
timers=no

Notice the (+) after the trunk name. It appears to need that to append to the other settings FreePBX manages.

1 Like

Hi Dzone,
When I open the file pjsip.endpoint_custom_post.conf via the GUI through Config Edit, the file is empty, is this normal?

Also, do I replace mytrunk with the name of my trunk? e.g.

[trunk_1245](+)
timers=no

Thanks a lot,
Hugo

Yep. If you have no customization yet, it should be empty.

Yep. If you want to be sure, look at (but don’t edit) pjsip.endpoint.conf and see what the header for your trunk looks like.

I ran into something similar—make some packet traces and take a look at your REINVITEs. I’m seeing intermittent garbage in the “o=” field like “o=IN IP4 0.152:50” seems a classic offset sort of error.

This is causing the other end understandably to respond WTF 400 Can’t Parse and presto dropped.

Sangoma closed bug pointed at Asterisk. Details at https://issues.freepbx.org/browse/FREEPBX-18774 with select packet trace.