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

# Phone Call Deployment

> Deploy your AI assistant on inbound and outbound phone calls with full telephony, STT, and TTS configuration.

The Phone Call deployment connects your assistant to the telephone network. Callers interact with your assistant through natural voice conversations over PSTN, SIP, or WebRTC — powered by your choice of telephony provider, speech-to-text engine, and text-to-speech voice.

<Info>
  Phone deployments require a telephony provider (Twilio, Vonage, Exotel, Asterisk, or SIP) with valid credentials configured in your [credential vault](/credential/rapida-credentials).
</Info>

<Tip>
  Use [Listen](/assistants/configuration/listen) and [Speak](/assistants/configuration/speak) to choose STT, TTS, VAD, noise cancellation, EOS, pronunciation, and latency settings before going live.
</Tip>

## Deployment channels

| Channel   | Direction          | Protocol                      |
| --------- | ------------------ | ----------------------------- |
| Twilio    | Inbound + Outbound | WebSocket media streams       |
| Vonage    | Inbound + Outbound | WebSocket audio streaming     |
| Exotel    | Inbound + Outbound | Cloud telephony (India & SEA) |
| Asterisk  | Inbound + Outbound | AudioSocket + WebSocket       |
| SIP Trunk | Inbound + Outbound | Direct SIP (RFC 3261)         |

## Creating a Phone Deployment

Navigate to your assistant, click **Configure Assistant**, then select **Deployments** from the sidebar. Click **Add Deployment** and choose **Phone Call**.

The phone deployment wizard walks you through four steps:

<Steps>
  <Step title="Telephony">
    Select and configure your telephony provider for inbound and outbound calls.

    **Required fields:**

    * **Provider** — Choose from Twilio, Vonage, Exotel, Asterisk, or SIP
    * **Credentials** — Select stored credentials from your vault for the chosen provider
    * **Phone Number** — The phone number associated with this deployment (for outbound caller ID and inbound routing)

    <Tip>
      Store your telephony credentials in the [credential vault](/credential/rapida-credentials) before creating the deployment. The wizard will let you select from your saved credentials.
    </Tip>
  </Step>

  <Step title="General Experience">
    Define how the assistant greets callers and handles session lifecycle.

    **Required fields:**

    * **Greeting** — The opening message spoken when a call connects. Supports `{{variable}}` syntax for dynamic content (e.g., `Hello {{name}}, how can I help you?`)

    **Advanced settings** (expand to configure):

    * **Error Message** — Fallback message spoken when an unexpected error occurs mid-call
    * **Idle Silence Timeout** — Duration of caller silence before Rapida prompts them (15-120 seconds, default: 30s)
    * **Idle Timeout Backoff** — How many times the idle timeout multiplies before ending the session (0-5, default: 2)
    * **Idle Message** — Message spoken when the caller hasn't responded (default: "Are you there?")
    * **Maximum Session Duration** — Hard limit before the call is automatically ended (180-600 seconds, default: 300s)
  </Step>

  <Step title="Voice Input (Speech-to-Text)">
    Configure how caller audio is transcribed into text for the LLM.

    **Required fields:**

    * **STT Provider** — Deepgram, AssemblyAI, Google, Azure, OpenAI Whisper, AWS Transcribe, Cartesia, Rev.ai, Speechmatics, Sarvam, Groq, or Nvidia
    * **Model** — Provider-specific model (e.g., Nova-3 for Deepgram)
    * **Language** — Primary transcription language
    * **Encoding** — Audio encoding format. Use **Mulaw** for Twilio, **PCM** for most other providers
    * **Sample Rate** — Audio sample rate (typically 8000 Hz for telephony)

    **Advanced settings** (expand to configure):

    **Voice Activity Detection (VAD)**

    * **VAD Provider** — Silero VAD (default) for detecting when the caller starts and stops speaking
    * **VAD Threshold** — Sensitivity threshold (0.0-1.0, default: 0.8). Higher values require more confident speech detection

    **Background Noise Removal**

    * **Noise Cancellation Provider** — RNNoise (default). Removes background audio before transcription for improved accuracy

    **End of Speech (EOS) Detection**

    * **EOS Provider** — Silence-based EOS (default). Determines when the caller has finished their turn
    * **EOS Timeout** — Duration of silence that signals turn completion (default: 1000ms). Lower values make the assistant more responsive; higher values accommodate natural pauses

    <Note>
      The EOS timeout is the primary control for perceived latency. For IVR-style interactions, try 700ms. For conversational use cases where callers pause mid-thought, try 1200-1500ms.
    </Note>
  </Step>

  <Step title="Voice Output (Text-to-Speech)">
    Configure how assistant text responses are converted to speech audio.

    **Required fields:**

    * **TTS Provider** — ElevenLabs, Deepgram, Azure, Google, OpenAI, AWS Polly, Cartesia, Resemble, Rime, Sarvam, Neuphonic, MiniMax, Groq, Speechmatics, or Nvidia
    * **Model** — Provider-specific model (e.g., Sonic-2 for Cartesia)
    * **Language** — Output speech language
    * **Voice ID** — The specific voice to use from your TTS provider
    * **Encoding** — Audio encoding. Use **PCM Mulaw** for Twilio
    * **Sample Rate** — Output sample rate

    **Advanced settings** (expand to configure):

    **Pronunciation**

    * **Pronunciation Dictionaries** — Custom pronunciation rules for domain-specific terms, names, acronyms, and technical jargon

    **Conjunction Boundaries**

    * **Conjunction Boundaries** — Conjunctions treated as valid boundaries for adding natural pauses before delivering to the voice provider

    **Pause**

    * **Pause Duration** — Length of pause at conjunction boundaries (100-300ms, default: 240ms)

    Click **Deploy Phone** to save and activate the deployment.
  </Step>
</Steps>

## Configuring Inbound Calls

After deploying, you need to point your telephony provider's webhook to Rapida so incoming calls reach your assistant.

### Twilio

1. Log in to [Twilio Console](https://www.twilio.com/login)
2. Navigate to **Phone Numbers** > **Manage** > **Active numbers**
3. Select the phone number linked to this deployment
4. Under **Voice & Fax**, set **A CALL COMES IN** to **Webhook**
5. Enter the webhook URL:

```
https://assistant-01.rapida.ai/v1/talk/twilio/call/{ASSISTANT_ID}?x-api-key={RAPIDA_API_KEY}
```

6. Set the HTTP method to **POST** and click **Save**

<Tip>
  Find your Assistant ID on the assistant overview page or in the browser URL. Get your API key from the [credential vault](/credential/rapida-credentials).
</Tip>

### Vonage, Exotel, Asterisk, SIP

Each provider has a specific webhook format. See the integration guides:

* [Twilio Integration](/integrations/telephony/twilio)
* [Vonage Integration](/integrations/telephony/vonage)
* [Exotel Integration](/integrations/telephony/exotel)
* [Asterisk Integration](/integrations/telephony/asterisk)
* [SIP Integration](/integrations/telephony/sip)

## Triggering Outbound Calls

Use the Rapida SDK or REST API to programmatically initiate outbound calls:

<CardGroup cols={2}>
  <Card title="Create Call API" href="/api-reference/call/create-call">
    Trigger a single outbound call to a phone number with your assistant.
  </Card>

  <Card title="Bulk Call API" href="/api-reference/call/create-bulk-call">
    Launch outbound dialing campaigns to multiple numbers in parallel.
  </Card>
</CardGroup>

## Related

* [Create an Assistant](/assistants/create-assistant) — Set up your assistant before deploying
* [Listen](/assistants/configuration/listen) — Choose and tune STT, VAD, noise cancellation, and EOS settings
* [Speak](/assistants/configuration/speak) — Choose and tune TTS, voice, pronunciation, and speech delivery settings
* [Twilio Integration](/integrations/telephony/twilio) — Detailed Twilio setup guide
* [Conversation Logs](/activity/conversation-logs) — Monitor call transcripts and metrics
* [Webhooks](/assistants/webhook/overview) — Receive post-call events
