DTMF
Sent when the caller presses phone keys. A separate event arrives for each key: if
the caller pressed 1 and then 2, you receive two separate DTMF events.
Use it to follow the selections made in the interactive voice response (IVR) and to measure how often each menu option is used.
Sample body
{
"Context": "sub-redirect-ivr",
"pbx_num": "8501234567",
"unique_id": "sip4-1767225900.10004",
"incoming_number": "8501234567",
"scenario": "DTMF",
"customer_num": "05551112233",
"digit": "1",
"timestamp": "1767225905000"
}
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 '{"Context":"sub-redirect-ivr","pbx_num":"8501234567","unique_id":"sip4-1767225900.10004","incoming_number":"8501234567","scenario":"DTMF","customer_num":"05551112233","digit":"1","timestamp":"1767225905000"}'
Fields
| Field | Type | Description |
|---|---|---|
scenario | string | Always DTMF. |
Context | string | The flow step the key was pressed in, e.g. sub-redirect-ivr. |
pbx_num | string | Your PBX number. |
unique_id | string | Unique identifier of the call. |
incoming_number | string | Your number that was dialed. |
customer_num | string | Calling subscriber number. |
digit | string | The key that was pressed. Besides digits, * and # can also arrive. |
timestamp | string | Event time (ms, Unix epoch). |
Unlike the other fields, the Context field in this scenario arrives with a
capital C. If your parser is case sensitive about field names, do not look for
context.
To get the full sequence the caller pressed, join the DTMF events under the same
unique_id in timestamp order.