Smart Carrier | API | Call Shaper Module

Smart Carrier | API | Call Shaper Module

The TILTX Call Shaper Module will connect your Asterisk-based systems to our services.  These services include STIR/SHAKEN, Caller ID Assessments, National DNC Scrubbing, Disconnected Number Analysis, and others.  

VICIDial Users:  Vicidial has a direct integration for this module and, if the prerequisites are met, you do not need to go through the process below.  Please refer to this article for help with VICIDial.

In order to use this module, you will need an API key.  To get your API Key, please contact us at support@tiltx.com.

Prerequisites:

  1. PHP 5.2 or later.

  2. Appropriate unzipping tool such as TAR or UNZIP.

Compatible with the following services offered by TILTX:

  1. STIR/SHAKEN Call Tokenization.

  2. NumberRisk CallerID Assessments.

  3. NumberRisk Disconnected Number Analysis.

  4. NumberRisk National Do Not Call Filtering.

Procedure:

  1. On your Asterisk server, go to the following directory:

    • /var/lib/asterisk/agi-bin

  2. Download the necessary files:

  3. Unzip the TILTX Call Shaper Scripts

    • tar -xvf /var/lib/asterisk/agi-bin/TITLX-Call-Shaper-Asterisk.tgz

  4. Unzip the PHP AGI file:

    • tar -xvf /var/lib/asterisk/agi-bin/phpagi-2.20.tgz

  5. Modify the permissions to the TILTX Call Shaper Scripts and the TILTX AGI Key File:

    • chmod 755 /var/lib/asterisk/agi-bin/call-shaper.php

    • chmod 755 /var/lib/asterisk/agi-bin/tiltx-api-key.txt

  6. Using a text editor, open the tiltx-api-key.txt and enter your API key.

    • If you do not have an API key, please contact Support.

  7. Add the TILTX Call Shaper PHP Script to your Asterisk dial plan.  This should be added before the 'Dial' command:

    • exten => _1NXXNXXXXXX,n,AGI(/var/lib/asterisk/agi-bin/call-shaper.php,${EXTEN:-10},${CALLERID(num)})

    • Please note you will need to modify the extension pattern, _1NXXNXXXXXX, to match your dial plan.

Sample API Response:

{

    "RequestGuid": "cb684abe-456f-43e0-83be-0ecc65fd30d9",

    "AccountGuid": "a4a41eb4-0774-4c90-a4aa-7fa1d5542ba4",

    "ToNumber": "19545127294",

    "FromNumber": "8665623940",

    "IPAddress": "34.225.24.242",

    "IsDNC": "false",

    "IsDisconnected": "false",

    "CallerIDToUse": "8665623940",

    "Identity": "eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9jZXJ0aWZpY2F0ZXMuY2xlYXJpcC5jb20vZmRmYjMzMjgtYjc1NC00YTBkLThiMzQtZGUzMGIwOGFkYWMyLzJhZDc4ZDAyM2FmZGEyYzg1YjY3NWE5NTcxYmFjMjI4LmNydCJ9.eyJhdHRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6WyIxOTU0NTEyNzI5NCJdfSwiaWF0IjoxNjIyMTM4Nzg2LCJvcmlnIjp7InRuIjoiODY2NTYyMzk0MCJ9LCJvcmlnaWQiOiJhMTU2MTcyOS01N2I2LTRlZWUtODFhYi03NGUwYTgzYTk4ZDYifQ.OmYIRxnlNowdZct8uyTNH1ynjouNIC0nZvZK6FoeX-rSwOoo6WeDCfGuQQ8zcLqmIG3vu0JmxkGpOLa9b8Ly3Q;info=<https://certificates.tiltx.com/fdfb3328-b754-4a0d-8b34-de30b08adac2/2ad78d023afda2c85b675a9571bac228.crt>;alg=ES256;ppt=shaken",

    "CAID": "3dad418d-0232-412c-a4bc-7c42b3753b4b",

    "AttestationLevel": "A",

    "TILTXID": "cb684abe-456f-43e0-83be-0ecc65fd30d9",

    "ServiceData": null,

    "RequestedAt": "2021-05-27T18:06:26.0412888Z",

    "CompletedAt": "2021-05-27T18:06:26.1258189Z",

    "ProcessingTime": "84.5301",

    "ReturnCode": 200,

    "ReturnStatus": "Success"

}

 

What do the response values mean?

  • RequestGuid: a unique identifier assigned to this request. 

  • AccountGuid: a unique identifier assigned to your account.

  • ToNumber: The phone number sent in the 'ToNumber' parameter.

  • FromNumber: The phone number sent in the 'FromNumber' parameter.

  • IPAddress: The IP address where the request originated from.

  • IsDNC: Was this number found in the National DNC.

  • IsDisconnected: Is this number in service or not.

  • CallerIDToUse: A NumberRisk setting telling your system which caller ID should be used.

  • Identity: The token assigned to the phone call.

  • CAID: The unique identifier assigned to this token.

  • AttestationLevel: The attestation level associated with the FromNumber.

  • TILTXID: the tracking identifier for this request.

  • RequestedAt: When we received the request to provide a token.

  • CompletedAt: When the request finished processing.

  • ProcessingTime: How much time, in milliseconds, this request required.

  • ReturnCode:
    200: Succussful
    404: ReturnStatus will contain the reason.
    503: ReturnStatus will contain the reason.

If you have any questions, please feel free to reach out to TILTX support - support@tiltx.com