News:

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

Main Menu

Obi110 - Phone Line CallerID not passed to Asterisk

Started by bravo2, September 10, 2014, 07:54:08 PM

Previous topic - Next topic

bravo2

I have setup Obi110 as a PSTN and Google Voice gateway on my Asterisk server.  Both incoming and outgoing calls are routed as specified on both PSTN and Google Voice channels.  But  I have an issue with caller id.

For incoming calls through PSTN, Asterisk phones does not show the Caller ID.  Instead it shows the trunk name (username) I used for Obi110 SP2 SIP registration.  But for calls coming through Obi110's Google Voice channel, the caller id is displayed correctly.

Google Voice caller id started showing up after I enabled X_SpoofCallerID on ITSP Profile A, but I don't see a similar option for Physical Phone Line.

Do you know about any particular setting to get caller id working in this case?

Analog phones connected to PSTN line displays caller id correctly.

thanks

azrobert

#1
How are you routing inbound Line Port calls to Asterisk?
Please post your Line Port InboundCallRoute

Did you change Line Port parm RingDelay?


Edit:
If your Line inbound route is something like:
sp1(100@192.168.1.100:5060)

Change it to:
sp1(100@192.168.1.100:5060;ui=$1)

If you altered RingDelay set it back to the default setting.

bravo2

Thanks azrobert for your help here.

Phone Line InboundCallRoute is set to sp1(1234567890) where 1234567890 is my land line number.  Asterisk routes the call to ring all connected phones based on the landline number coming in. I assume, your suggestion is to add ";ui=$1 to it.  Please let me know if the following is correct.  I will try it out tonight and let you know.

sp1(1234567890;ui=$1)

I did not change RingDelay.

azrobert

Do you have SP1 registered as an extension on Asterisk?

Is GV defined on SP2?
What is the GV inbound route?

The ui=$1 is only valid on a SIP URI.

I send calls to Asterisk like this:
sp1(100@192.168.1.100:5060;ui=$1)

100 = an extension
192.168.1.100:5060 is the IP address of asterisk
ui = userid (This will override the userid defined on SP1)
$1 is a variable containing the inbound callerid
You are sending the call to Asterisk with the callerid as the userid

You must setup a trunk on Asterisk with the OBi100's IP address and port number, otherwise Asterisk will reject the call.
Or I think you can just accept anonymous calls.

I don't understand why GV calls pass callerid.
Are you forwarding them the same way?
X_SpoofCallerID is defined on the outbound SP trunk.
If it fixed GV calls it should fix line port inbound calls.
When I get time I will setup routing like yours and try to reproduce your problem.

You can test my method by defining a speed dial on the OBi like:
sp1(100@192.168.1.100:5060;ui=8005551212)

Extension 100 should receive the call with callerid = 8005551212


bravo2

Thanks azrobert for the detailed response.

I made a mistake in my last comment.  I have Obi110 SP2 as an asterisk SIP extension and I should have written sp2(1234567890;ui=$1). SP1 is registered with Google Voice. I have the GV trunk setup on Asterisk too.  GV calls started sending callerid after I enabled X_SpoofCallerID, it was disabled by default.

GV inbound route is SP2(gv-number), Asterisk dial plan will route the gv call to my office phone only based on gv-number.

Again, thanks for taking time to answer my question with details.

bravo2

#5
Unfortunately, this did not work.  I was getting the entire text within parentheses as DID on Asterisk end.  For example, InboundCallRoute sp2(1234567890;ui=2223334444) gave 1234567890;ui=2223334444 as DID on Asterisk side which did not match any configured route and went to catch all.  

sp2(1234567890;ui=$1) was giving 1234567890;ui=` (yes, $1 was replaced with `).

When I tried SP2(1234567890@192.168.1.5:5060;ui=2223334444), Asterisk gave the following errors. $1 instead of 2223334444 caused backquote (`) to be sent in its place
---
[2014-09-11 23:10:34] WARNING[4089][C-00000033]: chan_sip.c:16376 check_auth: username mismatch, have <gvtrunk>, digest has <2223334444>
[2014-09-11 23:10:34] NOTICE[4089][C-00000033]: chan_sip.c:25528 handle_request_invite: Failed to authenticate device <sip:2223334444@192.168.1.5>;tag=SP229f7fbffe954544
---

You mentioned about this error earlier, but I do have a trunk created for obi110. It looks like I got it wrong.  Can you please send me some pointers.

BTW, sp2(1234567890) worked just fine for InboundCallRoute on SP1 which is configured with Google Voice.

thanks

azrobert


azrobert

#7
I have a trunk defined on Asterisk that points to port 5061 on my OBi110 for SP2.
If I send the call to Asterisk with the following, the call is accepted.
sp2(100@192.168.1.100:5060;ui=$1)

If I send the call to Asterisk with the following, the call is rejected because there is no matching trunk definition in Asterisk.
sp1(100@192.168.1.100:5060;ui=$1)

The OBi110 call history shows this error:
End Call (403 Forbidden)

If you use Freepbx, I'll post how I defined the trunk.

The $1 variable can't be used in a speed dial.
It can only be used in an inbound call route.

Edit:
Here is my trunk definition using Freepbx:

type=peer
username=robert
host=192.168.1.100
port=5061
fromuser=robert
canreinvite=no
insecure=invite,port
qualify=yes
nat=yes


bravo2

Yes, I use freepbx. My trunk definition does not have some of the entries given below.  Let me try this out today.  Thanks.

bravo2

The instructions I followed were based on the following:
http://www.obitalk.com/forum/index.php?topic=1157.msg7261#msg7261.
http://wiki.freepbx.org/pages/viewpage.action?pageId=4161594

These pages have a slightly different trunk definition than the one you gave below. I will try yours tonight and post the outcome here.

azrobert

I don't think the definition details are important.
The host=IP_Address must match the OBi110's IP address.
Port number must be 5061 if you are using SP2 to route the call to Asterisk.
Port number must be 5060 if you are using SP1 to route the call to Asterisk.
The port numbers above assumes you haven't change the OBi110's  default X_UserAgentPort.

Like I said in a previous post when I test and these don't match the call is rejected with error 403 forbidden.

bravo2

With FreePBX trunk configuration as described above helped me pass the authentication error.  Now LINE Port InboundCallRoute value  SP2(1234567890@192.168.1.5:5060;ui=2223334444) is giving 2223334444 as caller id.  This is good progress.

But SP2(2242120185@192.168.1.5:5060;ui=$1) is giving caller id as backquote (`).  I have no idea why $1 is not expanded to incoming caller id. I am going through OBi110 administration guide, but have not found anything wrong with my setup yet.  I will keep trying.

thanks very much for your help so far. 

azrobert

#12
If you plug a phone directly into the wall jack do you get callerid?

Check the OBi110 call history.
Log directly into the OBi110 using the Web interface.
Using an internet browser enter the IP address of the OBi110 and hit Enter.
If you didn't change them the default userid and password are both "admin".

On the left column click Status then click Call History.
Peer Number should show the callerid.
Is it correct?

bravo2

I just tested it and callerid not showing up on the phone connected to OBi110 phone port.  Phones directly connected to PSTN line shows callerid.

I decided to start from scratch instead of debugging what I have.  I have just factory reset; I am going through the setup.  I will soon post updates here. 

Thanks

azrobert

In the U.S. callerid from PSTN is transmitted between the 1st and 2nd ring. RingDelay on the Line Port definition delays the call processing to give the OBi110 enough time to receive CallerID. The 4 second default should be more than enough time, but you could try a value of 6000.

bravo2

No luck. I guess this is an issue with the core OBi110 firmware. Right after the factory reset, I don't get caller id on OBi110 phone port for calls coming through Line port (PSTN).  Caller ID is working fine on SP1 (Google Voice calls) I am getting caller id on phones directly connected to PSTN line between first and second rings.

Probably I will raise a support issue with OBiHai.

Thanks for your help, I learned a few new things here.