Trying to Configure Grandstream HT-503

I’m trying to follow the instructions here:

Configuring HT-503 On FreePBX

But continue to get Wrong Password errors from Asterisk when my HT-503 attempts to register it’s FXO port. I have entered and reentered the password on both devices. I have tried both the SIP and PJSIP drivers. I have checked the port settings - I have tried ports 5060, 5061 and the device default 5062. Regardless Asterisk continues to give me:

[2016-03-13 13:01:00] NOTICE[13108]: chan_sip.c:27921 handle_request_register: Registration from '<sip:09259991111@>' failed for '' - Wrong password

The FXS port registers just fine. But not the FXO port. Can anyone provide any guidance? I’m tearing my hair out here.

As a debugging step, I deleted the extension and created a new different extension. Before I changed the setting in the HT-503 I continued to see the same message in Asterisk. That is, it looks like although I have created extension 09259991111, my HT-503 isn’t connecting to it.

I finally got my FXS ports to reliably register by moving my LAN connection from the LAN port to the WAN port. This is a pain as the web interface is disabled on the WAN port so you still need to do the initial setup on the LAN port, do the configuration then swap the cable. The FXS ports now register as type=peer.

However I still cannot get the FXO ports to register. I am getting

[2016-03-21 06:08:31] NOTICE[1599] chan_sip.c: Registration from '<sip:09259991111@>' failed for '' - Wrong password

For both FXO ports. Now I got these even when I deleted the PJSIP extensions in Asterisk. This is telling me the HT503 is somehow registering incorrectly. I have tried changing the port to 5061 and 5062.

Does anyone know how to get the FXO ports to register? Should I be using PJSIP or just regular SIP?

Okay, I was able to get the FXO ports to register by setting the extensions to regular SIP and type=peer. I changed the port to the HT503 default of 5062.

Now can anyone tell me if this is acceptable for FXO ports or if PJSIP is required.

I spoke too soon! I swear both ports registered! But now I’m back to the bad password errors. Huh? What? Why does it work once and then not later?

I updated the firmware on both HT-503s. It wasn’t taking before for some reason. Maybe my move to the WAN port has helped. In any case I’m now on the most current firmware.

The FXO ports have re-registered themselves with Asterisk. We’ll see if this remains stable.

The SIP registrations from both HT-503s and both FXO ports was stable all night. I plugged in a phone line to both and was able to get a dial tone and make a call out on both.

So this seems to have boiled down to a firmware issue. It doesn’t help that Grandstream tech support told me it was ok to be on the older release. My original attempts to upgrade the firmware through the LAN port failed. Only after I moved my network connection from the LAN port to the WAN port was I able to upgrade.

Now I need to figure out inbound and outbound trunking and how to get a button on my Grandstream GXP2130s to select each line for dialing as well as displaying inbound calls.