Maybe I’m missing something, but I think CID lookup via phonebook is broken.
Here’s what I did:
Install the “Phone Books” add-on,
Under PBX/Tools/Phonebooks, create an “External” phonebook, and import some content from a CSV file
For the purposes of testing, I made sure that there was a value in each of the “Main Phone Number”, “Mobile Phone Number”, and “Home Number” for each entry in the phone book
I also made sure that the phone numbers, as written in the CSV file, were pure numbers (no spaces, parentheses, etc.) and were exactly in the number format as being notified in the SIP signalling in incoming calls (checked with sngrep). (The phone book import decided to impose some weird formatting of its own for some of the numbers, but not for the test number I was using.)
Under Incoming Calls/CID Lookup, I create a lookup using “Phonebook” as the source method, pointing to the phone book I created above.
For my (only) inbound route, I change “CID lookup” to point to the lookup that I created above.
I make a test inbound call, and observe that the caller name associated with the incoming number is not being passed to the receiving phone (checked with sngrep). I can also see from the asterisk logs that the CIDLOOKUP function is being invoked, using the lookup that I created, but is returning “CID_NAME=” (i.e. CID_NAME is being set to the empty string).
The incoming caller ID of the test call is an exact match to a row in the phone book, matching all three phone number columns.
If, instead of using the Phone Books add-on, I create a CID Lookup that uses a MySQL table as the source, it works perfectly.
Maybe I’m doing something wrong; if I am, then I’d be grateful if someone could point out what. But I think it’s broken.
Phone book v3.0.2-5