Smart Carrier | AI Answering Machine Detection (AMD) Setup - VICIdial Integration

Smart Carrier | AI Answering Machine Detection (AMD) Setup - VICIdial Integration



AI AMD Setup Instructions for VICIdial


This article explains how to integrate AI Answering Machine Detection (AMD) into your VICIdial server.  If you do not have VICIdial, then stay tuned for a generic article.  

Prior to running these steps, Smart Carrier will need to provision your account's AI AMD.  Please inform your Smart Carrier representative if you are interested in this service.  Once that is provisioned, then you will be able to follow the procedure below.

Minimum System Requirements:
  1. VICIdial SVN version 
  2. Working knowledge of Linux commands.
Procedure:
  1. You will need to install JSON::PP
    1. If using a regular installation, then do the following:
      1. cpan
      2. install JSON::PP
  2. Copy the following files using the commands as stated:
    1. cp /usr/src/astguiclient/trunk/extras/KHOMP/KHOMP_updater.pl /usr/share/astguiclient/KHOMP_updater.pl
    2. chmod 0777 /usr/share/astguiclient/KHOMP_updater.pl
    3. cp /usr/src/astguiclient/trunk/extras/KHOMP/FastAGI_log.pl /usr/share/astguiclient/FastAGI_log.pl
    4. cp /usr/src/astguiclient/trunk/extras/KHOMP/agi-VDAD_ALL_outbound.agi /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
  3. Create the following cron entry on only one of your VICIdial servers:
    1. crontab -e
    2. Add the following crontab entry:
      1. * * * * * /usr/share/astguiclient/KHOMP_updater.pl
  4. Run the following command from all your dialers:
    1. /usr/bin/curl http://amd.smartcarrier.io
  5. Have your database administrator perform the following:
    1. Connect to MySQL
    2. Connect to the Asterisk database
    3. Run the KHOMP_settings.sql file against your database. This will create several statuses for you as well as two settings containers:

  6. In the VICIdial Admin Interface go to:
    1. Admin → Setting Containers
    2. Then, go to the KHOMPSETTINGS setting container.
    3. Update the following settings:
      1. khomp_api_url:  The 'URL_FOR_KHOMP_SERVER' should be:
        1. http://amd.smartcarrier.io/rpc/json.fcgi/kgateway
      2. khomp_api_login_url:  The 'URL_FOR_KHOMP_SERVER' should be:
        1. http://amd.smartcarrier.io/rpc/json.fcgi/auth
      3. khomp_api_user:  This value should be vici
      4. khomp_api_pass:  This value should be vici321
      5. Screenshot:

  7. Submit the changes to the KHOMPSETTINGS setting container.
  8. Now, go to Admin -> Carriers and lets add a new carrier.
    1. Set the carrier ID to AMD_SmartCarrier
    2. Set the carrier name to SmartCarrier AMD Gateway
    3. In the account entry section, copy and paste the following:
      1. [AMD_SmartCarrier]
        type=peer
        context=trunkinbound
        usecallerid=yes
        trustrpid=yes
        sendrpid=yes
        host=209.200.231.225
        qualify=yes
        insecure=port,invite
        disallow=all
        allow=ulaw
        dtmfmode=RFC2833
      2. For the host, you may use the following, depending on which is closer to you:
        1. US East 1: 209.200.231.225
        2. US West 1: 209.200.241.225
  9. Now, let's update the dial plan to use the new carrier settings:
    1. Add the following to the 'Dialplan Entry' section (This dial plan uses dial prefix 38. You can change this to whatever dial prefix you like as long as you make the appropriate changes to the dial plan entry):
      1. exten => _381NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
        exten => _381NXXNXXXXXX,n,Dial(SIP/AMD_SmartCarrier/${EXTEN:2},,To
        exten => _381NXXNXXXXXX,n,Hangup()
    2. Press the Submit button for this carrier.
  10. On the next screen (after you press the submit button), do the following:
    1. Change Server IP to 0.0.0.0
    2. Change 'Active' to 'Y'
    3. Press the 'Submit' button for this carrier again.
  11. Now, let's go to the campaign you'd like to use AI AMD with and do the following:
    1. Go to 'Detailed View'
    2. Change the Dial Prefix to 38 (or whatever you altered the dialplan in the KHOMP carrier to use)
    3.  
    4. Change AMD Type to Smart Carrier AMD Gateway
    5. Scroll down and press the Submit button on the campaign.