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/functions.inc.php 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;

[cidlookup]
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.

Regards,
Ken

bump - still looking for answer on this problem.

Thanks,
Ken

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: https://github.com/tm1000/Caller-ID-Superfecta/
To install: http://pbxinaflash.com/forum/showthread.php?t=10977