Looking for something?

You will find your answers here!

Sorry, we didn't find any relevant articles for you.

Send us your question using the form below and we will get back to you with a solution.

Partners & Resellers

EVP: CAIRO AI (OneReach) Onboarding Guide for NetSapiens CSPs/Partners

Overview

This guide outlines the steps required for a NetSapiens CSP (NS Partner) to enable CAIRO app on the Marketplace so the NetSapiens platform can be enabled to use the AI receptionist functionality. The information below must be collected to initiate CSP provisioning and complete the integration.

Required CSP Provisioning Details

The following details must be collected and shared with OneReach:
  • Logo image: white logo image - 500x80 px
  • CSP Identifier: Short identifier for the CSP (must be unique)
  • nsApiUrl: NetSapiens API base URL  (i.e. api.crexendo.com) to be used for CAIRO API integration
  • sipFqdn: SIP Fully Qualified Domain Name for CAIRO to send calls to (used for SIP INVITE request URI if provided, otherwise the default is used) 
  • nsClientId: NetSapiens OAuth client ID (typically cairo) 
  • nsClientSecret: NetSapiens OAuth client secret
  • FQDNs & IP Addresses : NetSapiens core IP addresses and FQDNs. These need to be whitelisted at the AI stack (Crexendo) for telephony traffic.
  • smsBearerToken: NS SU API key - limited to message and message session models) This is used to send SMS for appointment confirmations and for real-time trigger word notifications.
    • Example: CURL to create a limited scope API key.
curl --request POST \
>      --url https://the.core.you are.ssh.into.com/ns-api/v2/apikeys \
>      --header 'accept: application/json' \
>      --header 'authorization: Bearer nss_KXE6ATDXO53VtXXXXXXXXXXXXXNrOIpuOAUGP6s3aab87f33d' \
>      --header 'content-type: application/json' \
>      --data '
> {
>   "reseller": "*",
>   "description": "Trying to create an SU key from CLI",
>   "user-scope": "Super User",
>   "allowed-models": [
>     "message",
>     "messagesession"
>   ],
>   "user": "*",
>   "domain": "*",
>   "ip-address": "*",
>   "readonly": "no",
>   "can-create-keys": "no"
> }
> '
After providing these items to OneReach and the EVP/Netsapiens support team will respond back with CSP Redirect URI to place in cores portal_config.php file.
 

Example of provided redirect uri to be place in portal_config.php file:

 

Whitelisting the above SSO OAuth2 Redirect URI (all CSP cores)

  • The Redirect URI is currently added to the platform via SSH.
  • Add the following configuration to all Netsapiens core servers, the redirect URI will whitelist CAIRO:
    • File: /etc/netsapiens/portal_config.php
    • Entry: Configure::write('NsAllowedRedirectUris.4','https://em.crexendo.api.onereach.ai/http/ae926413-6e94-46b8-be12-e4fb6107c293/auth/callback');
 

Important:

Registration will fail if this redirect URI is not whitelisted on all cores.
Pls. make sure there are no other entries with ID 4. If there are, pick the next available number below 50.
Hosted CSPs would need NetSapiens support team to address this if following CSP driven enablement.
 

 


Network Requirements

IP addresses that must be whitelisted on the CSP/Partner side for CAIRO communication:

  • AWS NLB:
    • 44.250.2.215
    • 44.249.226.167
    • 44.229.195.86
  • Freeswitch instances in ASG:
    • 34.211.101.14
    • 34.218.115.191
    • 35.84.231.17
    • 44.250.5.29
    • 44.232.155.100
    • 34.216.182.74
    • 54.245.2.204
    • 54.244.221.175
    • 44.246.112.171
    • 44.241.184.93
  • IP addresses and URLs that must be whitelisted on CAIRO side from CSP's/Partner's cores:
    • Please list and provide for your project manager

Create OneReach SIP Trunks

  1. Required SIP Trunks:
    1. Termination Trunk: sip.crexendo.onereach.ai 
    2. Origination Trunks:
      • 34.211.101.14 
      • 34.218.115.191 
      • 35.84.231.17 
      • 44.250.5.29 
      • 44.232.155.100 
      • 34.216.182.74 
      • 54.245.2.204 
      • 54.244.221.175 
      • 44.246.112.171 
      • 44.241.184.93 

Important:

Configure or import each SIP trunk using the standard vendor/server settings as shown in the provided csv file below.

 

 

 

  1. Navigate to the Admin UI of the Core Module, Connections > Connections.

 

 

  1. Scroll to the bottom of the page and click the Import button.

 

 

  1. Choose the import file.

CAIROTrunks.csv: 

 

 

 

 


 

Example of the Term SIP trunk Sample - sip.crexendo.onereach.ai

image

Example of one of the Ten - Orig SIP trunks Sample - 34.211.101.14, 34.218.115.191, 35.84.231.17, 44.250.5.29

image

Create Call Routing Rule  and Connection

NOTE: 

Please review your existing Call Routing Rules, as you may need to adjust the “standard” given example to ensure the CAIRO Call Route is “specific” and unique.

  1. In SiPbx, navigate to: Dial Planning → Call Routing 
  2. Import the Call Routing Rule as shown below.
  1. Scroll to the bottom of the page and click the Import button.
  1. Choose the import file.
  1. Click Start Import

Example shown below:

 


Configure the Connection Route

Note: 

the goal is to send E.164 format to the CAIRO Platform (edit as needed)

 
  1. Click the Import button again
  2. Choose the import file.
  1. Click Start Import

Example screenshots


 


JSS Script Example to add CAIRO Icon for Office Manager scope

Please modify as needed and use at your own risk
 

 

Note: The below JSS script used as example only, keep in mind you the below variables will need to modified. Please test and validate your scripts as the below as each platform is setup differently:

 

 

const nstoken1 = localStorage.getItem('ns_t');

if (sub_scope == "Office Manager")
{
fetch(`https://${window.location.hostname}/ns-api/v2/configurations/CXDO_MKTPLACE_CAIRO?domain=${sub_domain}`, {
method: 'GET',
  headers: {
    'Accept': 'application/json',
'Authorization': 'Bearer ${nstoken1}',
  },
})
  .then((response) => response.json())
  .then((data) => {
    console.log(data[0].config_value);
    console.log('CAIRO enabled for the Domain.');

        const existingButton_OM = $('#nav-callhistory')
        if (existingButton_OM) {
            const cairoButton_OM =
                '<li id="nav-studio" class="">' +
                '<a href="https://em.crexendo.api.onereach.ai/http/ae926413-6e94-46b8-be12-e4fb6107c293/auth/callback?cspKey=<csp_name>" target="_blank" class="nav-link">' +
                '<div class="nav-button btn"></div>' +
                '<div class="nav-arrow"></div>' +
                '<div class="nav-bg-image" style="background-image: url(https://crexendo-vip.s3.us-west-2.amazonaws.com/JSScripts/JSImagesIcons/CAIRO_logo_vip_tile.png) "></div>' +
                '<span class="nav-text">AI Receptionist</span>' +
                '</a>' +
                '</li>';
existingButton_OM.after(cairoButton_OM);
        }
  })
  .catch((error) => {
// Handle errors
// console.error(error);
console.log('CAIRO Not enabled for the Domain.');
});

}

((((ADD WORKFLOW FOR MARKETPLACE))))))


 

workflow off - if
restrict marketplace
CSP/Partner Requests CAIRO - Point of View
Enable workflow
EVP Admin Point of view - to approve CAIRO on CSP's platform


 


Completion

This completes the CSP configuration required for the CAIRO AI onboarding.
If you have any questions or need assistance, please contact the EVP team.
 

 

Was this article helpful?