Skip to main content
sendDTMF(options) Sends DTMF tones to a dial-out participant — for example, to navigate an IVR menu after dialing out to a phone number.

Parameters

sessionId
string
required
The session_id of the dial-out participant to send tones to.
tones
string
required
The DTMF tones to send as a string (e.g. '1234#'). Valid characters are 0–9, A–D, #, and *. Maximum 20 characters.
method
string
DTMF method: 'sip-info', 'telephone-event', or 'auto'. Defaults to 'auto', which selects the best method based on the SIP endpoint’s capabilities.
digitDurationMs
number
Duration in milliseconds per DTMF digit. Must be an integer between 50 and 2000. Defaults to 500.

Return value

Returns Promise<void>.

Errors

The following errors may be thrown:
  • sessionId and tones are mandatory parameters of type string
  • tones string must be upto 20 characters
  • {character} is not valid DTMF tone — valid tones are 0–9, A–D, #, *
  • digitDurationMs must be a finite integer number
  • digitDurationMs must be between 50ms and 2000ms, the default value is 500ms

Example

// Navigate an IVR: press 1 then confirm with #
await call.sendDTMF({ sessionId: dialOutSessionId, tones: '1#' });

// Use a shorter digit duration
await call.sendDTMF({ sessionId: dialOutSessionId, tones: '2', digitDurationMs: 200 });

See also