I have been trying to set up one of my old Cisco 7942G phones (with 8-5-4 firmware) with PJSIP (Asterisk 18.16.0) but have gotten stuck.
The phone is attempting to register but doesn’t get to register (it stops at the 401 Unauthorized leg of registration) - could this be an issue with the phone communicating back to Asterisk to register in some way? While researching from other posts, I did add to my pjsip.conf - force_rport=no and rewrite_contact=no (as below)
Hi @david551 - let me double-check the XML file; I am sure there is a password in there, but I’ll check the XML is correctly formatted etc, and try a few different passwords. I believe for the Cisco 7942 the password requirements in the XML file are:
Must be at least 4 characters long (up to 32)
Can contain letters, numbers, and special characters.
Is case sensitive.
It is currently 12345678 for testing.
Is there any way to confirm that an absent password is the cause before moving on to other potential causes?
One can exclude that it is not getting the 401, as it would repeat the INVITE if it weren’t seeing responses. (I suppose there could be some weird selective loss of 401’s in the network).
Hi @david551 - i will try to pull the logs from the Cisco phone too to an TFTP server; just looking at it now, the INVITE request does cycle (repeat) after the 401 Unauthorized step about every 20 seconds. Does this indicate that 401 response from Asterisk is not being received/processed by the phone correctly?
You’re right, the phone cycles through the register request every second or so trying to register with ‘Register’ > ‘401 Unauthorized’ and then back to ‘Register’. I double checked the XML file and it looks ok, including the password and username.
I pulled the log files (log2 for post-boot logs) and it only indicates this as the very last entry (all others in the log file are I believe expected logs - I can post the entire log if needed).
I am not sure that helps too much as it just says the registration failed within the right amount of time. Do you think this helps better determine a potential issue? Researching more, a thread suggested turning off OPTIONS which I did for the extension with qualify_frequency=0, however, that did not change. I feel the phone is not responding to the 401 challenge perhaps?
hi @david551 - it is super strange, it suddenly registered. This must have been my own fault by not correctly restarting core each time, however, I am going to work my way back and work out which setting/change actually enables the phone to register successfully with this set up (i’ll post back here in case it helps anyone else).
Thanks again for the support - spend a few hours researching this but learnt a load in the process i guess
@jcolp - exactly what happened is I ran ‘core restart now’ at the CLI each refresh, however it appears it was not updating although I did not recall seeing any errors on core restart, yesterday I accidentally kicked the power plug and it obviously rebooted, and then registered. That sucks, but it took me on a deeper dive to learn more on Asterisk and Cisco’s sometimes painful world of CUCM phones not intended for Asterisk