Hi All,
I have problems with getting my Caller Lookup working. I’ve got a script which runs on my internal webserver. The script strips some characters from the telephone number and performs an SQL query on my database. That script returns a name if a matching number has been found.
I’ve configured everything correctly (using the GUI), which resulted in the following configuration in my extentions_addition.conf:
[cidlookup]
include => cidlookup-custom
exten => cidlookup_3,1,Set(CALLERID(name)=${CURL(http://10.0.0.247:80/tel/tel.php?tel=${CALLERID(num)})})
exten => cidlookup_3,n,Return()
exten => cidlookup_return,1,ExecIf($["${DB(cidname/${CALLERID(num)})}" != “”]?Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})}))
exten => cidlookup_return,n,Return()
; end of [cidlookup]
If I surf to the above link using my browser, I get the proper result. If I use curl or lynx on the PBX to surf to the link, I get the proper result. Over here I have the configuration for the inbound route, I blanked out my telephone number (and a second inbound route ;)):
[ext-did-0002]
include => ext-did-0002-custom
exten => 3171XXXXXXX,1,Set(__FROM_DID=${EXTEN})
exten => 3171XXXXXXX,n,Gosub(cidlookup,cidlookup_3,1)
exten => 3171XXXXXXX,n,ExecIf($[ “${CALLERID(name)}” = “” ] ?Set(CALLERID(name)=${CALLERID(num)}))
exten => 3171XXXXXXX,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => 3171XXXXXXX,n,Set(CALLERPRES()=allowed_not_screened)
exten => 3171XXXXXXX,n(dest-ext),Goto(from-did-direct,602,1)
exten => 3171ZZZZZZZ,1,Set(__FROM_DID=${EXTEN})
exten => 3171ZZZZZZZ,n,ExecIf($[ “${CALLERID(name)}” = “” ] ?Set(CALLERID(name)=${CALLERID(num)}))
exten => 3171ZZZZZZZ,n,Set(__CALLINGPRES_SV=${CALLERPRES()})
exten => 3171ZZZZZZZ,n,Set(CALLERPRES()=allowed_not_screened)
exten => 3171ZZZZZZZ,n(dest-ext),Goto(ext-group,300,1)
; end of [ext-did-0002]
The call arives at my extention without any problems, but it doesn’t tell who is calling, it is only showing the number of my cell phone. What am i doing wrong? Am I doing something wrong?
I’m running Asterisknow and updated Freepbx to 2.8.0.2, the PBX and webserver are in the same subnet and can ‘talk’ to eachother. Hope somebody can give me a push in the right direction!
Thanks in advance.
Niels
The Netherlands