News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

How to get OBiBT and FreePBX to send correct callerID when call forwarding?

Started by kindnation, May 16, 2015, 04:51:03 PM

Previous topic - Next topic

kindnation

I have a OBI-200 + BT connected to my hosted FreePBX on SP1.  On SP2 I have a voip.ms account with iNum (88351000XXXXXXX).

For reference, I used this setup:

Paradise Found: The Holy Grail of Mobile Communications ยป Meet the OBi202 at http://nerdvittles.com/?p=4945

I am using CallForwardUnconditional to send all calls to the PBX through SP2(01188351000XXXXXXX). 

Everything works perfectly, except the phone number that shows up on the extensions will show up on the CallerID: 88351000XXXXXXX.

How do I configure OBI/FreePBX to send the caller's phone number instead of my own iNum that is forwarding the call?

azrobert

You have to route the call to the PBX via SIP URI.
I use the inbound call route instead of forwarding the call.

Service Providers -> ITSP Profile A SIP -> X_SpoofCallerID: Checked
Voice Services -> OBiBlueTooth 1 -> InboundCallRoute:
sp1(900@xx.xx.xx.xx:5060)
OR
Do not enable X_SpoofCallerID.
Voice Services -> OBiBlueTooth 1 -> InboundCallRoute:
sp1(900@xx.xx.xx.xx:5060;ui=$1)

xx.xx.xx.xx:5060 is the IP address and port# of the PBX.
$1 is a variable containing the CallerID.
If you use spoof CallerID, CNAM will also be passed.

In FreePBX setup an inbound route for 900.

These calls will be considered anonymous by the PBX and should be rejected.
To fix this problem:
Accept anonymous calls (not recommended).
OR
Define a dummy trunk on the FreePBX with the IP address of the OBi200 as the Host IP.

Here are the Peer details I use for the dummy trunk:
type=peer
username=kindnation
host=192.168.1.100
port=5060
fromuser=kindnation
canreinvite=no
insecure=invite,port
qualify=yes

You said the PBX was hosted, so I assume the PBX is not on the same LAN as the OBI200. You might have to use your public IP address as the host IP. I'm not a network expert and I always had the PBX and OBi on the same LAN.

kindnation

I made a ring group (700) and tried InboundCallRoute sp1(700@xx.xx.xx.xx:5060) and it now sends the CallerID of the OBI extension

"Missed VoIP call from OBI (705)"


I tried with both X_SpoofCallerID on/off and with/without the ;ui=$1 string

with the same results.  At least it removed the need for iNum/voip.ms but I'm still not getting the correct caller's ID.

Is there anything you can suggest? 

azrobert

Do you still have VOIP.ms defined on SP2?
Try sp2(700@xx.xx.xx.xx:5060)

If you already deleted VOIP.ms define a dummy trunk on SP2 like this:
Service Providers -> ITSP Profile B -> SIP -> ProxyServer: 127.0.0.1
Voice Services -> SP2 Service -> AuthUserName: anything
Voice Services -> SP2 Service -> X_RegisterEnable: unchecked
Voice Services -> SP2 Service -> X_ServProvProfile: B

OzarkEdge

Quote from: kindnation on May 16, 2015, 04:51:03 PM
I have a OBI-200 + BT connected to my hosted FreePBX on SP1.  On SP2 I have a voip.ms account with iNum (88351000XXXXXXX).

I am using CallForwardUnconditional to send all calls to the PBX through SP2(01188351000XXXXXXX).  

Everything works perfectly, except the phone number that shows up on the extensions will show up on the CallerID: 88351000XXXXXXX.

How do I configure OBI/FreePBX to send the caller's phone number instead of my own iNum that is forwarding the call?

I'm unfamiliar with the PBX link to the OBi, but I'll throw in some ideas anyway...

OBi1 Series v1.2.1 Build 2283 and later (also OBi200/300 Series?) allows appending optional SIP URI parameters for NAT traversal:

Format: TK(uri;ui=userid[:password];op=[ i ][ m ][ n ][ s ])
Option flags: i=ice, m=symmetric-rtp, n=use-natted-address, s=stun

And, ui=$1 var will pass/forward the inbound CallerID.

That suggests some SIP URI formats for call forwarding:

spn(8835100xxxxxxxx@sip.inum.net;ui=$1)  ;free inum call (iNum has reliability issues?)

spn(ext@popserver.voip.ms;ui=$1) ;free internal VoIP.ms extension call (spn on VoIP.ms).

spn(accountID-extx@popserver.voip.ms;ui=$1)  ;free external VoIP.ms extension call direct (no call flow/filtering).

I have not tried these SIP URIs in an inboundcallroute, but I know ui=callerid works in a Voice Gateway, vgn.

OE

kindnation

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=yes

The 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/OBiDeviceAdminGuide

That'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.