I am running Freepbx v17.0.19.32 and setup a new PJSIP Trunk using IP authentication. This appeared to be working fine but have noticed that outgoing calls keep being disconnected.
When I look in the logs the only error I am seeing at about the time the call is disconnected is:
2025-10-18 12:30:54] ERROR[263326] res_pjsip_header_funcs.c: No headers had been previously added to this session.
I have no idea what to do about it. The previous trunks all worked fine and I haven’t changed anything other than created the new trunk for inbound and outbound calls with a new provider, so am not clear how this issue could have been introduced.
When do calls get disconnected (immediately, after 32 seconds, after 15 minutes, etc.)?
Are all calls affected? If not, approximate percentage? Is there an obvious pattern, such as calls to a particular carrier are dropped?
Please post the last two seconds of log preceding the error you posted.
Usually it disconnects after about 15 to 30 minutes, the actual time varies. Short calls seem to be okay. It doesnt seem to matter who I call, we only have one provider for our SIP Trunk.
I will capture the logs next time it happens and post the appropriate lines here. I seem to remember there were no other errors in the log, just security nofications about extensions registering etc. This particular error occurred 3 times in the last call. The previous call also had the same error around when it disconnected.
Unless you went out of the way to destroy them, the log for the call discussed should still be there.
The current log is in /var/log/asterisk/full and logs for previous days (a week’s worth by default) should be in /var/log/asterisk/full-202510xx .
It’s a purely cosmetic error, and one that will not be noticed in normal use. My experience of how product managers work, in other organisations, is such errors never get prioritised for fixing by the programmers. FreePBX has quite a few of these.