StreamKit Cloud SIP trunking setup
Use Dynamic SIP Trunking so your contact centre can send SIP to Exotel, and StreamKit bridges media to your AgentStream WebSocket bot.
Customer → CC (SIP) → Exotel StreamKit → AgentStream WSS ↔ bot
Full narrative walkthrough (headers, Passthru escalate, modes): StreamKit Cloud SIP trunking setup on the docs portal. AgentStream bridge overview: StreamKit Cloud.
Map the phone number with "mode": "flow" for Voicebot / StreamKit App Bazaar journeys. For Connect-to-SIP only, use pstn. See Call directions.
Step 1 — Create trunk
| Parameter | Required | Type | Description |
|---|---|---|---|
trunk_name | Yes | String | Alphanumeric + underscores, max 16 chars |
nso_code | Yes | String | Use "ANY-ANY" |
domain_name | Yes | String | {account_sid}.pstn.exotel.com |
Try It
Save response.data.trunk_sid for the next steps.
Step 2 — Map phone number (mode: flow)
| Parameter | Required | Type | Description |
|---|---|---|---|
phone_number | Yes | String | E.164 DID |
mode | Yes | String | Use flow for StreamKit / Voicebot |
Try It
Step 3a — Whitelist IP (outbound)
Required when your system has a static egress IP.
| Parameter | Required | Type | Description |
|---|---|---|---|
ip | Yes | String | Public IPv4 of your SBC / PBX |
mask | No | Integer | CIDR mask (default 32) |
curl -s -u "$EXOTEL_API_KEY:$EXOTEL_API_TOKEN" -X POST \
"https://$EXOTEL_SUBDOMAIN/v2/accounts/$EXOTEL_ACCOUNT_SID/trunks/<trunk_sid>/whitelisted-ips" \
-H "Content-Type: application/json" \
-d '{ "ip": "<your_public_ip>", "mask": 32 }'
Try It
Step 3b — Digest credentials (optional)
Use for cloud platforms with dynamic IPs. You can use ACL, credentials, or both.
| Parameter | Required | Type | Description |
|---|---|---|---|
user_name | Yes | String | SIP digest username |
password | Yes | String | Strong password |
friendly_name | No | String | Label, max 32 chars |
curl -s -u "$EXOTEL_API_KEY:$EXOTEL_API_TOKEN" -X POST \
"https://$EXOTEL_SUBDOMAIN/v2/accounts/$EXOTEL_ACCOUNT_SID/trunks/<trunk_sid>/credentials" \
-H "Content-Type: application/json" \
-d '{
"user_name": "SIP_USER",
"password": "SIP_PASS",
"friendly_name": "voice_ai_platform"
}'
Try It
Step 4 — Firewall
Open Exotel signaling and media IPs on your edge. See Network & firewall and the docs portal Network and firewall configuration.
Step 5 — App Bazaar flow + VoIP Exophone
- Build a flow: Greeting (recommended) → Voicebot or Stream → optional Passthru / Connect
- Map your VoIP Exophone to that flow
Deep how-to: StreamKit Cloud SIP trunking setup · AgentStream overview: StreamKit Cloud
Send SIP INVITE with mandatory X-Exotel-AccountSid: <Account_SID>.
Step 6 — Bot WebSocket
Implement the WebSocket protocol on your wss:// endpoint.