---
title: Connect Exotel SIP trunking with Vocallabs (Superflow B2B API)(Alpha)
slug: exotel-agentstream/connect-exotel-sip-trunking-with-vocallabs-superflow-b2b-apialpha
createdAt: 2026-04-01T16:44:16.969Z
---

This guide links **Exotel SIP trunking** and your **Exotel DID** to **Vocallabs**. Vocallabs publishes a **B2B REST API** on **https\://api.superflow\.run/b2b/** — including **createSIPCall** with did, phone\_number, websocket\_url, and webhook\_url — not the same **dashboard BYO SIP trunk** pattern as Vapi or ElevenLabs. Use this article for **API + telephony alignment**; confirm **inbound SIP URIs** and **static egress IPs** with Vocallabs if you need classic trunk **destination-uris** / **whitelisted-ips**.

**GitHub repo (reference):** https\://github.com/exotel/AgentStream-VoiceAIEcosystem

:::BlockQuote
**Applicability:** **API-driven** (token + createSIPCall / websockets / webhooks). SIP trunk routing is optional and only applies if Vocallabs provides a stable SIP target.
:::

:::BlockQuote
**Docs:** Vocallabs API documentation (hosted API reference and samples).
:::

:::BlockQuote
**Engineering detail:** vocallabs/integrations/exotel-vsip/vocallabs-exotel-voice-ai-connector.md
:::

:::BlockQuote
**Quickstart:** vocallabs/integrations/exotel-vsip/QUICKSTART.md
:::

## Vocallabs API (from official docs)

| Topic                | Detail                                                                                               |
| -------------------- | ---------------------------------------------------------------------------------------------------- |
| Base                 | https\://api.superflow\.run/b2b/                                                                     |
| Auth                 | POST …/createAuthToken/ — JSON clientId, clientSecret → **Bearer** token for subsequent calls (docs) |
| SIP call             | POST …/vocallabs/createSIPCall — phone\_number, did, websocket\_url, webhook\_url, sample\_rate      |
| Outbound-style calls | POST …/vocallabs/initiateVocallabsCall — agentId, prospect\_id                                       |
| Webhook dial         | POST …/vocallabs/initiateCallWebhook — from (DID), number (destination)                              |
| Websocket URL        | GET …/vocallabs/getWebsocketUrl — query agent\_id, prospect\_id                                      |

**Wallet / usage:** GET …/getGreenBalance, transaction history — see Vocallabs docs for billing context.



## How this maps to Exotel

| Concept               | Exotel side                                                         | Vocallabs side                                                                                                                                                                                                   |
| --------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **DID**               | Exophone on SIP trunk (snippets)                                    | Use the same E.164 as **did** (or from in webhook flows) where the API expects your caller / rented number                                                                                                       |
| **PSTN termination**  | Exotel edge **IP\:port** + digest (POST …/credentials)              | **Not** fully specified in the public reference as a single “SIP gateway hostname” like other providers — **coordinate with Vocallabs** for SIP leg details if createSIPCall is meant to drive traffic to Exotel |
| **Inbound PSTN → AI** | Trunk **destination-uris** + Flow **Connect** **sip:\<trunk\_sid>** | Requires a **SIP origination target** from Vocallabs. If their team only documents **REST + websocket**, implement that path first; add **destination-uris** when they provide a stable SIP URI                  |

## Part A — Vocallabs (auth + SIP call)

### 1. Create token

:::BlockQuote
curl -s -X POST 'https\://api.superflow\.run/b2b/createAuthToken/' \\
&#x20; -H 'Content-Type: application/json' \\
&#x20; -d '\{"clientId":"CLIENT\_ID","clientSecret":"CLIENT\_SECRET"}'
:::

Use the returned token as **Authorization: Bearer \<token>**.

### 2. Create SIP call (example shape)

Per [Vocallabs API docs](https://docs.vocallabs.ai/vocallabs):

:::BlockQuote
curl -s -X POST 'https\://api.superflow\.run/b2b/vocallabs/createSIPCall' \\
&#x20; -H 'Content-Type: application/json' \\
&#x20; -H 'Authorization: Bearer AUTH\_TOKEN' \\
&#x20; -d '\{
&#x20;   "phone\_number": "+91XXXXXXXXXX",
&#x20;   "did": "+91YYYYYYYYYY",
&#x20;   "websocket\_url": "wss\://your-bridge.example.com/media",
&#x20;   "webhook\_url": "https\://your-app.example.com/vocallabs/webhook",
&#x20;   "sample\_rate": "16000"
&#x20; }'
:::

Replace **did** with your **Exotel number** in E.164 when that number is the identity Vocallabs should use for the session. **websocket\_url** / **webhook\_url** must be **your** endpoints as required by Vocallabs — see their latest field definitions.

### 3. Other flows

- **initiateVocallabsCall** — agent + prospect (docs).
- **initiateCallWebhook** — from / number for click-to-call style flows.
- **getWebsocketUrl** — retrieve media URL for agent\_id + prospect\_id.

## Part B — Exotel (SIP trunk + DID)

When you use Exotel as the **Indian PSTN carrier** for the same DID you pass to Vocallabs:

1. **Create trunk** → **map DID** → **POST …/credentials** (if your design uses SIP digest toward Exotel).
2. Templates: \_exotel-trunk-api-snippets.md.
3. **Optional:** POST …/whitelisted-ips **only** if Vocallabs publishes **fixed static egress IPs** (mask: 32 per IP).
4. **Inbound** (only if Vocallabs gives you a **SIP URI** to send calls to):
   POST …/destination-uris toward that URI → **Flow → Connect** → **sip:\<trunk\_sid>** ([Detailed SIP Trunking API Reference](docId:2OdDTEDmmf64scwjhGVkT).

## Troubleshooting

| Symptom                | What to check                                                                                  |
| ---------------------- | ---------------------------------------------------------------------------------------------- |
| **401** on Superflow   | Valid **createAuthToken** + **Bearer** header                                                  |
| Call fails / wrong CLI | **did** / **from** match **E.164** Exotel number you own                                       |
| No media               | **websocket\_url**, **getWebsocketUrl**, firewall to Vocallabs / your bridge                   |
| SIP vs API mismatch    | Vocallabs may be **API-first** — confirm with their team before assuming full SIP trunk parity |

## References

| Resource                  | URL                                                                               |
| ------------------------- | --------------------------------------------------------------------------------- |
| Vocallabs API docs        | https\://docs.vocallabs.ai/vocallabs                                              |
| Exotel SIP API            | https\://docs.exotel.com/dynamic-sip-trunking/detailed-sip-trunking-api-reference |
| Exotel network / firewall | https\://docs.exotel.com/dynamic-sip-trunking/network-and-firewall-configuration  |

