Skip to main content

QueueLeave

Sent when the call leaves the queue. Leaving can happen in two ways: the call was connected to an agent, or the caller gave up waiting and hung up.

The holdtime field gives you how many seconds the call waited in the queue; it is the input for your average wait time and abandon rate calculations.

Sample body

scenario: QueueLeave
{
"queue_name": "8501234567-queue-destek",
"pbx_num": "8501234567",
"unique_id": "sip1-1767225600.10001",
"incoming_number": "8501234567",
"scenario": "QueueLeave",
"customer_num": "05551112233",
"holdtime": "14",
"timestamp": "1767225614000"
}
Send this body to your own address

The sample body above is sent to the address below as a POST request. The request goes from your browser, so the response cannot be read if the receiving endpoint sends no CORS header; the request itself still arrives. Use the cURL equivalent to try it from the server side.

cURL equivalent:

curl -X POST 'https://your-address.example/webhook' \
-H 'Content-Type: application/json' \
-d '{"queue_name":"8501234567-queue-destek","pbx_num":"8501234567","unique_id":"sip1-1767225600.10001","incoming_number":"8501234567","scenario":"QueueLeave","customer_num":"05551112233","holdtime":"14","timestamp":"1767225614000"}'

Fields

FieldTypeDescription
scenariostringAlways QueueLeave.
queue_namestringFull name of the queue that was left.
pbx_numstringYour PBX number.
unique_idstringUnique identifier of the call.
incoming_numberstringYour number that was dialed.
customer_numstringCalling subscriber number.
holdtimestringTime waited in the queue, in seconds.
timestampstringEvent time (ms, Unix epoch).
This event alone does not tell you about abandonment

QueueLeave on its own does not say whether the call was answered or abandoned. To tell them apart, check whether an Answer event follows for the same unique_id; if it does not, the call was left unanswered. For a definitive answer use the sondurum field of the cdr event.