Skip to main content

Context

Sent when the call enters a step in the flow. The step in the sample is an announcement (announcement); this event fires when the call reaches a greeting or a thank you announcement.

Use it to follow which points the caller went through in the flow, and to see where in the flow calls are abandoned.

Sample body

scenario: Context
{
"pbx_num": "8501234567",
"unique_id": "sip5-1767226000.10005",
"incoming_number": "8501234567",
"scenario": "Context",
"customer_num": "05551112233",
"context_name": "8501234567-announcement-karsilama",
"type": "announcement",
"timestamp": "1767226003000"
}
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 '{"pbx_num":"8501234567","unique_id":"sip5-1767226000.10005","incoming_number":"8501234567","scenario":"Context","customer_num":"05551112233","context_name":"8501234567-announcement-karsilama","type":"announcement","timestamp":"1767226003000"}'

Fields

FieldTypeDescription
scenariostringAlways Context.
pbx_numstringYour PBX number.
unique_idstringUnique identifier of the call.
incoming_numberstringYour number that was dialed.
customer_numstringCalling subscriber number.
context_namestringFull name of the step. It has the form <pbx>-<type>-<name>; in the sample the announcement name is karsilama.
typestringType of the step, e.g. announcement.
timestampstringEvent time (ms, Unix epoch).
The set of type values may grow

Depending on the step types you use in your flow, the type field may take values other than announcement. When you meet a type you do not know, store the record as it is instead of raising an error.

This event does not report key presses; the selection the caller makes in the menu arrives separately with the DTMF event.