error event is triggered when critical errors occur during call processing, specifically when Large Language Model (LLM) or Speech-to-Text (STT) services fail.
When It’s Triggered
This event is sent when:- LLM Errors: Language model API failures, timeouts, or service unavailability
- STT Errors: Speech-to-text conversion failures or transcription service issues
- Authentication Issues: API key problems or authorization failures
- Quota Exceeded: Service limits reached for LLM or STT providers
- Network Errors: Connectivity issues affecting external service calls
Error Categories
LLM Errors
- Provider API downtime or maintenance
- Rate limiting exceeded
- Model capacity limitations
- Invalid API keys or expired tokens
- Malformed requests or unsupported parameters
- Content filtering or safety violations
STT Errors
- Audio quality too poor for transcription
- Unsupported audio format or codec
- Service provider outages
- Network connectivity issues
- Authentication or quota problems
- Language detection failures
Event Structure
Key Fields
Call Object
Thecall object contains comprehensive information about the call session.
Assistant Object
Theassistant object contains the configuration and settings of the assistant handling the call.
In some webhook events, the assistant object may be truncated for brevity. The full assistant configuration is typically included in
status-update events.Key Subobjects
assistantAnalysis: Contains settings for summary generation, success evaluation, and structured data extractionassistantServer: The webhook configuration that triggered this eventconfig.speech: STT/TTS vendor settings, voice configuration, and language options
Messages Object
Themessages array contains the conversation history between the user and assistant.
Each
conversation-update event includes all messages from the start of the call up to that point, not just the latest message. This ensures that if any individual event is missed, you still have the complete conversation context.Message Structure
Message Metrics
Each message includes detailed performance metrics:Timeline Metrics
totalElapsedTimeMs: Total time since call startoffsetFromPreviousTurnMs: Time gap from previous message
Audio Metrics
totalAudioReceivedMs: Total audio duration receivedaudioDelayPerTurnMs: Audio processing delay for this turndelayedPacketsPerTurnCount: Count of delayed network packets
Speech-to-Text (STT) Metrics
timestampMs: When transcription was completedstartOffsetMs/endOffsetMs: Audio segment boundariesconfidence: Transcription confidence score (0.0 to 1.0)vadMs: Voice activity detection duration
Text-to-Speech (TTS) Metrics
audioDurationMs: Duration of generated audiogenerationTimeMs: Time to generate audioqueueLatencyMs: Processing queue delayisCachePlaying: Whether audio was served from cache
LLM Metrics
responseLatencyMs: Time for LLM to generate responsequeueLatencyMs: Processing queue delay
Message Types
- Welcome Messages: Have
messageIdstarting with “welcome-” - User Messages: Have
messageIdstarting with “user-” - Assistant Messages: Have complex
messageIdwith user reference and timestamp
Example Payloads
Error Handling Strategies
Automatic Retry Logic
Provider Failover
Graceful Degradation
Real-time Alerting
Error Analysis and Monitoring
Error Rate Tracking
Root Cause Analysis
Error Prevention
Proactive Monitoring
Configuration Optimization
Error Recovery Testing
User Communication
When errors occur, transparent communication improves user experience:Related Events
Error events may be preceded by hang events if processing delays occur before the error