Caller ID Lookup via HTTP + Pass through

I have setup a caller id lookup source from my application that works fine. I use the follwing query:


and my script returns a name and works great.

The problem with this method is that when the number is not found in my application and nothing is returned we can’t see who is calling. for example:

If we receive a phone call from “Cell Phone FL <3525551234>”

Our caller ID will say “3525551234 <3525551234>”

To fix this I tried sending the incoming name to my application to pass it through in the event that the number is not in our database, to do this I have tried:


The problem with this is that it only sends the string up to the first space, for example:

If we receive a phone call from “Cell Phone FL <3525551234>”

Our caller ID will say “Cell <3525551234>”

I also tried changing the variable around like this:


when I do that it doesn’t even send the CID, it cuts the string off at the first space. I captured the request_uri to verify and freepbx is not sending any character beyond the first space.

my questions:

  1. Is there an easy way to fix this problem?
  2. If there isn’t an easy way to fix this problem is it possible for me to go into the PHP code and make a change to how it sends the variables? If so what file(s) could I find the source for this in?

Thank you all for the community full of knowledge! =)

I have standard distro 3.211.63-8 with asterisk 11 and i am using a MySQL database lookup for caller id.
A call comes in - if it matches in the database, it presents the cid name then cid number. -if no match it just presents the cid number as usual.
Is this what you want?
I am writing a guide for our in house work on this over the next week or so and could post here if that is what you are trying to do.

There is a version of superfecta in 2.11 you download it from module admin. You do NOT download it from anywhere else. Including the POSSA site. You will download it straight from FreePBX

What version of FreePBX are you using?

I can only find version

Try using the module CID superfecta instead. You will have better results for what you are trying to do.

Thanks for that. I have been trying superfecta… it was a serious PITA to get working. Currently it works for performing a lookup but for some reason when I get a call it uses the incoming CID number for the name instead of the data returned from mysql database. Do you know anything about this? I can’t find anything online about it. When I debug it everything works great, when I turn off mysql everything works great… its only when mysql lookup is on and when a real phone call comes in (not using the debugger)

Are you using the 2.11.x version?