Configuring Grandstream HT503 As Trunk

I’ve got two HT503s for which I’m trying to configure the FXO ports as trunks. I’ve setup two trunks in FreePBX and configured two usernames and passwords. But for one of the HT503s I see in the Asterisk CLI a repeating message:

NOTICE[1584]: chan_sip.c:28353 handle_request_register: Registration from '<sip:usernameIset@ht506hostname>' failed for '10.0.2.22:5062' - Wrong password

I do not get this from the other HT503. I have set and reset the password in both FreePBX and in the HT503.

Maybe related, the home screen on both HT503s continue to show “Not Registered.”

Any Ideas?

Did you set and reset the port (5062) the device is expecting to use in your “trunk”?

No, I never changed it. In either HT503. I left it at the default 5062. As you can see from the message the HT503 is connecting. Just some sort of weird password error that I don’t understand.

Surely the SIP default is 5060 (or 5061 if you are hampered with pjsip) those devices usually use a different port for each FXO/FXS you will need to configure your Asterisk endpoint to suit.

I changed the SIP port in the Grandstream from it’s default 5062 to 5060 and now it’s using a random high port instead of 5060:

[2016-03-07 19:45:59] NOTICE[1584]: chan_sip.c:28353 handle_request_register: Registration from '<sip:userid@devicename>' failed for '10.0.2.22:19039' - Wrong password

That is normal, now find the correct authority for the account you are trying to register.

Two things. One, I found the “port=5062” setting in the FreePBX trunk screen. So I’m trying that. And by authority do you mean user and password? Yea, I’ve checked and double checked.

Now the wiki comes up with this for the HT503:

Configuring the HT503

And I realize I haven’t setup an extension yet. But it says to use chan_pjsip and somehow chan_pjsip is disabled.

If anyone is successfully using an HT-503, please let me know. I have now tried upgrading to Asterisk 13 so I could create pjsip extensions instead of plain sip extensions. I still cannot get the FXO ports to show as registered.

As I noted in previous posts, I am still getting “wrong password” messages:

[2016-03-12 11:13:22] NOTICE[13108]: chan_sip.c:27921 handle_request_register: Registration from '<sip:[email protected]>' failed for '10.0.2.22:5061' - Wrong password

I have entered, re-entered and changed the password in both FreePBX and the HT503. I have made sure changes are applied. I have rebooted the HT503. Note I changed the port to 5061 since we’re now on pjsip. Still no help.

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 by default 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:[email protected]>' failed for '10.0.2.22:5061' - 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 had to read back through to figure out what you were asking.

If you are getting the FXO -> SIP connections to connect reliably, I’d say you’re probably in good shape. Is there some other problem you are trying to address?

In “the large”, you shouldn’t need PJ-SIP for anything if you have Chan-SIP working. At some point, you will need to revisit your configuration, but I think you’re good right now. There are a few new features of PJ-SIP, but I doubt your interface box is going to need any of those.

The wiki post here on setting up the HT503 directs you to use PJSIP in setting up the FXO ports. That’s all. But I can’t get that step to work. So I’m asking if that’s necessary. The registration looks solid. I haven’t tried any calling yet. That’s the next step.

If Chan-SIP is working for you and PJ-SIP isn’t, I’d recommend Chan-SIP. I can’t think of a reason why PJ-SIP would be better, except that it’s newer.

Further testing is needed. I just don’t know why the author of the wiki article recommended PJ-SIP if it won’t register. Maybe an earlier firmware rev worked and something was removed.

Damn, I spoke too soon. I swear they were registered. I just checked and the two FXO ports went off-line. Huh? Why?

Back to the “Wrong Password” error. But I didn’t change the password. It worked once! And for both of them!

That, sir, is effing spooky. If you power cycle the GrandStream, what happens?

I just downloaded the manual for your gizmo. One FXS and one FXO port. Both can be connected to SIP accounts as separate extensions (in Asterisk, they should be).

Is it possible that you are trying to use the same SIP extension for both ports? That’s not allowed by Chan-SIP but may be allowed by PJ-SIP (which might explain the reason the original author suggested PJSIP). That might eventually cause the “incorrect password” that you are seeing.

This thing is crazy. You realize that it’s “pretty much” Asterisk already, right? I’m not sure what you’re doing that needs this. A simpler (and probably cheaper) solution would be to pick up a single port FXO card and install it in your server. Then you skip over all of the SIP-to-SIP trunking hostility you are seeing.

I really don’t know what else to tell you. If you’ve got a specific question, ask, but for now, I don’t think I can offer much more.

[quote=“cynjut, post:16, topic:33714”]
Is it possible that you are trying to use the same SIP extension for both ports? That’s not allowed by Chan-SIP but may be allowed by PJ-SIP (which might explain the reason the original author suggested PJSIP). That might eventually cause the “incorrect password” that you are seeing.[/quote]

Yes definitely, two different extensions. AND two different inbound ports. Other posts were very clear on that.

Well, good idea except I’m running RasPBX - that’s on a Raspberry Pi. A bit hard to put a card in that. That’s why I need network attached devices.

Now I just picked up a message from Grandstream tech support suggesting that maybe the FXO port doesn’t need to be registered at all. That is as long as Asterisk will accept traffic from it. Does that sound right? Is there a permissive mode that can be setup for an extension?

I updated the firmware. 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 manual for the HT503 device says that it has one FXO and one FXS port. You are saying you have two FXO ports. My experience with ATAs like this one is that they normally only have one FXO. If that’s the case, you might need to reassess how you are using this device. I actually have a couple of ATAs with two incoming lines, so the configuration you say you have is neither unheard of nor is it unusual. Normally, though, the model number will reflect that fact (one in, one out versus two in get different model numbers). Also, the units I’ve used in the past didn’t use separate trunks - they connected as a single trunk and supplied the DID on the trunk connection.

Since your unit is connecting each line (apparently) as a separate extension, it just makes me wonder.

Of course, it’s possible that your device is different than the one in the user’s manual, and if that’s the case - rock on. I’m just trying to help you out and trying to make sure we haven’t missed any I’s or T’s.

Historically (and in my experience), the “phone” port is useful for FAX output since an incoming FAX on an FXO port is not automatically converted to T.38. I have a few of these kinds of devices from several other manufacturers and getting them to work was really pretty straight forward. It sounds like you are on your way to getting this working, so let me know if your unit dies again.

My mistake. I have two HT-503s. So I have two devices, two IP address, two FXS ports and two FXO ports.

In any case, this all seems to have boiled down a firmware issue. My original attempts to upgrade the firmware through the LAN port failed and I suffered along with the older firmware. It didn’t help being told by Grandstream tech support that this was ok. After switching my network connection from the LAN port to the WAN port, I was able to upgrade the firmware.

Checking the nifty use chart in FreePBX, The SIP registrations from both FXO ports have been stable all night. This morning I plugged in my two phone lines and was able to get a dial tone on both and make a call out.

Things seem stable. Knock on wood. Now I need to figure out trunking and how to configure the buttons on my Grandstream GXP2130s to get a dialtone on each of the lines.

Thanks for your help and thought process Dave.