DTMF

If a user enters the DTMF digits during a call, PBX will send a DTMF report to the application server.

Report parameters

Parameter Type Description
event String Event type.
callid String The unique ID of each call.
members Array <MemberType> A list of information for different types of members during a call.
infos String A DTMF string.
flag Integer The sequence of DTMF.
Note: flag starts from digit 0. 0 indicates the first DTMF; 1 indicates the second DTMF, and the like.
info String A DTMF character.
sn String The PBX's serial number.
MemberType
Parameter Type Description
ext Object <ExtensionInfo> Extension information.
inbound Object <InboundInfo> The information of inbound calls.
ExtensionInfo
Parameter Type Description
number String The extension number.
channelid String The call channel ID of each member during the call.
memberstatus String The member status.
  • ALERT: The caller who initiates the call is in the ringback state.
  • RING: The callee is in the ringing state.
  • ANSWERED: The call initiated by the caller has been answered.
  • ANSWER: The callee has answered a call, and is in the talking state.
  • HOLD: The call is held.
  • BYE: The call is hanged up.
callpath Integer The call path that indicates how the call is established.

Example: Extension user 1000 calls to IVR (6500), and enters DTMF digits, the callpath value is 6500.

InboundInfo
Parameter Type Description
from Integer The caller number.
to Integer The callee number.
trunkname String The name of the trunk that passes the inbound calls.
channelid String The call channel ID of each member during the call.
memberstatus String The member status.
  • ALERT: The caller who initiates the call is in the ringback state.
  • RING: The callee is in the ringing state.
  • ANSWERED: The call initiated by the caller has been answered.
  • ANSWER: The callee has answered a call, and is in the talking state.
  • HOLD: The call is held.
  • BYE: The call is hanged up.
callpath Integer The call path that indicates how the call is established.

For example, external user 1000 calls to IVR (6500), and enters DTMF digits, the callpath value is 6500.

Report example

Extension 1023 dials in an IVR, and dials digit 2.

POST / HTTP/1.1
Host: 192.168.5.150: 8260
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1571905397.97",
	"members": [
		{
			"ext": {
				"number": "1023",
				"channelid": "PJSIP/1023-00000039",
				"memberstatus": "ANSWERED",
				"callpath": "6500"
			}
		}
	],
	"info": "2",
	"flag": "0",
	"sn": "369451090405"
}

External user 192929500 dials in IVR 6500, and dials extension number 1020.

POST / HTTP/1.1
Host: 192.168.5.150: 8260
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1573197470.151",
	"members": [
		{
			"inbound": {
				"from": "192929500",
				"to": "6500",
				"trunkname": "To6.36",
				"channelid": "PJSIP/trunk-To6.36-endpoint-0000003d",
				"memberstatus": "ANSWERED",
				"callpath": "6500"
			}
		}
	],
	"info": "1",
	"flag": "0",
	"sn": "369451090405"
}
POST / HTTP/1.1
Host: 192.168.5.150: 8260
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1573197470.151",
	"members": [
		{
			"inbound": {
				"from": "192929500",
				"to": "6500",
				"trunkname": "To6.36",
				"channelid": "PJSIP/trunk-To6.36-endpoint-0000003d",
				"memberstatus": "ANSWERED",
				"callpath": "6500"
			}
		}
	],
	"info": "0",
	"flag": "1",
	"sn": "369451090405"
}
POST / HTTP/1.1
Host: 192.168.5.150: 8260
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1573197470.151",
	"members": [
		{
			"inbound": {
				"from": "192929500",
				"to": "6500",
				"trunkname": "To6.36",
				"channelid": "PJSIP/trunk-To6.36-endpoint-0000003d",
				"memberstatus": "ANSWERED",
				"callpath": "6500"
			}
		}
	],
	"info": "2",
	"flag": "2",
	"sn": "369451090405"
}
POST / HTTP/1.1
Host: 192.168.5.150: 8260
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1573197470.151",
	"members": [
		{
			"inbound": {
				"from": "192929500",
				"to": "6500",
				"trunkname": "To6.36",
				"channelid": "PJSIP/trunk-To6.36-endpoint-0000003d",
				"memberstatus": "ANSWERED",
				"callpath": "6500"
			}
		}
	],
	"info": "0",
	"flag": "3",
	"sn": "369451090405"
}
POST / HTTP/1.1
Host: 192.168.5.150: 8260
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1573197470.151",
	"members": [
		{
			"inbound": {
				"from": "192929500",
				"to": "6500",
				"trunkname": "To6.36",
				"channelid": "PJSIP/trunk-To6.36-endpoint-0000003d",
				"memberstatus": "ANSWERED",
				"callpath": "6500"
			}
		}
	],
	"infos": "1020",
	"sn": "369451090405"
}

Extension user 1023 places an outbound call, and the call is routed to an external IVR. Extension user dials digit 1.

POST / HTTP/1.1
Host: 192.168.5.150: 8260
Accept: application/json
User-Agent: WebAPI
Content-Type: application/json
Accept: application/json

{
	"event": "DTMF",
	"callid": "1573092021.6",
	"members": [
		{
			"ext": {
				"number": "1023",
				"channelid": "PJSIP/1023-00000002",
				"memberstatus": "ANSWERED"
			}
		}
	],
	"info": "1",
	"flag": "0",
	"sn": "369451090405"
}