Res_pjsip_exten_state.c: Extension state subscription failed error on Sangoma Phones configured with Endpoint

I upgraded from the Edge Endpoint 13.0.104.5.? to 13.0.104.6.3 this morning. This was the only change. The asterisk logs now show:

res_pjsip_exten_state.c: Extension state subscription failed: Extension *992*1*3008 does not exist in context 'from-internal' or has no associated hint

Here 3008 is the extension number and I see a line for each extension setup on a Sangoma phone on the system. Other devices are not showing these errors. I’m guessing this is something to do with the Restapps system trying to talk to the phone.

Core Show Hints in Asterisk doesn’t show those hints.

All of the Sangoma phones are setup using PJSIP extensions. If I change the extension back to SIP then the error doesn’t appear but core show hints still doesn’t show the hint in the above error. Phones are running firmware 2.0.4.24.

These errors have only started showing since installing Endpoint 13.0.104.6.3 today and were not present in the previous 13.0.104.5.x releases. The change log for the latest release doesn’t say that anything significant was changed:

13.0.104.6.3: Remember tab on Sangoma template.

This looks like a bug. Can anyone confirm before I log one in the system?

You can confirm by rolling back the module.

Thanks Andrew, I hadn’t rolled back because the rollback options are pretty old 13.0.102 is the most recent. Even though I’m on the Edge track, the rollback options seem to show release versions only.

Anyway, I’ve rolled back to 13.0.102 and I’m still seeing this issue so guess it was unrelated and may have been an update I did yesterday. Any suggestions on how to troubleshoot this?

So I’ve uninstalled and reinstalled Phone Apps and Rest API - no change
I disabled the Firewall - no change
I was using HTTPS for both the provisioning and phoneapps protocols. I decided to simplify things and move them both back to HTTP. I then updated the Sangoma Portal and factory reset the phones. Everything is configured again and the error is now gone.

I’ve updated to 13.0.104.6.3 and still no errors.

Its getting late here so I’ll try moving things back to HTTPS tomorrow and see if I can get the error to come back.

I am still seeing these errors in the httpd/error_log whenever I access the restapps from the phone. The apps work so not sure if its an issue or not:

[Wed Jan 25 20:11:07 2017] [error] [client 10.40.27.18] client denied by server configuration: /var/www/html/restapps/restapps [Wed Jan 25 20:11:17 2017] [error] [client 10.40.27.18] client denied by server configuration: /var/www/html/restapps/presencestate [Wed Jan 25 20:11:23 2017] [error] [client 10.40.27.18] client denied by server configuration: /var/www/html/restapps/voicemail [Wed Jan 25 20:11:27 2017] [error] [client 10.40.27.18] client denied by server configuration: /var/www/html/restapps/contactmanager

Corresponding entries from the httpd/access_log file are:

10.40.27.18 - - [25/Jan/2017:20:11:07 +1000] "GET /applications.php/restapps/main?user=3007 HTTP/1.1" 200 2308 "-" "Sangoma S700 2.0.4.24 00:50:58:50:13:60" 10.40.27.18 - - [25/Jan/2017:20:11:17 +1000] "GET /applications.php/presencestate/main?user=3007 HTTP/1.1" 200 551 "-" "Sangoma S700 2.0.4.24 00:50:58:50:13:60" 10.40.27.18 - - [25/Jan/2017:20:11:23 +1000] "GET /applications.php/voicemail/main?linestate=$$LINESTATE$$&user= HTTP/1.1" 200 439 "-" "Sangoma S700 2.0.4.24 00:50:58:50:13:60" 10.40.27.18 - - [25/Jan/2017:20:11:27 +1000] "GET /applications.php/contactmanager/main?linestate=$$LINESTATE$$&user= HTTP/1.1" 200 819 "-" "Sangoma S700 2.0.4.24 00:50:58:50:13:60"

Not sure why these requests would be denied. fwconsole chown doesn’t pick up anything.

The phones are all local to the FreePBX installation which is a fully patched distro - 10.13.66 branch.

Those entries do not match.

Those are the only lines in each log with matching timestamps.

As a test, it tailed each log file before and after accessing the voicemail app on the phone. The error_log and access_log files get precisely one line added:

[Thu Jan 26 08:11:34 2017] [error] [client 10.40.27.18] client denied by server configuration: /var/www/html/restapps/restapps/voicemail

10.40.27.18 - - [26/Jan/2017:08:11:34 +1000] "GET /applications.php/voicemail/main?linestate=$$LINESTATE$$&user= HTTP/1.1" 200 439 "-" "Sangoma S700 2.0.4.24 00:50:58:50:13:60"

The app works though.

After submitting a ticket to Sangoma support we’ve tracked down the cause of the error messages. For some Phone Apps such as Contacts and Apps Endpoint is assigning a hint to the line keys but these apps don’t make use of the LEDs on the line keys and the hint is never being registered in Asterisk. If chan_pjsip is used it reports errors as per the original post while if the phones are configured to use chan_sip it just seems to be ignoring the problem at the default log levels. More details here:

http://issues.freepbx.org/browse/FREEPBX-14218

Still not sure what is causing the ‘Client Denied by Server Configuration’ errors yet…

Has there been a fix to this? I am on FreePBX Version-14.0.5.25, using the XLite software (Version 5.5.0, Build 97576) phone. I do not see this NOTICE on the Polycom, Grandstream or Yealink phones.

Turns out, my software phone had the extensions that were deleted from the PBX still in its address book. Once the extension was deleted on the soft-phone, the messages went away on the PBX server.