Skip to main content

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​

ParameterRequiredTypeDescription
trunk_nameYesStringAlphanumeric + underscores, max 16 chars
nso_codeYesStringUse "ANY-ANY"
domain_nameYesString{account_sid}.pstn.exotel.com

Try It​

Save response.data.trunk_sid for the next steps.


Step 2 — Map phone number (mode: flow)​

ParameterRequiredTypeDescription
phone_numberYesStringE.164 DID
modeYesStringUse flow for StreamKit / Voicebot

Try It​


Step 3a — Whitelist IP (outbound)​

Required when your system has a static egress IP.

ParameterRequiredTypeDescription
ipYesStringPublic IPv4 of your SBC / PBX
maskNoIntegerCIDR 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.

ParameterRequiredTypeDescription
user_nameYesStringSIP digest username
passwordYesStringStrong password
friendly_nameNoStringLabel, 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​

  1. Build a flow: Greeting (recommended) → Voicebot or Stream → optional Passthru / Connect
  2. 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.