TheDocumentation Index
Fetch the complete documentation index at: https://docs.interactly.ai/llms.txt
Use this file to discover all available pages before exploring further.
hang event is triggered when the assistant fails to respond for 5+ seconds during a conversation. This indicates potential issues with LLM processing, connectivity, or system overload.
When It’s Triggered
This event is sent when:- The assistant takes longer than 5 seconds to generate a response
- LLM API calls experience high latency or timeouts
- System processing queues become backlogged
- Network connectivity issues affect response generation
Event Structure
Key Fields
| Field | Type | Description |
|---|---|---|
message.type | string | Always “hang” for this event |
message.timestamp | number | Unix timestamp when hang was detected |
call.status | string | Typically “ongoing” when hang occurs |
messages | array | Conversation history up to the point of hang |
Call Object
Thecall object contains comprehensive information about the call session.
| Field | Type | Description |
|---|---|---|
id | string | Unique call identifier (e.g., “WC-82015760-c3bd-427d-a23b-ba9b07e4ab85”) |
teamId | string | Organization/team identifier |
assistantId | string | ID of the assistant handling this call |
callType | string | Type of call: “web”, “phone”, etc. |
direction | string | Call direction: “inbound” or “outbound” |
startAt | string | ISO timestamp when call started |
endAt | string | ISO timestamp when call ended (only in end-of-call-report) |
userNumber | string | User’s phone number or identifier |
assistantNumber | string | Assistant’s number or identifier |
status | string | Current call status: “queued”, “ongoing”, “finished”, “forwarded” |
phoneCallStatus | string | Detailed phone status: “in-progress”, “completed”, etc. |
phoneCallStatusReason | string | Human-readable status reason |
callEndTriggerBy | string | What triggered call end: “bot”, “user”, “system” |
assistantCallDuration | number | Duration of call in milliseconds |
analysis | analysis-object | Call analysis results |
recording | object | Recording information with S3 bucket and path |
assistantOverrides | object | Dynamic variables and validation overrides |
metadata | object | Custom metadata associated with the call |
cost | object | Cost breakdown (only in end-of-call-report) |
metrics | object | Detailed call metrics (only in end-of-call-report) |
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.| Field | Type | Description |
|---|---|---|
_id | string | Unique assistant identifier |
name | string | Display name of the assistant |
welcomeMessage | string | Message played when call starts |
welcomeMessageMode | string | How welcome message is triggered: “automatic”, “manual” |
welcomeMessageInterruptionsEnabled | boolean | Whether users can interrupt welcome message |
endCallMessage | string | Message played when call ends |
endCallPhrases | array | Phrases that trigger call termination |
bargeInEnabled | boolean | Whether users can interrupt assistant responses |
assistantProvider | string | LLM provider: “openai”, “anthropic”, “gemini”, etc. |
assistantModel | string | Specific model being used |
assistantSystemPrompt | string | System prompt defining assistant behavior |
assistantTemperature | number | LLM creativity setting (0.0 to 1.0) |
assistantMaxTokens | number | Maximum tokens per response |
assistantAnalysis | object | Configuration for call analysis features |
assistantServer | object | Webhook configuration for this assistant |
config | object | Speech-to-text and text-to-speech configurations |
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
| Field | Type | Description |
|---|---|---|
messageId | string | Unique message identifier |
role | string | Message sender: “user” or “assistant” |
text | string | Transcribed or generated message content |
timestamp | number | Unix timestamp in milliseconds |
metrics | object | Performance metrics for this message |
skippedAssistantMessages | array | Assistant messages that were skipped due to interruptions |
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
Hang Detection Logic
Example Payload
Common Causes
LLM Provider Issues
- API rate limiting or throttling
- Provider service outages or degraded performance
- Model capacity limitations during peak hours
- Authentication or billing issues
System Resource Constraints
- High CPU or memory usage on Interactly servers
- Processing queue backlog
- Database connection limitations
- Network bandwidth constraints
Complex Queries
- User requests requiring extensive reasoning
- Long conversation context requiring more processing time
- Queries that trigger multiple LLM function calls
- Malformed or problematic user input
Response Strategies
Immediate Alerting
Performance Monitoring
Automated Remediation
Pattern Analysis
User Experience Impact
Hang events directly affect user experience:User Behavior During Hangs
- Users may repeat their question
- Users might hang up if wait is too long
- Users experience frustration and reduced trust
- Call abandonment rate increases significantly
Mitigation Strategies
Prevention Best Practices
Assistant Configuration
Monitoring Thresholds
Load Balancing
Recovery Actions
When hang events occur:- Monitor: Track if response eventually comes through
- Alert: Notify engineering team for investigation
- Document: Record context for post-incident analysis
- Optimize: Adjust assistant settings to prevent recurrence
- Communicate: Update users about potential temporary delays
Related Events
Hang events often precede error events if the underlying issue persists