There’s nothing wrong with this. There should always be a 401 Unauthorized challenge to your initial REGISTER request. This isn’t showing anything out of the ordinary outside of you have having NAT turned on for what appears to be a device on a local network (therefore not behind NAT).
The older Cisco phones with SIP firmware are notoriously hard to configure for non-Cisco SIP. Search the web and you will see. The 7942 is actually 4th generation of Cisco enterprise phones (first gen being the Selsius phones like the 7910 that could not run SIP at all, second gen being the 7940/7960, then the 7941/7961 that had the Java firmware) but it’s still going to be a pain for you.
I configured a Cisco 7906 for FreePBX about 10 years ago. I remember it not cooperating with NAT. You may have to use SIP ALG on the phone’s network, and disable NAT on the FreePBX extension config, because the Cisco phone (as I recall) didn’t like Asterisk’s NAT handling for some reason.
I also recall there was a character limit in the password. Rather than using the long generated password from FreePBX start with something short and simple until you have gotten the phone working, then tighten it up.
On an unrelated note, one of the cool things about the Cisco phones with SIP is that they have (or had, I haven’t paid attention to Cisco for a while) a way of sending digits to the server as they are pressed during the dialing phase. Asterisk can’t use this but I think it’s a neat idea, sort of mimicking POTS and leaving all the dial pattern matching on the server side.
I configured about 40 7940/794/7942s about 10 days ago (and a single 7910, because I have one) using Chan_SCCP_B. These phones are hard to configure in SIP because the SIP image was there to allow customers to “upgrade” from SIP while Cisco salesdroids convinced people to go away from SIP and go with a more “luxurious” environment like CUCM.
The Chan_SCCP_B driver installs fine with FreePBX, and there’s even an “EPM Like” manager (PhantomVl (Phantom) · GitHub sccp_manager) that works with all the new versions of FreePBX and Asterisk.
The 794x and 796x phones have a ridiculously short (I think around 10 character) password length limit. It’s one of the reasons I started using Chan_SCCP_B in the first place. That, and I had a 7910 I wanted to use.
This is an artifact of the Skinny protocol. It’s kind of a cool feature, but like you said, Asterisk can’t really do anything with it.
One other “feature” of these phones is that they sometimes work better with TCP SIP, so while you are troubleshooting, you might try turning the TCP options on for your inbound SIP port. That might help you
I removed the dial pad and used it for a “lift handset for service” phone hanging on the wall in my reception area. It was kind of retro and really made people stop and look.
Considering we actually never saw a full debug we couldn’t determine what the actual problem is. Like I said, there’s always going to be an initial 401 Unauthorized challenge to the first INVITE attempt. That’s all you’ve shown in your original post. That is normal behavior which means we need to see more of it. Like the INVITE with the auth details being passed in it and the reply to that message.