I finally got it all working. It requires that the OBI-200 be configured as a trunk to pass CallerID information. It won't pass CallerID as an extension.
From azrobert's method of creating a proxy server / fake trunk, with proper modifications to get a public hosted PBX working.
On the Obi I used ProxyServer:
obi-example.dyndns.org (instead of 127.0.0.1). Use a dynamic DNS service that points back to your home IP.
For the dummy trunk on FreePBX:
type=peer
username=kindnation
host=obi-example.dyndns.org (example dynamic DNS that points back to your Home IP)
port=5060
fromuser=kindnation
canreinvite=no
insecure=invite,port
qualify=yes
nat=yesThe nat=yes needed to be added.
On the router, you have to set port forwarding (from asterisk to your OBI's internal IP):
Port: 5060, from (Asterisk's public IP) to Port 5060, 192.168.1.10 (My OBI's internal IP).
note:
port 5060 above was used because I created the proxy on SP1. port 5061, 5062, 5063 for sp2, sp3, sp4 respectively.
X_SpoofCallerID needs to be checked for ITSP Profile A > SIP
On Voice Service > OBi Bluetooth >
InboundCallRoute{PH,SP1($1>700@XX.XX.XX.XX:5060)} (X= Public IP address of my Asterisk box). 700 is a ringgroup on Asterisk.
please note the correct usage of $1, I found from
http://www.obihai.com/OBiDeviceAdminGuideThat's all that's needed for incoming calls with proper callerID.
For outgoing calls, I created an extension on Asterisk, and registered it on OBI as SP2.
In summary, you need to have it as a trunk for incoming calls to get proper callerID. For outgoing calls, you create an extension. Hint: The outgoing calls are routed with
DigitMap, and the incoming calls are routed with
InboundCallRoute.
Huge props to azrobert for the pointers.