Caller ID Name not working after upgrade

FreePBX Version = 12.0.76.4
Asterisk Version = 1.8.19.1
Dahdi Source Version = 2.6.1+2.6.1
Libpri Source Version = 1.4.12
Operating System = CentOS release 6.3 (Final)
Kernel Version = 2.6.32-279.19.1.el6.i686 - 32 Bit

CallerID Name is being removed from the caller id information appearing on the phones and in CDR records.
It has been verified that CallerID name and number are being received from the CO.
It appears that an update installed last January might have caused this problem according to CDR records.
There is a line in the “verbose” CLI log:

Executing [[email protected]:7] ExecIf(“SIP/canada-00001c9d”, “1 ?Set(CALLERID(name)=5401234567)”) in new stack

It appears that this line is putting the number into the name field which is what happens on the phone displays.
Does anyone know where to start to troubleshoot this problem?

Since you are running end of life everything, I would recommend updating to FreePBX 13/Asterisk 13. There hasn’t been any updates published for 12 for way before Jan of this year.

https://wiki.freepbx.org/display/PPS/Elastix+and+PBXinaFlash+to+FreePBX+Distro+Conversion+Tool

It may be old but it shouldn’t be broken.
I am looking for a way to sort it out before committing to a major revision on an in-service phone system.

That is not entirely true. You are running older versions of FreePBX which would have the dialplan that has the code to set the CallerID. If there is a bug in the dialplan there is no way to fix it outside of YOU doing it in the code and in a way that doesn’t get overridden when you hit “Apply Config”

There is just no support for this and, like I said, if this is a bug in the FreePBX generated code nothing is going to get resolved outside of you either upgrading or fixing it yourself.

Alright, I followed that link and installed the latest version of asterisk/freepbx.
The caller id name is still broken. It does not show up on the phones or in the cdr reports.
A packet sniff of the ip traffic from the PSTN gateway shows the name being sent to the PBX.
Looking at the logs during a call one can see the name being populated/replaced with the number.

So now what?

Asterisk Version: 13.17.2
FreePBX 14.0.1.20

Show us the /var/log/asterisk/full entries for an incoming call. It should show the caller ID getting set and then reset…

 Executing [[email protected]:1] NoOp("SIP/canada-00000025", "Inbound Recording Check to s") in new stack
    -- Executing [[email protected]:2] Set("SIP/canada-00000025", "FROMEXTEN=unknown") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/canada-00000025", "10?Set(FROMEXTEN=5401234567)") in new stack
    -- Executing [[email protected]:4] Gosub("SIP/canada-00000025", "recordcheck,1(dontcare,in,s)") in new stack
    -- Executing [[email protected]:1] NoOp("SIP/canada-00000025", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("SIP/canada-00000025", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("SIP/canada-00000025", "") in new stack
    -- Executing [[email protected]:5] Return("SIP/canada-00000025", "") in new stack
    -- Executing [[email protected]:3] Gosub("SIP/canada-00000025", "app-blacklist-check,s,1()") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/canada-00000025", "0?blacklisted") in new stack
    -- Executing [[email protected]:2] Set("SIP/canada-00000025", "CALLED_BLACKLIST=1") in new stack
    -- Executing [[email protected]:3] Return("SIP/canada-00000025", "") in new stack
    -- Executing [[email protected]:4] Set("SIP/canada-00000025", "CDR(did)=6996") in new stack
    -- Executing [[email protected]:5] ExecIf("SIP/canada-00000025", "1 ?Set(CALLERID(name)=5401234567)") in new stack
    -- Executing [[email protected]:6] Set("SIP/canada-00000025", "__MOHCLASS=") in new stack
    -- Executing [[email protected]:7] Set("SIP/canada-00000025", "__REVERSAL_REJECT=FALSE") in new stack
    -- Executing [[email protected]:8] GotoIf("SIP/canada-00000025", "1?post-reverse-charge") in new stack
    -- Goto (from-trunk,s,10)

Packet from gateway:

	2XINVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.10.51:5062;branch=z9hG4bK9c46c25452a366e5
From: ""MR MAGOO""<sip:[email protected]>;tag=f1a0c282a6b18d81
To: <sip:[email protected]>
Contact: <sip:10.0.10.51:5062>
Supported: replaces, timer, path
Call-ID: [email protected]
CSeq: 11568 INVITE
User-Agent: Grandstream GXW4104 (HW 1.1, Ch:2) 1.4.1.5
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Content-Type: application/sdp
Content-Length: 306
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx_builtins.c: Goto (macro-user-callerid,s,29)
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:29] Set("SIP/canada-0000004d", "CALLERID(number)=5401234567") in new stack
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:30] Set("SIP/canada-0000004d", "CALLERID(name)=5401234567") in new stack
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:31] GotoIf("SIP/canada-0000004d", "0?cnum") in new stack
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]-user-callerid:32] Set("SIP/canada-0000004d", "CDR(cnam)=5401234567") in new stack
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:33] Set("SIP/canada-0000004d", "CDR(cnum)=5401234567") in new stack
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:34] Set("SIP/canada-0000004d", "CHANNEL(language)=en") in new stack
[2017-11-29 15:44:55] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:5] Macro("SIP/canada-0000004d", "blkvm-setifempty,") in new stack
[2017-11-29 15:44:56] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:1] GotoIf("SIP/canada-0000004d", "1?init") in new stack
[2017-11-29 15:44:56] VERBOSE[20411][C-00000013] pbx_builtins.c: Goto (macro-blkvm-setifempty,s,4)
[2017-11-29 15:44:56] VERBOSE[20411][C-00000013] pbx.c: Executing [[email protected]:4] Set("SIP/canada-0000004d", "__BLKVM_CHANNEL=SIP/canada-0000004d") in new stack

Your call trace doesn’t indicate the name being replaced with the number, it shows that the name was not received so it populates with the number instead of being null. Check line 5 of the context yourself with:

dialplan show [email protected]

So the question becomes, why is Asterisk not receiving the name via SIP. The only suspect thing I see in the INVITE is the From line. There are 2 sets of double quotes around the name, which is not normal. Speculation on my part, but it’s possible that Asterisk only sees the content between the first set of quotes (which is null) and ignores the rest of the string.

1 Like