If event_url is present in the call_params of the makecall or makecalldirect API, IraVoice sends call lifecycle events to that URL as HTTP POST requests with a JSON payload.
Webhook Payload Schema
Code
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "event_name": { "type": "string", "enum": [ "iravoice::started", "iravoice::ringing", "iravoice::answered", "iravoice::botaudio_stream_started", "iravoice::speech", "iravoice::silent", "iravoice::play_paused", "iravoice::play_stopped", "iravoice::play_done", "iravoice::dtmf", "iravoice::hangup", "iravoice::stream_stopped", "iravoice::call_quality" ] }, "event_data": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp of the event in ISO 8601 format." }, "call_uuid": { "type": "string", "description": "Unique identifier for the call." }, "call_params": { "type": "object", "description": "Call parameters." }, "tenant_id": { "type": "string", "description": "Tenant identifier." }, "call_type": { "type": "string", "enum": ["inbound", "outbound"], "description": "Type of the call." }, "to_number": { "type": "string", "description": "Number to which the call is directed." }, "from_number": { "type": "string", "description": "Number from which the call is initiated." } }, "required": [ "timestamp", "call_uuid", "call_params" ], "additionalProperties": true } }, "required": [ "event_name", "event_data" ], "additionalProperties": false}