CIDLookup is the FreeSWITCH module that handles the Name Caller automatic setting. This means that when an incoming call happens, mod_cidlookup will handle and set the correct name. This way, when the extension rings, you won't see only a number, but a name as well.
Mod_cidlookup has many capabilities, it can consult a database in two levels and it can ask for a WEB-based service. In this article, I will explain the last one.
For starters, you must get an account in OpenCNAM. If you get a paid one you will get more accuracy.
Configuring FreeSWITCH
Edit your cidlookup.conf.xml file and do the following:
- Add or edit this line:
<param name="url" value="https://query.supercnam.com/vA/${caller_id_number}"/>
- If you are not using the database capability, comment out the odbc-dsn line to avoid annoying warnings.
After that, you need to load or reload the module: load mod_cidlookup
Using de CidLookup
To activate it, you may need to add this line in your dialplan configuration:
<action application="set" data="effective_caller_id_name=${cidlookup(${caller_id_number})}"/>
FusionPBX Configuration
The best way to do this is by doing an incoming route with the following characteristics:
- condition: is context public?
- optional condition: is the caller number longer than 11 digits?
- optional action: pre_answer
- action: set call_direction=inbound
- action: inline set caller_id_name=${cidlookup(${caller_id_number})}
- action: inline set effective_caller_id_name=${caller_id_name}
Side Effect
Using this method forces a synchronous call. This means that FreeSWITCH will wait until the CID lookup is finished. If for a reason there is a problem there and the connection does not answer, you will be stuck. You may work around that by adding the pre_answer action or using a Lua script for background execution.
Do you need an Unlimited CNAM Database?
Usually, the most common way you get billed is by the query. However, I can figure out a way to give you SuperCNAM, an unlimited (or unmetered) CNAM service for a flat fee. If you wonder how much it is, it is approximately 49.99 USD quarterly (every three months).
Good Luck!