> ## Documentation Index
> Fetch the complete documentation index at: https://revolai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Telephony (VoIP)

> Connect Twilio, Ringostat, or Binotel for AI-powered phone calls

## Supported Providers

| Provider      | Inbound Calls | Outbound Calls | SMS | Webhook Auto-Setup |
| ------------- | ------------- | -------------- | --- | ------------------ |
| **Twilio**    | Yes           | Yes            | Yes | Automatic          |
| **Ringostat** | Yes           | Yes            | No  | Manual             |
| **Binotel**   | Yes           | Yes            | No  | Manual             |

## Setup

<Tabs>
  <Tab title="Twilio">
    ### Credentials

    You need two values from the [Twilio Console](https://console.twilio.com/):

    | Field           | Where to find            |
    | --------------- | ------------------------ |
    | **Account SID** | Dashboard → Account Info |
    | **Auth Token**  | Dashboard → Account Info |

    ### Steps

    <Steps>
      <Step title="Add Integration">
        Go to **Integrations** → **Add Integration** → select **Twilio** from the Telephony category.
      </Step>

      <Step title="Enter Credentials">
        Choose a company, give the integration a name (e.g., "Main Phone Line"), and enter your Account SID and Auth Token.
      </Step>

      <Step title="Verify & Select Number">
        Click **Test Connection**. Revol fetches your available phone numbers. Select the number to use.
      </Step>

      <Step title="Save">
        Revol automatically configures the webhook URL on the selected Twilio number. Incoming calls and SMS are routed to your agent.
      </Step>
    </Steps>

    <Note>
      Twilio webhook URLs are configured automatically. You don't need to set anything in the Twilio Console.
    </Note>
  </Tab>

  <Tab title="Ringostat">
    ### Credentials

    | Field                  | Where to find                          |
    | ---------------------- | -------------------------------------- |
    | **API Key (Auth-key)** | Ringostat Dashboard → API Settings     |
    | **Project ID**         | Ringostat Dashboard → Project Settings |

    ### Steps

    <Steps>
      <Step title="Add Integration">
        Go to **Integrations** → **Add Integration** → select **Ringostat**.
      </Step>

      <Step title="Enter Credentials">
        Enter your API Key and Project ID.
      </Step>

      <Step title="Verify">
        Revol fetches your SIP accounts to confirm the connection.
      </Step>

      <Step title="Configure Webhook">
        In the Ringostat dashboard, set the webhook URL displayed in Revol after verification.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Binotel">
    ### Credentials

    | Field          | Where to find                      |
    | -------------- | ---------------------------------- |
    | **API Key**    | Binotel Dashboard → Settings → API |
    | **API Secret** | Binotel Dashboard → Settings → API |

    ### Steps

    <Steps>
      <Step title="Add Integration">
        Go to **Integrations** → **Add Integration** → select **Binotel**.
      </Step>

      <Step title="Enter Credentials">
        Enter your API Key and API Secret.
      </Step>

      <Step title="Verify">
        Revol fetches your internal phone numbers to confirm the connection.
      </Step>

      <Step title="Configure Webhook">
        In the Binotel dashboard, set the webhook URL displayed in Revol after verification.
      </Step>
    </Steps>

    <Warning>
      Binotel webhooks are validated by IP allowlist. Only requests from Binotel's servers are accepted in production.
    </Warning>
  </Tab>
</Tabs>

## Agent Tools

After connecting a VoIP provider, the following tools are automatically provisioned:

| Tool                   | Twilio | Ringostat | Binotel | Description                                                        |
| ---------------------- | ------ | --------- | ------- | ------------------------------------------------------------------ |
| **make\_call**         | Yes    | Yes       | Yes     | Initiate an outbound call with optional greeting message           |
| **send\_sms**          | Yes    | —         | —       | Send an SMS message (auto-selects sender number)                   |
| **get\_call\_history** | Yes    | Yes       | Yes     | Retrieve recent call logs with filters (phone, status, date range) |

These tools become available in the agent's **Tools** tab and can be added to workflow nodes.

## Voice Call Flow

When an incoming call arrives, Revol processes it through the assigned agent's workflow:

<Steps>
  <Step title="Incoming Call">
    VoIP provider sends a webhook notification to Revol with caller information.
  </Step>

  <Step title="Greeting">
    Revol generates an audio greeting using Text-to-Speech (configurable voice and language) and plays it to the caller.
  </Step>

  <Step title="Speech-to-Text">
    Caller's speech is captured and transcribed using Whisper or Google STT.
  </Step>

  <Step title="AI Processing">
    Transcribed text is sent to the agent's workflow. The agent processes it through LLM nodes, knowledge base lookups, and tool calls.
  </Step>

  <Step title="Text-to-Speech">
    Agent's text response is converted to audio using OpenAI TTS with configurable voice and speed.
  </Step>

  <Step title="Response">
    Audio is played back to the caller. The conversation continues in a loop until the call ends.
  </Step>
</Steps>

## Using Tools in Workflow Nodes

To make your agent use VoIP tools during conversations:

1. Go to the agent's **Workflow** tab
2. Create or select a **custom node** (LLM-powered)
3. In the node settings, enable the VoIP tools (e.g., `make_call`, `get_call_history`)
4. The LLM will automatically decide when to call these tools based on the conversation context

For example, if a customer asks "Can you call me back at +380501234567?", the agent will use the `make_call` tool to initiate an outbound call.

## Webhook Security

| Provider  | Validation Method                                              |
| --------- | -------------------------------------------------------------- |
| Twilio    | HMAC-SHA1 signature verification (`X-Twilio-Signature` header) |
| Ringostat | Structural parameter validation                                |
| Binotel   | IP allowlist (Binotel server IPs only in production)           |

All VoIP webhooks are rate-limited to **120 requests per minute** per channel.
