Skip to main content

Call Notifications

Handle inbound and outbound call event notifications for your WebRTC application. Call notifications are delivered as webhooks to URLs configured in your App Settings.

Inbound Call Notification

When an inbound call arrives for a user, a POST request is sent to your configured popup_url:

Webhook Payload

{
"event": "incoming_call",
"call_sid": "call_in_abc123",
"direction": "inbound",
"from": "+919876543210",
"to": "sip:agent_001@app.exotel.com",
"app_id": "app_abc123",
"user_id": "agent_001",
"exophone": "+911234567890",
"timestamp": "2024-06-15T10:30:00.000Z",
"caller_info": {
"name": "John Customer",
"custom_field": "CRM_ID_12345"
}
}

Fields

FieldTypeDescription
eventStringEvent type: incoming_call
call_sidStringUnique call identifier
directionStringAlways inbound for this event
fromStringCaller's phone number
toStringSIP URI or phone number of the user
app_idStringApplication receiving the call
user_idStringUser receiving the call
exophoneStringExotel number dialed by the caller
timestampStringISO 8601 timestamp
caller_infoObjectAdditional caller information if available

Outbound Call Notification

When an outbound call is initiated by a user:

Webhook Payload

{
"event": "outbound_call",
"call_sid": "call_out_def456",
"direction": "outbound",
"from": "sip:agent_001@app.exotel.com",
"to": "+919876543210",
"app_id": "app_abc123",
"user_id": "agent_001",
"exophone": "+911234567890",
"timestamp": "2024-06-15T10:35:00.000Z"
}

Call Status Updates

Status updates throughout the call lifecycle:

Ringing

{
"event": "call_ringing",
"call_sid": "call_in_abc123",
"status": "ringing",
"timestamp": "2024-06-15T10:30:01.000Z"
}

Answered

{
"event": "call_answered",
"call_sid": "call_in_abc123",
"status": "in-progress",
"answered_by": "agent_001",
"device": "sip",
"timestamp": "2024-06-15T10:30:05.000Z"
}

Completed

{
"event": "call_completed",
"call_sid": "call_in_abc123",
"status": "completed",
"duration": 300,
"talk_time": 295,
"recording_available": true,
"timestamp": "2024-06-15T10:35:05.000Z"
}

Missed

{
"event": "call_missed",
"call_sid": "call_in_abc123",
"status": "no-answer",
"ring_time": 30,
"timestamp": "2024-06-15T10:30:31.000Z"
}

Missed Call Notification

Sent to your missed_call_url when a call goes unanswered:

{
"event": "missed_call",
"call_sid": "call_in_abc123",
"from": "+919876543210",
"to": "sip:agent_001@app.exotel.com",
"exophone": "+911234567890",
"ring_duration": 30,
"timestamp": "2024-06-15T10:30:31.000Z"
}

Webhook Response

Your server must respond with HTTP 200 to acknowledge receipt. Non-200 responses trigger retries:

RetryDelay
1st5 seconds
2nd30 seconds
3rd5 minutes

After 3 failed retries, the notification is dropped and logged.

Event Types Summary

EventDescriptionWebhook URL
incoming_callInbound call arrivespopup_url
outbound_callOutbound call initiatedcallback_url
call_ringingCall is ringingcallback_url
call_answeredCall was answeredcallback_url
call_completedCall ended normallycallback_url
call_missedCall was not answeredmissed_call_url