CallerID / SIP Header issue

We are having a nightmare of an issue with SIP Headers having the From field set to ‘[email protected]’ for calls that arrive over our PRI which leads to ‘Anonymous’ to be displayed on our Aastra 6757i phones. Putting a NoOp in the Dial plan just before Dial is ran displays that the CallerID Name and Number are both present before Dial is called.

I’ve probably spend about 20 hours troubleshooting everywhere. SIP settings, rpid trust type settings, dahdi settings, dial plans, looking in to the sip section of the source code that is constructing the header.

We have tried the following on 3 different servers at 3 different sites:
CentOS 5.7 64bit Kernel 2.6.18-274.12.1.el5
DAHDI 2.5.0.2 (Digium TE121 connected to an NI2 PRI)

Asterisk 1.6x + FreePBX 2.7 – No issues
Asterisk 1.8.7.0-1.8.8.1 with FreePBX 2.9.0.0-2.9.0.9 – Problem exists.

If there is somebody willing, with Asterisk knowledge and a PRI who is running the FreePBX Distro or similar Asterisk/FreePBX/DAHDI versions, can you please try the following test?

Add the following to /etc/asterisk/extensions_custom.conf
(Where 4445556666, change to your test DID that comes in on your PRI, Where 1151, change to your test SIP phone extension)

[ext-did-custom]
exten => 4445556666,1,Set(__FROM_DID=${EXTEN})
exten => 4445556666,n,ExecIf($[ "${CALLERID(name)}" = "" ] ?Set(CALLERID(name)=${CALLERID(num)}))
exten => 4445556666,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => 4445556666,n,Set(CALLERPRES()=allowed_not_screened)
;Dialing at this point works every time
;exten => 4445556666,n,Dial(SIP/1151,15,TtrwW)
;Pass to dial-one macro, SIP Header From is set to [email protected] for most calls
exten => 4445556666,n,Macro(dial-one,15,TtrwW,1151)

Make a test call to the DID/PRI and see if the test SIP Phone displays the CID properly or displays anonymous.

We have dissected the dial-one macro in every which way doing debugging, and testing 1 line at a time to see when the problem starts with little success.

We’re currently in the middle of a support call with Digium however they may write it up to a FreePBX/Dial Plan issue since a Straight Dial command works properly.

We are considering moving to the FreePBX Distro if it is working. There may be something completely unrelated to the issue in configuration or incompatibility of dial plans. We’re willing to start fresh on the PBX build if needed.

Unfortunately we do not have a spare PRI that is not in production to run tests or swap out distros and builds. Testing on this issue we have to do in the background on a live production box.

I finally had a chance to test this on the latest non-beta FreePBX Distro.

The problem still exists. I’m going to compile 1.8.9.0RC1 and DAHDI 2.6.0 for testing on CentOS 5.7 64bit.

I’ve torn apart the FreePBX generated dial plan and can’t find any error, so I’m left to believe it’s an issue in Asterisk itself that I’ll have to deal directly with Digium.

Has anyone resolved this issue. On all of the systems that we have installed using FreePBX 2.9 with PRI interfaces we have this problem. Calls that come from the PRI with a {CALLERID(num)} but without a {CALLERID(name)}we get annonymous as a callerid. I have waited for a while to post until I could test some. Now I have replaced an older system with new hw and the latest PIAF using the same PRI that was working fine before and we have this annonymous issue.

PIAF Installed Version = 2.0.6.2 Running on HARDWARE
│ FreePBX Version = 2.9.0.9 │
│ Running Asterisk Version = 1.8.8.0 │
│ Asterisk Source Version = 1.8.8.0 │
│ Dahdi Source Version = 2.6.0+2.6.0 │
│ Libpri Source Version = 1.4.12 │
│ IP Address = 172.18.0.200 on eth0 │
│ Operating System = CentOS release 6.2 (Final) │
│ Kernel Version = 2.6.32-220.2.1.el6.i686 - 32 Bit │
│ Incredible PBX 3 Version = 3.0.5

thanks in advance for the help :}

Has anyone found a solution for this yet, hello ?

I too am experiencing this issue with Asterisk 1.8.11-cert10 and FreePBX 2.9.0.12.

It appears to happen on a PRI circuit where the incoming callerid name is not set - then the callerid is displayed as Anonymous. If the incoming callerid name is set, then it displays correctly.

But for those that want to help, how is the PRI getting into the box?
Card ?
Gateway ?
However it is getting into the system, probably a bit of expansion on hardware make / model would be appreciated by whoever can help you.
Hope this helps you get a response.

More info would have been beneficial -
We are using a Sangoma A101D tied directly to the Telco’s (Shaw) PRI.

I have preformed more experimentation and I suspect it may have something to do with timing of the inbound callerid name. This thread suggests adding a Wait(2) before processing the call and it appears to help.
http://www.freepbx.org/forum/freepbx/users/inbound-caller-id-name-not-working-after-upgrade

I still think that the real issue is elsewhere as we have many instances of this hardware with the same Telco working perfectly.

You have a PRI, all signalling is sent on the D-channel, timing really should to do with it. But . . .

http://www.voip-info.org/wiki/view/Asterisk+CLI

will enlighten you on how to debug any asynchronicity of messages on your PRI.

The CLI will not provide sufficient detail on the reception of the callerid name information - looked at PRI debug, etc

It also appears that even with a dialplan delay, the issue is still occurring, although a lot less frequently and not on every call as before.