Overview
EESI AI uses webhooks to communicate with telephony providers for call events and audio streaming. For outbound calls, EESI builds these URLs and hands them to the provider when it dials — you never configure them by hand. For inbound calls, you point your provider at a single dispatcher URL; see Inbound Calls. Every webhook path lives under/v1/telephony.
Webhook Types
1. Answer Webhook
When an outbound call connects, the provider requests instructions. The path is provider-specific, and EESI appends the routing parameters as a query string:
Telnyx and Asterisk ARI have no answer webhook. Telnyx is call-control style — EESI POSTs the stream and event URLs to Telnyx’s API instead of returning markup. ARI streams over a WebSocket only.
- Twilio (TwiML)
- Vonage (NCCO)
123 is the workflow, 11 the organization, and 789 the workflow run.
2. Status Callbacks
Receive call lifecycle events. Each is keyed on the workflow run:
Providers report their own vocabulary; EESI normalizes it into a common set of states:
initiated- Call request receivedringing- Call is ringingin-progress- Call is connected and streaminganswered- Call was answeredcompleted- Call ended normallybusy- Line was busyno-answer- Call not answeredcanceled- Call was canceled before connectingfailed- Call failederror- Provider reported an error
3. WebSocket Audio Stream
Real-time audio streaming for voice interaction. Endpoint:/v1/telephony/ws/{workflow_id}/{organization_id}/{workflow_run_id}
Asterisk ARI instead connects to /v1/telephony/ws/ari and passes the same three values as query parameters — see Asterisk ARI.
The organization_id segment is the tenant that owns the workflow. EESI scopes every workflow and workflow-run lookup by it, so a run belonging to one organization can never be served under another’s id.
Audio Formats:
- Twilio / Plivo / Vobiz: 8kHz μ-law (MULAW), Base64-encoded in JSON messages
- Vonage: 16kHz Linear PCM, Binary frames
- Asterisk ARI: 8kHz Linear PCM via externalMedia
How It Works
EESI AI automatically:- Constructs webhook URLs based on your deployment
- Passes them to the telephony provider when initiating calls
- Verifies webhook signatures for security:
- Twilio: HMAC-SHA1 signature validation
- Plivo / Vobiz: HMAC-SHA256 signature validation
- Vonage: JWT token verification
- Processes status updates to track call lifecycle
- Manages WebSocket connections for audio streaming
- Handles provider-specific audio formats and protocols
verify_inbound_signature. If you are adding a provider, see Custom Telephony Provider.
Local Development
For local development, use the built-in Cloudflare tunnel:Troubleshooting
Webhook URL not accessible
Webhook URL not accessible
- Verify your domain/tunnel URL is publicly accessible
- Check firewall rules allow incoming HTTPS traffic
- Test with
curlfrom external network
Signature verification failures
Signature verification failures
- Providers sign the full URL, query string included — a proxy that rewrites or reorders query parameters will invalidate the signature
- Confirm the backend’s public URL matches what the provider was given, including scheme and port
WebSocket connection dropping
WebSocket connection dropping
- Check WebSocket upgrade headers are preserved
- Verify no timeout on load balancer/proxy
- Monitor for memory/CPU constraints
Status callbacks not received
Status callbacks not received
- Verify workflow_run_id is included in URL
- Check provider console for webhook errors
- Review webhook retry logs