Trouble with OBi212 as FXO for FreePBX

(1/2) > >>

legotech:
I'm a new user for the Obihai products as well as FreePBX.  I have a lot of technical experience, but not a lot with phones & SIP.  I've automated a lot of my home (OpenHAB with lots of various devices) and am looking to upgrade my home phones to add paging, conferencing, etc. 

I've installed FreePBX 14.0.2.10 on a Raspberry Pi to do some initial testing (I'll move over to a Linux VM on my home server if I like how things work).  This will let me test various phones, etc. in an isolated network environment before I roll it out to the whole house.  It's not going to get worked very hard, so the Pi could run it indefinitely, but I probably won't.

As part of this project, we have a land-line phone that I want to integrate (doesn't get used much, just places that we don't want to give our cell # to but might need to reach us once in a great while) using the OBi212 as an FXO gateway (and FXS for an analog phone, but that's working).

I've tried every article and tutorial I can find, and cannot get the FXO to register with FreePBX.  All the tutorials I've found are oriented toward the 110, etc. so I'm wondering if there's something unique about the 212 that's causing me trouble.  Specifically, I've used these resources (plus a few other lesser ones):

http://www.obitalk.com/forum/index.php?topic=1157.0
http://www.obitalk.com/forum/index.php?topic=57.0
https://wiki.freepbx.org/pages/viewpage.action?pageId=4161594

OBi212 us running version 3.2.1 (Build: 5735EX).  I don't have the OBi212 registered with Obitalk, as I prefer not to if possible.

The FXS is using SP1 on the 212 and is registering with FreePBX successfully.  The FXO doesn't, and I get the message "Register Failed: 401 Unauthorized" in the Obi212 GUI for SP2 service status.

Looking in the FreePBX log, I see:

Code:

[2018-04-06 16:29:06] NOTICE[5857] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:CLTRUNK@192.168.1.30>' failed for '192.168.1.31:5060' (callid: 413716167a1e9cac@192.168.1.31) - Failed to authenticate
[2018-04-06 16:29:06] NOTICE[5857] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:CLTRUNK@192.168.1.30>' failed for '192.168.1.31:5060' (callid: 413716167a1e9cac@192.168.1.31) - No matching endpoint found


I've googled these errors, without much luck.

At this point, I've completely started over 4 times, thinking maybe I've just missed a step somewhere, but I don't think so...  I've also deviated from the above instructions by changing ports, and everything else I can think of in an effort to fix this, but I always end up with the same messages.  Anyone have any ideas or suggestions?

Thanks,

Danny

azrobert:
The following is the method I use with my OBi110. I don't register to the OBi110. I recently restored Raspbx from a backup and currently not using it with my OBi110/PSTN. I just successfully routing a call from the OBi110 to an extension on the PBX.

Create a Chan_SIP Trunk
General
Trunk Name: OBi212
Outbound CID: <8005551212>

SIP Settings Outgoing:

Trunk Name: OBi212
Peer Details:
type=peer
username=8005551212
host=192.168.1.100
port=5061
canreinvite=no
insecure=invite,port
qualify=yes

Replace 192.168.1.100 with the IP address of the OBi212
5061 = X_UserAgentPort of SP2

OBi212

SP1 = PBX Extension

Service Providers -> ITSP Profile B -> SIP -> ProxyServer: 127.0.0.1
Service Providers -> ITSP Profile B -> SIP -> X_SpoofCallerID: Checked
Voice Services -> SP2 Service -> AuthUserName: OBi212
Voice Services -> SP2 Service -> X_RegisterEnable: unchecked
Voice Services -> SP2 Service -> X_ServProvProfile: B
Voice Services -> SP2 Service -> X_InboundCallRoute: li

Physical Interfaces -> Line Port -> InboundCallRoute:
sp2(100@192.168.1.101:port)

100 = extension number
Replace 192.168.1.101 with IP of Raspbx
I have port set to the Chan_SIP listening port

drgeoff:
I use an OBi110 (192.168.1.21) with FreePBX (192.168.1.23).

Peer details on the PBX for the chan-sip trunk
-----------------------
username=OBITRUNK1
secret= redacted
host=dynamic
type=friend
context=from-trunk
qualify=yes
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw&alaw
------------------------

Left the Incoming settings and Register string empty.

Used the above username and secret for the SP2 SIP credentials AuthUserName and Authpassword on the 110.

110 Status shows as registered.

Asterisk Peers line says
OBITRUNK1/OBITRUNK1       192.168.1.21                             D  Yes        Yes            5061     OK (3 ms)

As a test I deliberately changed the 'secret' on the PBX and the log gave the error message

chan_sip.c: Registration from '<sip:OBITRUNK1@192.168.1.23>' failed for '192.168.1.21:5061' - Wrong password

I'm slightly suspicious that your error message has port 5060 even though you, like me, are using SP2.

legotech:
Azrobert, I tried your method, and I honestly can't tell if antying works or not.  For a status on SP2, I now have "Registration not required", but trying inbound and outbound calls, nothing works (which could be a problem with those areas as I've been focused on getting the FXO recognized first...

drgeoff, I tried your method and it's the same as the guides I mentioned - 401 error message.   I did have a port changed from testing something else that I put back to default for SP2, but it didn't help but at least the logs from FreePBX show port 5061...

Anyone have any other ideas?  Base on everything I've tried, I'm thinking there's something unique about the 212 that requires something to be set differently somewhere vs the 110.

Thanks,

Danny

azrobert:
drjeoff,

Thanks for the post. I never knew how to use "host=dynamic".

I used a softphone to register to the trunk. I was able to call the softphone from an extension after defining an outbound route. I was also able to call an extension from the softphone, but was unable to make an outbound call using another trunk on the PBX. After changing the context to "from-internal", outbound calls started working.

Obviously, I can't send an outbound call from the PBX to the softphone, but I'm confident it would work using an OBi device, since I was able to send an extension number to ring the softphone.

Your method is superior, but an open slot is needed for a trunk definition. A Voice Gateway can be used with my method.

Navigation

[0] Message Index

[#] Next page