FreeSWITCH has a module named CID Lookup and FusionPBX uses it. We will leverage this module to connect it to the SuperCNAM endpoint and pull the Caller ID information inline with the call as it comes in.

CID Lookup Module Setup

  1. Make sure the mod_cidlookup is loaded. You can do it through the FusionPBX interface. Go to the Advanced->Modules option and look for the CID Lookup entry, make sure both "enable" options are true.
    fusionpbx cnam
  2. Edit the cidlookup.conf.xml file, (usually in the /etc/freeswitch/autoload_configs/ directory) and delete its content and put the following:
    <configuration name="cidlookup.conf" description="cidlookup Configuration">
     <settings>
       <param name="url" value = "https://query.supercnam.com/vA/${caller_id_number}"/>  
       <param name="cache" value="true"/>
       <param name="cache-expire" value="86400"/>
     </settings>
    </configuration>
  3.  Stop and Start the module using the WEB interfafce.

Dialplan Configuration

There are actually two ways to configure FusionPBX:

  1. querying directly the mod_cidlookup module
  2. through the cidlookup.lua script which allows you to use the contacts as a CNAM source

Querying the CID Lookup Module Directly

  1. Go to your Inbound routes and look for the caller-details dialplan. Add or edit a line that sets the caller_id_name variable as follows: caller_id_name = ${cidlookup(${caller_id_number})} make sure the inline option of that line is set to true.
    fusionpbx cnam cidlookup query

Using the cidlookup.lua Script

  1. Go to your Inbound routes and look for the caller-details dialplan. Add or edit a line that sets the caller_id_name variable as follows: lua cidlookup.lua ${uuid} make sure the inline option of that line is set to true.
    fusionpbx cnam cidlookup lua query