AVR Core provides comprehensive webhook support for real-time event tracking and integration with external systems. Webhooks allow you to receive instant notifications about call events, enabling you to build custom analytics, logging, and integration solutions.
Webhooks are HTTP POST requests sent to your specified endpoint whenever specific events occur during a call session. This enables real-time monitoring, analytics, and integration with external systems like CRM platforms, analytics tools, or custom applications.
{}
{}
{}
All webhook requests follow a consistent JSON structure:
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "call_started",
"timestamp": "2024-01-01T12:00:00.000Z",
"payload": {
// Event-specific data
}
}
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "call_started",
"timestamp": "2024-01-01T12:00:00.000Z",
"payload": {}
}
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "call_ended",
"timestamp": "2024-01-01T12:05:30.000Z",
"payload": {}
}
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "interruption",
"timestamp": "2024-01-01T12:02:15.000Z",
"payload": {}
}
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "transcription",
"timestamp": "2024-01-01T12:01:45.000Z",
"payload": {
"role": "user|agent",
"text": "Hello, I need help with my account"
}
}
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "dtmf_digit",
"timestamp": "2024-01-01T12:02:15.000Z",
"payload": {
"digit": "1|2|3|..."
}
}
Configure webhook settings using the following environment variables:
# .env file
WEBHOOK_URL=http://avr-webhook:9000/events # or your custom webhook url
WEBHOOK_SECRET=your-secret-key-here
WEBHOOK_TIMEOUT=5000
WEBHOOK_RETRY=3
When WEBHOOK_SECRET
is configured, AVR Core includes the secret in the X-AVR-WEBHOOK-SECRET
header for verification:
POST /events HTTP/1.1
Host: avr-webhook
Content-Type: application/json
X-AVR-WEBHOOK-SECRET: your-secret-key-here
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "call_started",
"timestamp": "2024-01-01T12:00:00.000Z",
"payload": {}
}
To help you get started quickly, we provide ready-to-use examples that show how to connect AVR with external systems using webhooks.
These examples demonstrate how to capture events, parse data, and trigger actions in your own applications.
AVR Core implements automatic retry logic for failed webhook requests:
WEBHOOK_TIMEOUT
, request is considered failedWEBHOOK_RETRY
additional attempts are madeFailed webhook requests are logged with detailed error information:
[WEBHOOK][CALL_STARTED] Retry failed
Webhook Error:
Message: connect ECONNREFUSED avr-webhook:9000
Code: ECONNREFUSED
URL: http://avr-webhook:9000/events
Method: POST
Status:
WEBHOOK_URL
is correct and accessibleWEBHOOK_TIMEOUT
valueWEBHOOK_SECRET
configurationX-AVR-WEBHOOK-SECRET
headerWebhooks in AVR allow you to extend the platform beyond call handling, by sending events and call data to your own systems or third-party services.
This makes it possible to enrich analytics, update business tools in real time, and ensure continuous quality improvements.
Here are some common scenarios:
Track key metrics like call duration, frequency, and interaction patterns.
Useful for understanding customer behavior, optimizing agent performance, and measuring AI voicebot efficiency.
Automatically update customer profiles with call transcripts, notes, or outcomes.
This ensures your sales and support teams always have the latest information at hand.
Monitor AI performance, user satisfaction, and conversation quality.
Webhook data can be connected to dashboards or QA tools to spot issues early and continuously improve your conversational flows.