PJSIP Error with NO PJSIP configured

Hello All,

I have a situation where randomly the PBX decides that calls won’t go through to an extension, upon checking the logs I see the below error.

res_pjsip_header_funcs.c:461 func_read_header: This function requires a PJSIP channel

At the time it was running FreePBX14 with Asterisk 13.
I decided to test again and switched to both Asterisk 14 & Asterisk 15 with the same results.
We are also current on all updates. 12.7.5-1805-3.sng7

I confirmed that ALL extensions including this one were configured as CHAN-SIP and not PJSIP and all trunks are also CHAN-SIP, at no point am I expecting anything to communicate over PJSIP.

Any ideas how I can get this to work properly again?

Thanks!

Do you have the PJSIP driver enabled?

This is normal and, as far as I know, it’s harmless. I highly doubt this is the cause of your endpoint not ringing.

When I switched to PJSIP being the primary for a certain server with CHAN_SIP still on I was getting the opposite error. I almost wonder if it sends headers for both channels at the same time when both are installed so one automatically fails.

Bingo.

1 Like

Hello,

The negative affect is the phone doesn’t ring and calls for the phone go directly to voicemail :frowning: .
When first installed the PBX about 8 months ago, default was PJSIP and I flipped it to CHANSIP, everyting was then created as CHANSIP ( Trunks & Extensions ) CHANSIP was changed to 5060 and PJSIP to 5160.

Never had this issue until yesterday.

I didn’t see anywhere to disable PJSIP so if it is sending both, not sure how to stop that.

Thanks for the responses, and looking forward to the magic answer .

***** after revisting the advanced menu, I saw SIP CHANNEL DRIVER option and there I did see BOTH, so I changed it to CHANSIP, I’ll post back shortly.

Pjsip can be disabled in advanced settings, but your problem doesn’t seem to be related to it.

Post logs of a failing call.

I am moving everything away from Chan_SIP to PJSIP because of major vulnerabilities in it that allow people sending random packets to our server to make international calls, among many other reasons.

It might be best long term to figure out what is going on with PJSIP.

1 Like

Since the log is a moving target with lots of calls, I cant get a clean call log for just that extension.
If there is a way from within asterisk to do that I would appreciate the info.

Basically this is the error:
[2018-07-06 09:58:07] ERROR[9281][C-00000048] pbx_functions.c: Function PJSIP_HEADER not registered
[2018-07-06 09:58:07] ERROR[9281][C-00000048] pbx_functions.c: Function PJSIP_HEADER not registered
Which makes the extension look busy and goes to voicemail.

You’re moving away from chansip despite your problems with cpu spikes in pjsip, or has this since been resolved?

I assume the adtoptek in the Asterisk forum is you:

Do a sip debug and paste the output.
sip set debug peer xxxx

We have narrowed down things and it doesn’t seem to be PJSIP but asterisk (MySQL might be involved too). PJSIP actually uses a bit less CPU when compared to Chan_SIP.

Ok thanks.
If you wouldn’t mind @adtopkek , please keep updating that thread with your findings.
We are concerned about moving larger installs to pjsip due to that and other things, and also concerned about the performance of Asterisk/Freepbx on larger 300+ installs in general.

I was talking about asterisk and not specifically PJSIP in that post. The server was originally a chan_sip that we are slowly converting to PJSIP.

We have under 1000 extensions on one server and the BLF reloads after freepbx loads the dial plan into asterisk cause problems on both chan_sip/pjsip.

After a lot of testing PJSIP seems to have about a 5-10% performance increase (We have converted about 15% of our 1000 extensions and noticed this so far) on our server compared to Chan_SIP (Have both enabled so might save more if Chan_sip is off). Not to mention it fixes 2 exploits we have been dealing with when using chan_sip. The added features are nice too. However it seems like “MWI Subscription Type” (Advanced ext settings) doesn’t like being on auto for our server so we set it to Unsolicited, saves some more CPU cycles so we are ok with that.

@avayax
No that’s not me… wasn’t aware of the spikes since I have kept everything on CHANSIP on all the systems I support,. but good to know.
Thank you!

#1 - Thanks everyone for helping me with this. It’s still an issue so here is more info:

Tech details, I do have the SIP Channel Driver at the moment to chan_sip ( NOT BOTH )
Asterisk is 14.7.5

Call from outside or from another extension, same issue.

Here is the debug info:

Reliably Transmitting (no NAT) to 10.19.10.85:49001:
OPTIONS sip:[email protected]:49001 SIP/2.0
Via: SIP/2.0/UDP 10.19.10.10:5060;branch=z9hG4bK5d5da0a1
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as785a0bd1
To: sip:[email protected]:49001
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.3.6(14.7.5)
Date: Fri, 06 Jul 2018 19:40:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:10.19.10.85:49001 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.19.10.10:5060;branch=z9hG4bK5d5da0a1
From: “Unknown” sip:[email protected];tag=as785a0bd1
To: sip:[email protected]:49001;tag=873880771
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Supported: replaces, path, timer
User-Agent: Grandstream GXP2170 1.0.9.25
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

I did see the asterisk PJSIP errors again, no extension associated in the error itself.
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:608 ast_func_read: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:651 ast_func_read2: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:608 ast_func_read: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:651 ast_func_read2: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:608 ast_func_read: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:651 ast_func_read2: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:608 ast_func_read: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:651 ast_func_read2: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:608 ast_func_read: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:651 ast_func_read2: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:608 ast_func_read: Function PJSIP_HEADER not registered
[2018-07-06 14:50:00] ERROR[1087][C-000005d7]: pbx_functions.c:651 ast_func_read2: Function PJSIP_HEADER not registered

We need the sip debug of a failed call.

You provided an options message only.
That’s not from a call.

the sip debug is there in my last post…
Let me try again within code blocks here.

Reliably Transmitting (no NAT) to 10.19.10.85:49001:
OPTIONS sip:[email protected]5:49001 SIP/2.0
Via: SIP/2.0/UDP 10.19.10.10:5060;branch=z9hG4bK5d5da0a1
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as785a0bd1
To: sip:[email protected]:49001
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.3.6(14.7.5)
Date: Fri, 06 Jul 2018 19:40:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:10.19.10.85:49001 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.19.10.10:5060;branch=z9hG4bK5d5da0a1
From: “Unknown” sip:[email protected];tag=as785a0bd1
To: sip:[email protected]:49001;tag=873880771
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Supported: replaces, path, timer
User-Agent: Grandstream GXP2170 1.0.9.25
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

You are adding debug for SIP OPTIONS, which is not relevant in any way to a call. You need to include the SIP INVITE being sent (if there is one) to the phone.

Sorry, how can I capture the sip information related only to the specific extension, when there are other users on the system there is just too much junk on the screen to filter out properly the details.

Thanks!