opencnam integration with freeswitch · a. introduction b. operation opencnam integration with...

6
Introduction A. B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to connect it to the OpenCNAM endpoint and pull the Caller ID information inline with the call as it comes in. In this guide, we will be using FusionPBX as well as the command line version of FreeSWITCH. Both will have the same call flows with the GUI or the CLI. As a call come into the FreeSWITCH box, the CID Lookup module will intercept the call and send it to OpenCNAM to query the Caller ID. Once it receives that information, it will get added to the invite sent to the endpoint. As a result, the endpoint will see the name of the calling party. C. Enabling the CID Module From the FusionPBX screen, go to Advanced -> Modules and find the module called CID LOOKUP. Make sure it is enabled. Save the config and start the process.

Upload: others

Post on 15-Aug-2020

32 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OpenCNAM Integration with FreeSwitch · A. Introduction B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to

IntroductionA.

B. Operation

OpenCNAM Integration with FreeSwitch

FreeSWITCH has a module named CID Lookup. We will leverage this module

to connect it to the OpenCNAM endpoint and pull the Caller ID information

inline with the call as it comes in.

In this guide, we will be using FusionPBX as well as the command line version

of FreeSWITCH. Both will have the same call flows with the GUI or the CLI.

As a call come into the FreeSWITCH box, the CID Lookup module will intercept

the call and send it to OpenCNAM to query the Caller ID. Once it receives that

information, it will get added to the invite sent to the endpoint. As a result,

the endpoint will see the name of the calling party.

C. Enabling the CID Module

From the FusionPBX screen, go to Advanced -> Modules and find the module

called CID LOOKUP. Make sure it is enabled. Save the config and start the

process.

Page 2: OpenCNAM Integration with FreeSwitch · A. Introduction B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to

Once the Module is enabled verify that setting took effect from the command

line by typing “cidlookup”.

Page 3: OpenCNAM Integration with FreeSwitch · A. Introduction B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to

D. Configure OpenCNAM

First, create an account with OpenCNAM at www.opencnam.com. Once

the account is created, you will receive an SID and an AUTH_TOKEN. The SID

and AUTH_TOKEN can be found by logging into your customer Dashboard.

You will need these credentials to configure the module correctly.

Once your account has been created, edit the following file, and add the

following lines.

/usr/share/freeswitch/conf/vanilla/autoload_configs/cidlookup.conf.xml

Comment out the following line containing “odbc-dsn”

Save the file and then from the CLI, reload the CID Lookup module.

At this point, OpenCNAM is configured and the CID Lookup module in

FreeSWITCH is enabled. Now we just need to add it to the dial plan to make

this work.

--------------------------------------------add the following:<!-- OPENCNAM CONFIG -->

<param name=”url” value=”https://api.opencnam.com/v3/phone/+${caller_id_number}?account_sid=SID&auth_token=AUTH_TOKEN”/>

--------------------------------------------

Page 4: OpenCNAM Integration with FreeSwitch · A. Introduction B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to

E. Adding Dial Plan

Create a route in the public context and make it Global in case of

multi-tenant use. Give it an order of 2 so that no other route will

ever come before this one.

• Set destination number to whatever number of digits you receive

from the carrier

• Set action to call_direction=inbound

• Set action to effective_caller_id_name=${cidlookup(${caller_id_

number})}

• Set the effective_caller_id_name line to inline=true

Once this piece is done, CNAM will be enabled, but you will still need to add it

to each individual DID. So again, go to dial plan -> Inbound Routes and select

the DID you would like to enable CNAM on.

1

Go to Dial Plan -> Inbound Routes

Page 5: OpenCNAM Integration with FreeSwitch · A. Introduction B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to

If you are not using the GUI, you will need to add the following to your dial

plan:

Test it and make sure that the CNAM is working as expected.

Troubleshooting

<extension name=”cnam” continue=”true”> <condition field=”context” expression=”public”> <action application=”set” data=”caller_id_name=${cidlookup(${caller_id_number})}”/> </condition></extension>

Add action to effective_caller_id_name=${cidlookup(${caller_id_

number})} before the call gets transferred to an extension.

2

1. If you are seeing “UNKNOWN” in the Caller ID, please verify that you are

getting 200 result codes and not 400 or 404.

2. Validate that you have funds in your OpenCNAM Account.

Page 6: OpenCNAM Integration with FreeSwitch · A. Introduction B. Operation OpenCNAM Integration with FreeSwitch FreeSWITCH has a module named CID Lookup. We will leverage this module to

3. Make sure that the CID Lookup service is enabled and started by going to

the modules section and checking. Also try to reload mod_cidlookup from

the CLI.

4. Look at the CLI and see what the call is doing. Make sure it is going out to

OpenCNAM.

5. If you are still experiencing difficulties, contact OpenCNAM Support via

phone at 1-888-315-TELO or via email at [email protected].

6. If you are seeing “UNKNOWN” in the Caller ID, please verify that you are

getting 200 result codes and not 400 or 404.

7. Validate that you have funds in your OpenCNAM Account.

8. Make sure that the CID Lookup service is enabled and started by going to

the modules section and checking. Also try to reload mod_cidlookup from

the CLI.

9. Look at the CLI and see what the call is doing. Make sure it is going out to

OpenCNAM.

10. If you are still experiencing difficulties, contact OpenCNAM Support via

phone at 1-888-315-TELO or via email at [email protected].