# Exotel WebRTC Calling - Setup Guide

***

### Integration Capabilities

The Exotel WebRTC integration empowers users to manage all inbound and outbound calls **directly within the LimeChat CRM**, **eliminating the need for mobile phones**. This seamless integration allows users to make and receive calls effortlessly through the CRM interface, ensuring a **streamlined** and **efficient** **calling** **experience**.

***

### Integration Steps

{% hint style="info" %}
Before creating an inbox, please check whether the users are present on the Exotel dashboard or not. If the users(agents) are already present on the Exotel dashboard, please get them deleted by raising a support request with Exotel. Now you can proceed with inbox creation.
{% endhint %}

{% hint style="info" %}
Please mail the exotel team to get V1 Leg APIs enabled for this account.
{% endhint %}

#### Inbox Creation

To create a Exotel WebRTC. Voice inbox

{% stepper %}
{% step %}
Go to Settings Section → Inboxes Section → Add Inbox Button → Voice channel → Exotel WebRTC

Add a screen shot here
{% endstep %}

{% step %}
**Fill Details**

You will be required to fill the following credentials:

* Inbox Name (*This is only for internal purposes and will not be visible to your customers)*
* Domain
* Account SID &#x20;
* Exotel API Key &#x20;
* Exotel API Token&#x20;
* Customer Secret Key &#x20;
* Customer Entity ID &#x20;
* Virtual Number(s)

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FBdwqBuuuAyDuynByWI20%2FScreenshot%202024-12-03%20at%201.00.28%E2%80%AFPM.png?alt=media&#x26;token=b330c75b-389f-4afa-85bb-ee85cb01682e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Phone numbers must start with the country code **without** `+` sign.
{% endhint %}
{% endstep %}

{% step %}
**Create Inbox**

Clicking the **Create Inbox** button will generate an Exotel WebRTC Inbox and take you to the next step of adding agents.&#x20;
{% endstep %}

{% step %}
**Add Agents**&#x20;

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FMlmUWZMwmnG2TTDDLazm%2FScreenshot%202024-11-08%20at%201.26.44%E2%80%AFAM.png?alt=media&#x26;token=7f89d3aa-21ae-4733-97c5-d300a2bea24c" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
Agent Addition is one of the most crucial steps of this process, please carefully follow the steps defined here to correctly add the agents: [steps-for-adding-collaborators-on-webrtc-exotel](https://limechatai.gitbook.io/limechat-product-guide/helpdesk/inboxes/voice-calling-inboxes/exotel-webrtc/exotel-webrtc-calling-setup-guide/steps-for-adding-collaborators-on-webrtc-exotel "mention")
{% endhint %}
{% endstep %}
{% endstepper %}

***

### How to fetch details from Exotel Dashboard

To access your Exotel API Key, API Token, Customer Secret Key, and Customer Entity ID, follow these steps:

**Exotel API Key and API Token**:

1. Log in to your Exotel account
2. Navigate to **Settings** > **API**.
3. Here, you'll find your **API Key** and **API Token**

**Customer Secret Key and Customer Entity ID**:

1. These credentials are essential for authenticating API requests, especially when integrating services like WebRTC.
2. To obtain them, please contact Exotel's support team or your account manager. They will assist you in generating the necessary credentials

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2F4g3kge0NfUOzjPmCAo88%2FScreenshot%202024-11-08%20at%201.18.22%E2%80%AFAM.png?alt=media&#x26;token=99abfcaa-a338-4ea1-b4aa-125415df043c" alt="" width="563"><figcaption></figcaption></figure>

***

### Enabling Incoming Webhooks from Exotel Dashboard

{% stepper %}
{% step %}
Go to Exotel Dashboard

{% endstep %}

{% step %}
Click on `App bazaar`

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FooKp1FzkTB7eyjVwk0A5%2FScreenshot%202024-11-08%20at%201.33.07%E2%80%AFAM.png?alt=media&#x26;token=de571664-6d6b-4631-a98b-85b444ca8fe9" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On this page, either **create a new app** or **edit** an existing one if you already have an app

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FEbAhQlHpBwu17lSjasuU%2FScreenshot%202024-11-08%20at%201.36.26%E2%80%AFAM.png?alt=media&#x26;token=5ebf63a0-cf16-4625-9175-517982142101" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Create** Flows

Flow to be created:

1. **Call Start**: *This defines what should be done when a call starts*
2. Add a "Connect" Voice applet

This applet consists of multiple configurations; choose the following options for this setup.

<table><thead><tr><th width="336">Parameters</th><th>Value to be filled</th><th data-hidden></th></tr></thead><tbody><tr><td>How do you want to control your Connect params? </td><td>"Configure using flow builder here"</td><td></td></tr><tr><td>Dial Whom</td><td>Dial a user or group (And select the relevant group)</td><td></td></tr><tr><td>Distribute Calls</td><td>Choose between "Sequentially" and "Equally" as per your requirement.</td><td></td></tr><tr><td>Record this call?</td><td>Enable this if you want to get a recording of the calls</td><td></td></tr><tr><td>Create popup</td><td>Enter the following endpoint here: <a href="https://messaging.limechat.ai/webhooks/v1/exotel-web-rtc.post-event">https://messaging.limechat.ai/webhooks/v1/exotel-web-rtc.post-event</a></td><td></td></tr></tbody></table>
{% endstep %}

{% step %}
Configure "After the call conversation ends"

Add a "passthrough" applet

* In the Pass through applet add the following endpoint <https://integrationscore.mum1.exotel.com/v2/integrations/call/inbound_call/67b18966-ea15-4416-9ee9-fc127e7c6b61?type=incomingcallhungup>
* Enable "Make Passthru Async"

  <figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2FdD0IkFJvHFMA6S6tjcY5%2FScreenshot%202024-12-03%20at%201.44.50%E2%80%AFPM.png?alt=media&#x26;token=10c702ea-1d4a-41ff-b280-594690a2dee0" alt="" width="563"><figcaption></figcaption></figure>

{% endstep %}

{% step %}
Save this app and the setup is completed
{% endstep %}
{% endstepper %}

***

### Connecting Apps with Exophones

{% stepper %}
{% step %}
Navigate to ExoPhones
{% endstep %}

{% step %}
Edit the "Installed App" and select the required app from the dropdown

<figure><img src="https://303644337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTdWohNbJyoGc4vPpxk1%2Fuploads%2F87PXNHaWGQEOSIcQPj3K%2FScreenshot%202024-11-08%20at%202.14.07%E2%80%AFAM.png?alt=media&#x26;token=2e44bb23-60eb-4905-91e1-a310c8c38001" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
