FreePBX and Grandstream HT813

As @david55 said, there is no problem running both ports of an FXS/FXO device on pjsip.

For the benefit of others searching for this problem, these settings should apply to Grandstream HT813, HT503 (old), Cisco/Linksys SPA3102 (old), SPA3000 (really old), Obihai OBi212 and OBi110 (old).

Set up the FXS as a normal pjsip extension.

For the FXO side, set up a pjsip trunk:
Trunk Name: MYFXO (for example)
Outbound CallerID: 01234567890 (doesn’t really matter, but use the number of the PSTN line because that is what the carrier will send).
CID Options: Force Trunk CID (because that’s what will happen)
Maximum Channels: 1 (only needed if you will fail over to another trunk when this one is busy)
Secret: (must match the SIP password on the FXO device)
Authentication: Both
Registration: Receive
Match Inbound Authentication: Auth Username (needed if your device will send caller ID in From header)
Rewrite Contact: Yes (needed if device is behind NAT and not on same LAN as PBX)

The device FXO port must be set to register, with username matching the Trunk Name and password matching the trunk Secret.

If you still have trouble, paste the Asterisk log for a failing call or registration, with pjsip logger turned on.

1 Like