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.