×

Automated call routing to available users within your own application/CRM

Contact Center & 2 more
  • Contact Center
  • Platform
  • Voice
3PL & 7 more
  • 3PL
  • B2C
  • BFSI
  • Call Center
  • Edutech
  • HealthCare
  • Last Mile Delivery
  • Marketplace
Contact center
  • Contact center
8919 views

Overview

Don’t wish to add your business partners/users as co-workers in Exotel but still want us to route customer calls only to available users? Sure, we’ve got you covered!

With our enhanced Voice APIs, you don’t have to worry about adding users as co-workers into our dashboard if you want us to stop customer calls being routed to users who may already be busy on another call. This benefit is in addition to the number masking for you to safeguard your customer’s identity, and prevent misuse of sensitive information, enabled by anonymization of customer’s phone number. For more details on number masking, please refer to this use case

This use case discusses the implementation framework through which you can route calls only to your available users, i.e. who are not in an active call via Exotel platform, without adding them on the Exotel dashboard

Outgoing call: connecting two numbers API

Exotel provides an API for making outbound calls where specifying the phone number of  A (caller) and B (callee) will connect them over a phone call. This API first calls the A number (caller), a user working on your application/CRM. Once A picks up the call, another call is made to B (callee) resulting in a bridge. The resultant Caller Id will be the Virtual Number provided by Exotel, hence actual phone number is masked.

Incoming call: connecting customer to user API

Exotel provides an API for handling incoming calls where you can build call flows using various applets. The CCM programmable version of the Connect applet enables the call flow to be configured. The call flow connects the caller (your customer) to a user (working on your application/CRM) along with additional parameters returned from your URL, which can be configured dynamically per call.

Pre-requisites

  • An active Exotel account.
  • Outbound calling enabled for your Exotel account (reach out to your account manager or hello@exotel.com).
  • An Exophone (virtual number) available within the account.
  • A call flow in Exotel account and association of that call flow with the Exophone.
  • Integration to be completed by the customer development team using API documentation.
  • Calls should be made to non DND numbers only. Please check with account manager for more information.

 

How it works?

If execs have a smartphone

 

 

Outgoing call through CRM/App portal

 

Step 1

You pass the caller and callee numbers and Virtual Number to be connected to the Click to Call API in a POST request. The numbers are passed as A-party (‘from’) and B-party (‘to’) numbers which are the two distinct sides of the conversation (for example: relationship managers and their customers). The number of the user who is initiating the click to call should always be passed in the ‘from’ parameter. You can specify if you want Exotel to manage the state of that user’s number (busy, available etc.) by passing the attribute state_management as ‘true’ as per the API contract.

Apart from the parties’ numbers you can also pass other desired parameters like:

  • Recording: To get the call recording at the end of the call
  • CustomField: which can be any alphanumeric string and helps you identify call.
  • StatusCallback: a callback url to receive metadata post call completion.
  • StatusCallbackEvents: pass is as terminal
  • Request params should be in form data
  • StatusCallbackEvents : json or multipart as desired

 

POST

https://<your_api_key>:<your_api_token>@<subdomain>/v3/accounts/<your_sid>/calls

{
   "from":{
      "contact_uri":"xxxxx43026",
      "state_management":true
   },
   "to":{
      "contact_uri":"xxxxx16844"
   },
   "recording":{
      "record":true,
      "channels":"single"
   },
   "virtual_number":"+91xxxx499102",
   "max_time_limit":4000,
   "attempt_time_out":45,
   "custom_field":"test_call",
   "status_callback":[
      {
         "event":"terminal",
         "url":"https://webhook.site/aecd85dc-f959-48b5-abaf-d45189037e09"
      }
   ]
}

 

Step 2

In response to this request, Exotel will now place a call connecting both the parties via the Virtual Number.

 

{
   "request_id":"5894a7b946f248e38a7e185b22d4d309",
   "method":"POST",
   "http_code":200,
   "metadata":null,
   "response":{
      "code":200,
      "error_data":null,
      "status":"success",
      "call_details":{
         "sid":"5e9ec1f6e4af55fe9c6d5e2ba00e16bn",
         "direction":"outbound",
         "virtual_number":"022xxxx9102",
         "state":"active",
         "status":null,
         "legs":"/v3/accounts/Exotel/calls/5e9ec1f6e4af55fe9c6d5e2ba00e16bn/legs",
         "created_time":"2022-11-23T11:44:39+05:30",
         "updated_time":"2022-11-23T11:44:39+05:30",
         "start_time":"2022-11-23T11:44:39+05:30",
         "end_time":null,
         "total_duration":null,
         "total_talk_time":null,
         "custom_field":"test_call",
         "app_id":null,
         "app_name":null,
         "digits":null,
         "recordings":null
      }
   }
}
{
  "request_id": "5894a7b946f248e38a7e185b22d4d309",
  "method": "POST",
  "http_code": 200,
  "metadata": null,
  "response": {
    "code": 200,
    "error_data": null,
    "status": "success",
    "call_details": {
      "sid": "5e9ec1f6e4af55fe9c6d5e2ba00e16bn",
      "direction": "outbound",
      "virtual_number": "022xxxx9102",
      "state": "active",
      "status": null,
      "legs": "/v3/accounts/Exotel/calls/5e9ec1f6e4af55fe9c6d5e2ba00e16bn/legs",
      "created_time": "2022-11-23T11:44:39+05:30",
      "updated_time": "2022-11-23T11:44:39+05:30",
      "start_time": "2022-11-23T11:44:39+05:30",
      "end_time": null,
      "total_duration": null,
      "total_talk_time": null,
      "custom_field": "test_call",
      "app_id": null,
      "app_name": null,
      "digits": null,
      "recordings": null
    }
  }
} 
{
  "request_id": "d1ee94394086491b88ac3439508975cf",
  "method": "POST",
  "http_code": 400,
  "metadata": null,
  "response": {
    "code": 400,
    "error_data": {
      "code": 10725,
      "description": " to to.contact_uri is invalid",
      "message": "Invalid request body,failed parsing"
    },
    "status": "failure",
    "call_details": null
  }
}

 

Step 3

  • Login to my.exotel.com (Singapore region) or my.in.exotel.com (Mumbai region) 
  • Navigate to ‘App Bazaar’ link under the Admin section on the left panel
    • Under ‘Custom Apps’ section, create a new call flow
    • Within the call flow, select the ‘Connect’ applet -> ‘Configure parameters dynamically by providing a URL (Call Center Connect) option’ (as per the screenshot below))
    • Enter the primary and secondary (if any) URLs through which you are going to return your user’s number/s to be connected to an incoming call.

 

  • Navigate to the ‘Exophones’ link under the Admin section on the left panel and purchase an Exophone (Virtual Number)
  • Assign this Exophone (Virtual Number) to the call flow previously created

 

Step 4

  • When an incoming call arrives on the Virtual Number, Exotel will make an HTTP GET request to the provided URL with a unique identifier for the call, calling customer number and a few other details.
curl -XGET "https://customerWebhook.com/ccm-programmable-connect?CallSid=07a971107d0f3ee459a21b90c0d616ba&Created=Thu%2C%2010%20Nov%202022%2012%3A18%3A36&CurrentTime=2022-11-10%2012%3A18%3A44&DialCallDuration=0&DialWhomNumber=&Direction=incoming&From=08516043026&StartTime=2022-11-10%2012%3A18%3A36&To=01135124157"

 

  • In response to this request from Exotel, your end point should return the contact number of your user.  You can specify the state_management parameter as ‘true’, in case you don’t want Exotel to dial out a number if it’s busy on another call going through Exotel platform. If you want to return multiple users’ contact numbers to be tried, please include that under the destination parameter as shown in the sample response below

 

{
  "fetch_after_attempt": false,
  "destination": [
    {
      "contact_uri": "+91xxxxx43210"
    },
    {
      "contact_uri": "sip:gauravjfb55d386"
    },
    {
      "contact_uri": "+91xxxxx78763"
    }
  ],
  "state_management": true,
  "outgoing_phone_number": "xxxxx54123",
  "sticky_agent": false,
  "recording": {
    "record": true,
    "channels": "single"
  },
  "max_ringing_duration": 30,
  "max_conversation_duration": 900,
  "music_on_hold": {
    "type": "default_tone"
  },
  "parallel_ringing": {
    "activate": true,
    "max_parallel_attempts": 5
  },
  "call_event_passthru_url": "http://dial_passthru_event_url.com",
  "start_call_playback": {
    "type": "text",
    "value": "hello, this is a sample text"
  }
}

 

Step 5

Anytime during an ongoing call of after the call is over, you can get the details of the call or the different parties/legs associated with a call using the following APIs:

 

  • To get the details of any single call during any point in time, please make an HTTP GET request to
GET

https://<your_api_key>:<your_api_token><subdomain>/v3/accounts/<your_sid>/calls/<call_sid>

 

  • To obtain the details of all the calls, in bulk, being made through your account, please make an HTTP GET request to
GET

https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Calls

 

  • To obtain the details of all the call legs associated with a call, please make an HTTP GET request to
GET

https://<your_api_key>:<your_api_token><subdomain>/v3/accounts/<your_sid>/calls/<callSid>/legs

Industry application

  • Last Mile Delivery (3PLs) 
  • Last Mile Connect - Marketplace Aggregators (Cabs, Food, Utility Services, etc.)
  • Jobs/Recruitment Platforms
  • BFSI - Relationship Manager Use Cases
  • EdTech/FinTech - Advisors
  • Non-Contact Centre Lead Management (Business Development Managers) → via CRMs
    • BFSI
    • FinTech
    • EdTech
  • E-commerce Portals (Buyer-Seller Connect / Order Confirmation)

 

Pricing

There are three SKUs under this solution: 

  • Software Rentals: This is monthly fixed charge for availing the Exotels services
  • Call Charges: Normal call charges, charged at pulse rate (where pulse can be 30s, 60s, or any other agreed upon value)
  • Virtual Number rental: Based on the plan selected, Virtual Number rental will be applicable. You can read more about pricing plans here: https://exotel.com/pricing/

 

Advantages

  • Faster integration- No mandate of adding and managing users in to the Exotel dashboard for the industry applications/use cases mentioned above
  • Improved call pick-up rates where the users are not added to the dashboard
  • Customer and your users' privacy with their numbers masked throughout the transaction
  • Platform reliability with an uptime of 99.996% as we own PRI lines and servers in 11 major regions of India