Caller ID Lookup stopped working with FreePBX 2.6.0.0

Thanks Mikael. I just updated to Freepbx 2.7 from 2.5 to see if it made a difference. But it still does not work. It use to work last year.
My system:
Asterisk v1.4.22-rc5
FreePBX v2.7.0
CallerID Lookup is setup as HTTP:
Source Description = "KAO"
Host = 192.168.2.2
Path = /intranet/phonesearchpabx.asp
Query = number=[NUMBER]

I setup an inbound route for my mobile phone. It goes to a private IVR.

When caller id lookup is disabled on this inbound route the Asterisk CLI output is as in section A below. Note that the inbound caller id is correctly detected.

When caller id lookup is enabled as above, then the Asterisk CLI output is as in section B below. Note that the inbound caller id seems to be lost. Then the call is handled by the catchall route and goes to a different IVR.

<<<<<<<<<<<<<<<<< SECTION A - caller id lookup disabled >>>>

=========================================================================
== Parsing ‘/etc/asterisk/asterisk.conf’: Found
== Parsing ‘/etc/asterisk/extconfig.conf’: Found
Connected to Asterisk 1.4.22-rc5 currently running on elastix (pid = 2454)
Verbosity is at least 3
– Starting simple switch on ‘Zap/2-1’
– Executing [s@from-pstn:1] ExecIf(“Zap/2-1”, “1|Set|__FROM_DID=s”) in new stack
– Executing [s@from-pstn:2] ExecIf(“Zap/2-1”, “1 |Set|CALLERID(name)=0422139337”) in new stack
– Executing [s@from-pstn:3] Set(“Zap/2-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [s@from-pstn:4] SetCallerPres(“Zap/2-1”, “allowed_not_screened”) in new stack
– Executing [s@from-pstn:5] Set(“Zap/2-1”, “__ALERT_INFO=John”) in new stack
– Executing [s@from-pstn:6] Set(“Zap/2-1”, “FAX_DEST=ext-fax^s^1”) in new stack
– Executing [s@from-pstn:7] Set(“Zap/2-1”, "[email protected]") in new stack
– Executing [s@from-pstn:8] Answer(“Zap/2-1”, “”) in new stack
– Executing [s@from-pstn:9] Wait(“Zap/2-1”, “2”) in new stack
– Executing [s@from-pstn:10] Goto(“Zap/2-1”, “ivr-13|s|1”) in new stack
– Goto (ivr-13,s,1)
– Executing [s@ivr-13:1] Set(“Zap/2-1”, “MSG=custom/PrivateIntro”) in new stack
– Executing [s@ivr-13:2] Set(“Zap/2-1”, “LOOPCOUNT=0”) in new stack
– Executing [s@ivr-13:3] Set(“Zap/2-1”, “__DIR-CONTEXT=default”) in new stack
– Executing [s@ivr-13:4] Set(“Zap/2-1”, “_IVR_CONTEXT_ivr-13=”) in new stack
– Executing [s@ivr-13:5] Set(“Zap/2-1”, “_IVR_CONTEXT=ivr-13”) in new stack
– Executing [s@ivr-13:6] GotoIf(“Zap/2-1”, “1?begin”) in new stack
– Goto (ivr-13,s,9)
– Executing [s@ivr-13:9] Set(“Zap/2-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing [s@ivr-13:10] Set(“Zap/2-1”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing [s@ivr-13:11] Set(“Zap/2-1”, “__IVR_RETVM=”) in new stack
– Executing [s@ivr-13:12] ExecIf(“Zap/2-1”, “1|Background|custom/PrivateIntro”) in new stack
– <Zap/2-1> Playing ‘custom/PrivateIntro’ (language ‘en’)
elastix*CLI> exit
Executing last minute cleanups
[root@elastix ~]#
<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>

<<<<<<<<<<<<<<< Section B - caller id lookup enabled >>>>>>
== Parsing ‘/etc/asterisk/asterisk.conf’: Found
== Parsing ‘/etc/asterisk/extconfig.conf’: Found
Connected to Asterisk 1.4.22-rc5 currently running on elastix (pid = 2454)
Verbosity is at least 3
– Unregistered SIP '19’
Extension Changed 19[ext-local] new state Unavailable for Notify User 11
– Registered SIP ‘19’ at 192.168.2.8 port 5060 expires 240
Extension Changed 19[ext-local] new state Idle for Notify User 11
– Starting simple switch on ‘Zap/2-1’
– Executing [s@from-pstn:1] ExecIf(“Zap/2-1”, “1|Set|__FROM_DID=s”) in new stack
– Executing [s@from-pstn:2] Gosub(“Zap/2-1”, “cidlookup|cidlookup_1|1”) in new stack
– Hungup ‘Zap/2-1’
– Starting simple switch on ‘Zap/2-1’
– Registered SIP ‘14’ at 192.168.2.30 port 5061 expires 240
– Executing [s@from-pstn:1] Set(“Zap/2-1”, “__FROM_DID=s”) in new stack
– Executing [s@from-pstn:2] ExecIf(“Zap/2-1”, “1 |Set|CALLERID(name)=”) in new stack
– Executing [s@from-pstn:3] Set(“Zap/2-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [s@from-pstn:4] SetCallerPres(“Zap/2-1”, “allowed_not_screened”) in new stack
– Executing [s@from-pstn:5] Set(“Zap/2-1”, “FAX_DEST=ext-fax^s^1”) in new stack
– Executing [s@from-pstn:6] Set(“Zap/2-1”, "[email protected]") in new stack
– Executing [s@from-pstn:7] Answer(“Zap/2-1”, “”) in new stack
– Executing [s@from-pstn:8] Wait(“Zap/2-1”, “2”) in new stack
– Executing [s@from-pstn:9] Goto(“Zap/2-1”, “timeconditions|5|1”) in new stack
– Goto (timeconditions,5,1)
– Executing [5@timeconditions:1] GotoIfTime(“Zap/2-1”, “||1|mar?ivr-5|s|1”) in new stack
– Executing [5@timeconditions:2] Goto(“Zap/2-1”, “timeconditions|1|1”) in new stack
– Goto (timeconditions,1,1)
– Executing [1@timeconditions:1] GotoIfTime(“Zap/2-1”, “18:00-08:00|mon-fri||?ivr-5|s|1”) in new stack
– Goto (ivr-5,s,1)
– Executing [s@ivr-5:1] Set(“Zap/2-1”, “MSG=custom/MHVC_AHIntro”) in new stack
– Executing [s@ivr-5:2] Set(“Zap/2-1”, “LOOPCOUNT=0”) in new stack
– Executing [s@ivr-5:3] Set(“Zap/2-1”, “__DIR-CONTEXT=default”) in new stack
– Executing [s@ivr-5:4] Set(“Zap/2-1”, “_IVR_CONTEXT_ivr-5=”) in new stack
– Executing [s@ivr-5:5] Set(“Zap/2-1”, “_IVR_CONTEXT=ivr-5”) in new stack
– Executing [s@ivr-5:6] GotoIf(“Zap/2-1”, “1?begin”) in new stack
– Goto (ivr-5,s,9)
– Executing [s@ivr-5:9] Set(“Zap/2-1”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing [s@ivr-5:10] Set(“Zap/2-1”, “TIMEOUT(response)=2”) in new stack
– Response timeout set to 2
– Executing [s@ivr-5:11] Set(“Zap/2-1”, “__IVR_RETVM=”) in new stack
– Executing [s@ivr-5:12] ExecIf(“Zap/2-1”, “1|Background|custom/MHVC_AHIntro”) in new stack
– <Zap/2-1> Playing ‘custom/MHVC_AHIntro’ (language ‘en’)
elastix*CLI> exit
Executing last minute cleanups
[root@elastix ~]#

I dug a bit deeper into this on my system. Whenever there is a configuration reload in FreePBX it recreates the extensions_additional.conf file. Even when there are http cid lookup sources, their respective extensions are not being created under [cidlookup].

So my [cidlookup] looks like this:

[cidlookup]
include => cidlookup-custom
exten => cidlookup_return,1,LookupCIDName
exten => cidlookup_return,n,Return()
; end of [cidlookup]

Then whenever asterisk tries to do a caller lookup it cant find the extension (eg: cidlookup_5). I get errors in the log file and the call is not answered. So I manually change the section to look like this:

[cidlookup]
include => cidlookup-custom
exten => Noop(Using CallerID ${CALLERID(all)})
exten => cidlookup_5,1,Set(CALLERID(name)=${CURL(192.168.2.2:80/intranet/phonesearchpabx.asp?number=${CALLERID(num)})})
exten => cidlookup_5,n,Return()
exten => cidlookup_return,1,LookupCIDName
exten => cidlookup_return,n,Return()
; end of [cidlookup]

Then do a dialplan reload and http cidlookups start to work again and the calls are answered.

This is a dangerous fix because if I inadvertantly do any other change that rebuilds the extensions_additional.conf file then the [cidlookup] gets overwritten and the extensions are lost and my system is not going to answer calls again.

Hope someone can fix this in FreePBX.

I have exactly the same issue!

Putting these entries in manually is not an option as they will get overwritten everytime I do a change in freepbx!

see #3979 to try to gather more info on this.

for what it’s worth (since the title of this is misleading suggesting this started in 2.6), this has been broken since inception, in 2.2 and every release since then.

The fact that it has never surfaced ??? other than it is only database authentication mode users who are susceptible to this and not even all such users are.

Anyhow - it’s been fixed in 2.6 and up (the supported versions of FreePBX). Upgrade if running something prior to that.

Sorry that I didn’t came back with my try on a fresh setup - haven’t had the time for it.

I’m really really thankful for this bugfix. Just updated to the latest version and it works like a charm.

so thank you all
Klaus

CURL is missing

this treat helped

http://www.freepbx.org/forum/freepbx/users/help-function-curl-not-registered-caller-id-superfecta

hope it will help

rob