Introduction

Enswitch can look up caller name (CNAM) information for inbound calls. This is done by plugging in a program custom written by the developer to work with their caller name data provider. A sample program is available in /opt/enswitch/current/samples/cnam_lookup.sh in your Enswitch installation.

Customers are reminded that they should review their provider's conditions for the use and caching of data.

Configuration

  • Install your custom program on all Asterisk servers.
  • Set the path to your custom program in the "Caller name lookup program" setting under System » Configuration.
  • Set the number of seconds caller name data will be cached for in the "Caller name lookup cache time" setting under System » Configuration.
  • Set the "Perform caller name lookup for inbound calls" field in each group under the System » Inbound groups.

Data flow

  1. Every time Enswitch receives a call to a Number in an Inbound group with "Perform caller name lookup for inbound calls" set to Yes it will perform a caller name check.
  2. First it will check if the caller number has a caller name cached, and whether the cached entry has expired. If a cached entry is available that name is used.
  3. If there is no cached entry or the entry has expired, the caller name lookup program is called and the result read. The input and output fields are listed below. The caller name for this caller number is stored in the cache.
  4. The caller name for this call is overwritten with the new value.

Program input fields

Enswitch will pass the following arguments to the caller name lookup program:

  1. Caller number
  2. Called number
  3. Existing caller name
  4. Presentation
  5. Inbound group ID number
  6. Customer ID number
  7. Call source IP address

Program output fields

The caller name lookup program is expected to print to STDOUT one line terminated with a newline character, which contains the new caller name to be used for this caller number.