Skip to main content

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

scenario: DTMF
{
"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

FieldTypeDescription
scenariostringAlways DTMF.
ContextstringThe flow step the key was pressed in, e.g. sub-redirect-ivr.
pbx_numstringYour PBX number.
unique_idstringUnique identifier of the call.
incoming_numberstringYour number that was dialed.
customer_numstringCalling subscriber number.
digitstringThe key that was pressed. Besides digits, * and # can also arrive.
timestampstringEvent time (ms, Unix epoch).
The field name starts with a capital letter

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.