CallerID stopped working after upgrade to 2.5.0rc1.1

After upgrading to FreePBX 2.5.0rc1.1, it appears that caller ID lookup has stopped working (I’ve confirmed via the call logs that it was about 2:00pm on 8/20/08 that the lookups started failing, which corresponds to when I did the update).

No matter whether I have a caller ID source enabled or not on my inbound route, nothing works and the name is “NOT FOUND”. I have tried the internal phone book as well as the Ultimate CNAME lookup tool.

I see the following in my log:

– Executing [[email protected]:1] NoOp(“SIP/65.134.181.47-088a23e8”, “Entering from-trunk-custom context”) in new stack
– Executing [[email protected]:2] Set(“SIP/65.134.181.47-088a23e8”, “CALLERID(num)=5124748617”) in new stack
– Executing [[email protected]:3] Goto(“SIP/65.134.181.47-088a23e8”, “from-trunk|5126144475|1”) in new stack
– Goto (from-trunk,5126144475,1)
– Executing [[email protected]:1] Set(“SIP/65.134.181.47-088a23e8”, “__FROM_DID=5126144475”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/65.134.181.47-088a23e8”, “1 ?cidok”) in new stack
– Goto (from-trunk,5126144475,4)
– Executing [[email protected]:4] NoOp(“SIP/65.134.181.47-088a23e8”, “CallerID is “NOT FOUND” <5124748617>”) in new stack

You can see the CallerID at this point is “NOT FOUND”, which is what displays on my phones.

In case you are wondering, here’s from-trunk-custom (my provider always sends CNUM with a “1” prefixed…I want to strip it out):
[from-trunk-custom]
; This strips leading “1” from callerID
exten => _X.,1,Noop(Entering from-trunk-custom context)
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):1:10})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)

I have been using that context for quite a long time to strip out the extra “1” in the phone numbers. Perhaps that is causing a problem? I tried bypassing my custom context on the incoming trunk, but that simply kept the leading “1” and caused Asterisk not to recognize the number when matching against incoming routes.

[ext-did]
include => ext-did-custom
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => s,1,Set(__FROM_DID=${EXTEN})
exten => s,n,Gosub(app-blacklist-check,s,1)
exten => s,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => s,n,Set(CALLERID(name)=${CALLERID(num)})
exten => s,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => s,n,Macro(privacy-mgr,)
exten => s,n,Goto(timeconditions,1,1)
exten => _./5124680884,1,Set(__FROM_DID=${EXTEN})
exten => _./5124680884,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => _./5124680884,n,Set(CALLERID(name)=${CALLERID(num)})
exten => _./5124680884,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => _./5124680884,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => _./5124680884,n,SetCallerPres(allowed_not_screened)
exten => _./5124680884,n,Goto(ivr-3,s,1)
exten => _./5124738617,1,Set(__FROM_DID=${EXTEN})
exten => _./5124738617,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => _./5124738617,n,Set(CALLERID(name)=${CALLERID(num)})
exten => _./5124738617,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => _./5124738617,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => _./5124738617,n,SetCallerPres(allowed_not_screened)
exten => _./5124738617,n,Goto(ivr-3,s,1)
exten => _./5128659143,1,Set(__FROM_DID=${EXTEN})
exten => _./5128659143,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => _./5128659143,n,Set(CALLERID(name)=${CALLERID(num)})
exten => _./5128659143,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => _./5128659143,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => _./5128659143,n,SetCallerPres(allowed_not_screened)
exten => _./5128659143,n,Goto(ivr-3,s,1)

; end of [ext-did]

Note: Phone numbers might not match original posting…I’m in a hurry to go somewhere and just quickly changed the phone numbers…didn’t check to see if they matched my first post.

I don’t see it doing the lookup. You can post the ext-did section for this did, but if it were doing a lookup you should see a gosub() call at priority 2 of the specific did in ext-did. I just checked on an up-to-date rc1 and it appears to insert the gosub() fine.

troy,
there is a bug and cidlookup is not being injected. It is related to the change using ‘.’ in place of ‘s’ that was not updated in calleridlookup or in the blacklist module. I am doing some checking because of some other reported issues if we should go back to using ‘s’ or stick with '.’ and then will either make the changes and push out cidlookup and blacklist changes to match this or change core to go back to ‘_.’ that should get handled today so there should be fix by Monday.

I’ll wait for the change and report back on my results.

it’s available now, you can pull it I just let rc2 out

That did it. Thanks for all the work you do and the quick turnaround, Philippe!

Troy

troy - glad to see that changed, it added a new capability that was never there unless custom stuff was done. Feel free to hit that donate button if you want, it may help to bribe the family back to liking me from hiding yesterday to get the new feature in and tested:)