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

# Exotel call adapter

> Configure Exotel outbound calls, credentials, media routing, and status handling.

Use `createExotelCallProvider` from `@agentium/core/telephony`. It implements outbound create, read, hangup, and normalization of already verified status events.

## Before you connect

An AgentStream-enabled account, owned Exophone caller ID, region (`mumbai` or `singapore`), WSS stream URL, and Basic authorization.

```bash theme={null}
npm install @agentium/core@4.0.0
```

This adapter uses HTTP and does not require the carrier's Node SDK. You may still use that SDK in your host to validate callbacks or issue application credentials.

## Configure the provider

This complete factory accepts host-owned configuration. Constructing it does not place a call. Read secrets and route values from your server configuration before calling it.

```typescript theme={null}
import { createExotelCallProvider, type ExotelCallConfig } from "@agentium/core/telephony";

export function createProvider(config: ExotelCallConfig) {
  return createExotelCallProvider({
    routeId: config.routeId,
    allowedFrom: config.allowedFrom,
    accountSid: config.accountSid,
    region: config.region,
    streamUrl: config.streamUrl,
    statusCallbackUrl: config.statusCallbackUrl,
    authorization: config.authorization,
    timeoutMs: config.timeoutMs,
  });
}
```

`routeId` identifies a fixed host-approved route. Version it when the account or destination infrastructure changes. `allowedFrom` is a snapshot of permitted E.164 caller IDs. `authorization` returns the full HTTP header and can read rotating credentials on each request.

Pass this provider to [OutboundCallService](/telephony/quickstart) with an intent store and an authorization function. The [call lifecycle recipe](/examples/telephony) exercises create, deduplication, read, and hangup without dialing.

## Provider behavior

Uses the AgentStream connect route. The destination maps to Exotel `From` and the approved caller ID maps to `CallerId`. Hangup reads active legs and issues a hangup action for each bounded leg. Partial or uncertain results need reconciliation. Your host implements the AgentStream WebSocket media protocol.

## Status and failure handling

Verify provider signature, account, freshness, and replay constraints before normalizing a callback. Resolve tenant and intent from trusted storage; see [callbacks and recovery](/telephony/callbacks).

Create is never automatically retried by this adapter. A timeout after dispatch may mean the carrier accepted the call. Keep the original intent and reconcile it before attempting another effect. Hangup acknowledgement is not a terminal call status.

See the provider's [call API documentation](https://developer.exotel.com/docs/agentstream/connect-voice-ai) for account provisioning, answer documents, and media configuration. Agentium's [telephony contract](/api-reference/core/telephony) describes its neutral request, status, and error types.


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