StreamKit Cloud
StreamKit Developer Quickstart Guide
Bridge your Contact Centre (SIP) and Voicebot (WSS) using Exotel StreamKit Cloud Connector
1. Overview
StreamKit is Exotel’s cloud-based SIP ↔ WSS connector that allows you to connect any SIP-based contact centre (like Avaya, Genesys, Ameyo, or custom PBX) with any WSS-based AI platform (Dialogflow CX, OpenAI, AWS Lex, etc.) in real time.
This document will help you set up an end-to-end integration using:
- Exotel Dynamic SIP Trunking APIs
- AgentStream Applets (Stream and Voicebot / Passthru)
- Custom SIP header and routing configuration
- Voicebot and Agent Assist integration flows
2. Prerequisites
Requirement | Description |
|---|---|
Exotel Account | Sign up for an Exotel account by selecting browser calling and get your Account SID, Auth Key, and Auth Token. |
Virtual Number | Buy or provision a virtual number/Exophone (DID) from Exotel by reaching out to [email protected] and requesting for VoIP Exophone In case, you need the IP<>PSTN Intermix request for Veeno Exophone |
SIP/IVR System | A contact centre or PBX that supports SIP INVITE routing. |
Voicebot Endpoint | WSS server endpoint or AI provider URL (e.g., WebSocket URL:ws://127.0.0.1:5001/media). |
IP Whitelisting | Your Contact Centre PBX/Server IPs must be whitelisted on Exotel. |
Exotel Singaling and Media Ips | Your Contact Centre firewall must whitelist Exotel IPs and Ports |
Test | Do test calls, routing, and in case any support is required, reach out to Exotel Phone System |
3. Step-by-Step Setup
Step 1: Create an Account and Virtual Number
Signup on Exotel Link and select browser calling while signing up
Reach out to [email protected] to procure the VoIP Exophone
Once done, note:
- API Settings Link
- Account SID
- Subdomain
- Auth Key
- Auth Token
- Virtual Number/Exophone Link
Step 2: StreamKit Cloud SIP trunking Setup
Whitelisting ensures Exotel can securely send/receive SIP traffic from your servers.
- You can add multiple IPs.
- for more details refer Detailed SIP Trunking API Reference
Step 3: Set Up Your Call Flow
Use Exotel Flow Builder to define how the call moves from PSTN → SIP → WSS.
- Log into Exotel Dashboard → Create a Flow
- Add Voicebot Applet to connect SIP calls to your Voicebot.

Reference: AgentStream AppletsAgentStream Applet Guide
- If you plan to integrate Agent Assist, use Stream Applet.
- Passthru Applet.

Reference: Passthru Applet
- Programmable Connect: Working with Connect Applet (Dynamic URL)Connect applet in case you want to route a call back to the contact centre
- We have to add the greeting applet as the first applet with text as …
- Note: if we don't add this, in that case, we will observe the voice blank issue, and the call will get disconnected in around 20 to 23 seconds
- Map VoIP Exophone to the flow Using Existing Phone Number (for VoIP exophone procurement reachout to support)
Step 4: Send SIP INVITE at the Right Stage
From your Contact Centre or PBX, trigger a SIP INVITE to the Exotel SIP domain with required headers. Please do followthe mandatory headers as per the setup guide
Refer aswell Network & Firewall Configuration
Use this flow:
Please do send X-Exotel-AccountSid:(Account_SID) for correct routing and CLI capture- Mandate
Step 5: Add Custom Headers
In SIP invite Contact center can pass custom headers ,
Custom headers help StreamKit voicebot applet decide which bot or campaign to route the call to.
Sample headers supported:
Supports 800 bytes per header and overall 4KB total
Note: Currently, additional custom headers above are supported on VoIP Exophone only.
Step 6: Talk to the Voicebot (WSS)
Once the SIP INVITE is accepted:
- StreamKit opens a WSS connection to your voicebot.
- The SIP custom headers(X-UUI and X-Custom-Headers) are supported in two ways
- It is received as part of the start event custom_parameters of the Voicebot/Stream Applet
- custom_parameters Key1 value is fetched from wss query params and passed at start event
- Received as additional SIPCustomHeader Query parameters in https GET request of programmable applets: Passthru ,Voicebot, Stream and Connect.
GET /your-voicebot-url?CallSid={call_sid}
&CallFrom=073XXXXXXX
&CallTo={destination}
&Direction=incoming
&SIPCustomHeader[Custom-Header]=salesbot
&SIPCustomHeader[UUI]=handoff-token-up-to-800-bytes
&SIPCustomHeader[User-to-User]=XXXXXXXXXXXXX...
&SIPCustomHeader[Campaign-ID]=outbound-camp-42
&SIPCustomHeader[Customer-ID]=CUST-556677
&SIPCustomHeader[JWT]=eyJhbGciOiJIUzI1NiJ9...
&SIPCustomHeader[Cert-Obj]=eyJhbGciOiJIUzI1NiJ9...- RTP ↔ PCM16 media is exchanged.
- Bot starts real-time ASR/TTS or speech-to-speech conversation.
Reference Doc: Voicebot Applet and bidirectional Integration Guide
Step 7: Notify or Escalate via Passthru Applet
Use Passthru Applet to notify your contact center or escalate to an agent.
Supported modes:
- Notification Mode: Bot triggers webhook via Passthru Applet.
- Transfer Mode: Bot requests SIP Transfer to transfer call to agent by creating another trunk at Exotel
API Steps to create a Trunk
- Detailed SIP Trunking API Reference for Inbound call
- Create a Flow using Connect Applet in App Bazaar
- Use sip:<TrunkID> in the Dial Whom field
- For custom routing, use a Dynamic URL to fetch the destination URI and pass headers
- Supports up to 10 custom SIP headers, e.g.,X-*=value, X-param1=value1 (max 800 bytes each)- max 4000 bytes total
- Headers prefixed with Exotel- or Veeno- are platform-reserved
Connect Applet – Dynamic URL Response Example:
{
"fetch_after_attempt": false,
"destination": { "trunk": "trunk-2134" },
"custom_params": "param1=value1¶m2=value2",
"record": true,
"recording_channels": "dual"
}Reference: Programmable Connect: Working with Connect Applet (Dynamic URL)Connect Applet – Dynamic URL
4. Special Scenarios
Scenario | Description |
|---|---|
Voicebot Mode | SIP ↔ WSS full-duplex. Bot handles ASR + TTS or speech-to-speech using Voicebot applet |
Agent Assist Mode | Unidirectional WSS stream from caller to AI (for analysis, not speech output) using Stream start and stop applet |
Agent Monitored Bot | Hybrid – bot monitors conversation and provides insights. |
Post-Call Notify | StreamKit triggers the Passthru Applet after call completion for analytics or CRM updates. |
5. Example Flow
Voicebot Scenario
Agent Assist Scenario
6. Compliance & Data Localization
- All media and logs stay within India (Local PoPs).
- DoT and TRAI voice compliance is ready.
- Optional encrypted call recording with region-specific storage.
7. Quick Links
Resource | URL |
|---|---|
Dynamic SIP Trunking | https://docs.exotel.com/dynamic-sip-trunking |
Virtual SIP Trunk to Flow Guide | https://docs.exotel.com/dynamic-sip-trunking/exotel-virtual-sip-trunking-to-flow-integration-guide |
AgentStream Applet | https://docs.exotel.com/exotel-agentstream/agentstream-applets |
Passthru Applet | https://docs.exotel.com/exotel-agentstream/passthru-applet |
Flow & API Config | https://docs.exotel.com/dynamic-sip-trunking/flow-and-api-configuration-guide-for-voice-ai-and-contact-centre-platforms |