"global" phone book


I have one other question. I do not know the keywords to find something in google, I did not find anything.

I get phone calls though a CAPI channel (chan-capi) from an ISDN card.
There I have CLIR.
When somebody calls from outside, I do Dial() to all internal SIP phones. On the SIP phone, I see the number.

Is it now possible to let Asterisk transform these numbers to names? Asterisk should lookup the number in a database, and, if an entry is found, transfer the name instead of the number to the SIP phones.
I would be very cool if these lookup could be done against a mySQL database.

Is there a solution for that?

Thank you in advance,


check out the gui freepbx…they released a CID module three weeks or so ago…I have not installed yet…so I have no clue…Well I did install it and it gave me a SQL error and as it was not something I wanted I removed it…but I am sure they would have fix it by now, Rob Thomas and his crew are good.

easy to install the freepbx gui takes about 30 mins or less…


Thanks for your reply but I’m not sure if this is what I want. DB access itself should not be so much problem (AGI etc).

However, I think I’ve found a solution.
Praised OpenSource-Software! So I can modify chan_capi-cm in order to set a variable CALLERID with the external callerID.

When answering a call, I could read out that variable and do an SQL query with AGI for example and BEFORE dialing to internal phones, set the caller-ID with SetCallerID with the result, or, if no match, with the same number.

I’ve not already tried it…but…what do you think about?

it sounds exactly like the process i do. i’ve a non-asterisk db table as part of another package, and an AGI script looks the number up in that table, returning the name if available, the number if not, and ‘Unknown’ if CallerID has been witheld.

if you search the wiki for CallerID you’ll find a few examples.

Thank you!

Which WIKI do you mean? I cannot find an official WIKI from Digium. Do you mean www.voip-info.org? If yes, the one useful I can find is in
the 4th link (“Caller ID lookup script (reverse phone number lookup) and local database”).

Is this the script you use?

I hope PHP in CLI is not to fat to be called everytime :wink: