Callerid cidlookup

Hi all,

I’m attempting to make some modifications to the Caller ID lookup. What we are attempting to do is take the caller id AND name that we receive off the line and pass that to our cid lookup script (written in php).

We then want to do some logging / changes to the Name portion if necessary and return that to our dial plan.

Here lies the issue. The /admin/modules/cidlookup/ script creates a literal string for the http curl call and that gets placed in the [cidlookup] section. We have managed to pass a portion of the Name into our script but need to URLencode the name being passed via curl so that it gets the entire name and not just the name up to the first space. What we’re seeing the [cidlookup] section is the following;

include => cidlookup-custom
exten => cidlookup_2,1,Set(CALLERID(name)=${CURL(http://server:80/callerid.php?number=${CALLERID(num)}&name=${CALLERID(name)})})

I have tried using something like ${URLENCODE(${CALLERID(name)})} but this doesn’t seem to work. Any suggestions would be greatly appreciated.


bump - still looking for answer on this problem.


I’m not 100% sure what you are describing above, but a good deal of what you are trying to achieve may be done with Caller ID Superfecta. If it can be installed on your system, you can probably modify it to your purposes.

Superfecta Dev site:
To install: