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

# Connect a phone line

> Put your Mantle agent behind a phone number with Twilio, jambonz, AudioCodes, or Genesys.

When your agent sounds right in the Inspector, connect it to a phone line. Your
telephony provider answers the call and streams the audio to your agent. The
agent transcribes it, runs the turn, and streams speech back, using the
[speech providers](https://rasa.com/docs/mantle/reference/speech-providers.md) you configure on the channel.

Your skills do not change. You add one channel to `integrations.yml` and point
your provider at it.

## Before you start

* **A license with voice enabled.** Telephony channels check for it at startup.
  The Inspector's voice mode does not need it.
* **A public URL for your agent.** The provider must reach your server over the
  internet. For local testing, use a tunnel such as ngrok.
* **A speech provider API key**: `DEEPGRAM_API_KEY` for the Deepgram default,
  or `AZURE_SPEECH_API_KEY`, `CARTESIA_API_KEY`, or `RIME_API_KEY` for the other
  supported providers.

## Add the channel

Every telephony channel takes the same core settings:

```yaml integrations.yml theme={null}
channels:
  rest: { enabled: true }
  inspector: { enabled: true }
  twilio_media_streams:
    enabled: true
    server_url: agent.example.com
    asr:
      name: deepgram
      language_map:
        en:
          language: en
          model: flux-general-en
    tts:
      name: deepgram_flux
      language_map:
        en:
          model: flux-alexis-en
    interruptions:
      enabled: true
```

`server_url` is the public host name of your agent, and `asr` and `tts` choose the
speech providers (see [Speech providers](https://rasa.com/docs/mantle/reference/speech-providers.md)). All three are
required. Callers can talk over the agent only if you turn on `interruptions`,
which are off by default on telephony channels. To play office or call-centre
noise under the call, add `background_audio`. These options and `silence_timeout`
are described under
[Voice channels](https://rasa.com/docs/mantle/reference/integrations-yml.md#voice-channels).

Restart the agent after changing `integrations.yml`. Every channel's URLs start
with `https://<server_url>/webhooks/<channel>/`.

## Choose your provider

### Twilio

Use `twilio_media_streams`. Optional `username` and `password` protect the
webhook with HTTP basic authentication.

In the Twilio console, set your phone number's incoming-call webhook to
`https://<server_url>/webhooks/twilio_media_streams/webhook` (HTTP POST). The
webhook answers with TwiML that connects the call's audio to your agent.

Twilio channels need the `channels` extra: `pip install "rasa-pro[channels]"`.

### jambonz

Use `jambonz_stream`. Optional `username` and `password` protect the webhook
with HTTP basic authentication, and must be set together.

In jambonz, create an application whose calling webhook is
`https://<server_url>/webhooks/jambonz_stream/webhook` and whose call status
webhook is `https://<server_url>/webhooks/jambonz_stream/call_status`, then
route your number to it.

### AudioCodes

Use `audiocodes_stream` (beta), and set `token` to a shared secret.

In AudioCodes VoiceAI Connect, configure a bot connection that streams audio to
`wss://<server_url>/webhooks/audiocodes_stream/websocket`, with the same token.

### Genesys Cloud

Use `genesys`, which connects through Genesys AudioHook. Set `api_key`, and
optionally `client_secret` to verify request signatures.

In Genesys Cloud, configure an AudioHook integration that connects to
`wss://<server_url>/webhooks/genesys/websocket` with the same credentials.

On Genesys, an accepted interruption ends the agent's turn, but audio already
sent to Genesys still plays.

## Keypad input (DTMF)

Twilio, jambonz, AudioCodes, and Genesys pass keypad presses (DTMF) to your
agent. To collect digits, add `dtmf:` to a collect step. See
[DTMF collect steps](https://rasa.com/docs/mantle/reference/ordered-block-steps.md#dtmf).
The Inspector does not send keypad input, so test those steps on a real call.

## Caller details

Channels can pass metadata about the call, such as the caller's number, when
the conversation starts. To use a value in your skills, declare a project memory
field with `seed: true`. See
[Seeding from session start](https://rasa.com/docs/mantle/reference/memory-yml.md#seeding-from-session-start).

## Test the line

1. Start the agent with `rasa run`, and make sure the provider can reach
   `server_url`.
2. Call your number. With a greeting skill, you hear the agent first; otherwise
   speak first.
3. Watch the call in your traces and metrics. See
   [Test and monitor voice](https://rasa.com/docs/mantle/voice/testing.md).

Repeat the speech-path cases on this line, including short confirmations,
interruptions, and keypad entry. An Inspector test does not exercise your
provider's webhook, WebSocket connection, or telephony audio conversion.

If the call connects but there is no greeting, check that the session-start skill
actually speaks and that TTS starts successfully. If it never reaches the agent,
check the public host, TLS certificate, webhook path and method, and any shared
credentials. Your proxy must allow WebSocket upgrades for the streaming
connection. Do not include credentials in shared diagnostic logs.

## Reference

All channel keys, including the Inspector's voice settings, are on
[`integrations.yml` → Voice channels](https://rasa.com/docs/mantle/reference/integrations-yml#voice-channels).


## Related topics

- [Test and monitor voice](https://rasa.com/docs/mantle/voice/testing.md)
- [Voice agents](https://rasa.com/docs/mantle/voice/overview.md)
- [Build a voice agent](https://rasa.com/docs/mantle/voice/tutorial.md)
- [Twilio Voice](https://rasa.com/docs/reference/channels/twilio-voice.md)
- [Audiocodes VoiceAI Connect](https://rasa.com/docs/reference/channels/audiocodes-voiceai-connect.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.