SendDTMF command

The SendDTMF command is quite useful when you want to send a DTMF message to the chosen participant of the conversation. With this command, you can choose the target who will receive the message. This can be the caller, the callee or all participants. The main usage of this command is in case of IVR systems.

Request parameters

Parameter name Example value Description Mandatory
CallId 345fad34 ID of the call to send the DTMF keys to. If this command is in a response to a call notification, this parameter will be the ID of that call and can be omitted. no
Keys 01234 Specifies the DTMF key or keys to send. yes
Party caller The party of the call who will receive the DTMF keys. The value of this parameter can be 'caller', 'callee' or 'all'. yes
Username admin The username of the account. The username and password parameters are used to authenticate the user. yes
Password abc123 Specifies the password. The username and password parameters are used to authenticate the user. yes

Response parameters

Parameter name Example value Description Mandatory
Code 200 Returns the status code of the response. yes
Message Command successfully executed Returns th description of the response code. yes
NotificationName CallConnected Name of the notification request type. no

OzML example

The following example below presents how you can set DTMF keys to the participant of the conversation. As you can see, the caller and the callee gets different keys, and the two Speak commands read out the keys that are available to the caller and the callee separately.

<?xml version="1.0"?>
<Response>
    <Speak Party="caller">You will get dtmf keys 123.</Speak>
    <SendDTMF Party="caller" Keys="123"></SendDTMF>
    <Speak Party="callee">You will get dtmf keys 321.</Speak>
    <SendDTMF Party="callee" Keys="321"></SendDTMF>
</Response>

Example request and response

URL request

http://127.0.0.1:9509/api?command=SendDTMF&CallId=SdwQD&Party=caller&Keys=01234&Username=HTTP_User_1&Password=qwe123

Response

<?xml version="1.0"?>
<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Code>200</Code>
  <Message>Command successfully executed</Message>
</Response>

More information