Skip to main content
POST
/
conferences
/
{id}
/
actions
/
gather_using_audio
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const response = await client.conferences.actions.gatherDtmfAudio(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  { call_control_id: 'v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg' },
);

console.log(response.data);
{ "data": { "result": "ok" } }

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Uniquely identifies the conference.

Body

application/json
call_control_id
string
required

Unique identifier and token for controlling the call leg that will receive the gather prompt.

Example:

"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"

audio_url
string

The URL of the audio file to play as the gather prompt. Must be WAV or MP3 format.

Example:

"http://example.com/gather_prompt.wav"

media_name
string

The name of the media file uploaded to the Media Storage API to play as the gather prompt.

minimum_digits
integer
default:1

Minimum number of digits to gather.

Required range: x >= 1
Example:

1

maximum_digits
integer
default:128

Maximum number of digits to gather.

Required range: x >= 1
Example:

10

maximum_tries
integer
default:3

Maximum number of times to play the prompt if no input is received.

Required range: x >= 1
Example:

3

timeout_millis
integer
default:60000

Duration in milliseconds to wait for input before timing out.

Example:

30000

terminating_digit
string
default:#

Digit that terminates gathering.

Example:

"#"

valid_digits
string
default:0123456789#*

Digits that are valid for gathering. All other digits will be ignored.

Example:

"0123456789"

inter_digit_timeout_millis
integer
default:5000

Duration in milliseconds to wait between digits.

Example:

3000

initial_timeout_millis
integer

Duration in milliseconds to wait for the first digit before timing out.

Example:

10000

stop_playback_on_dtmf
boolean
default:true

Whether to stop the audio playback when a DTMF digit is received.

Example:

true

invalid_audio_url
string

URL of audio file to play when invalid input is received.

invalid_media_name
string

Name of media file to play when invalid input is received.

gather_id
string

Identifier for this gather command. Will be included in the gather ended webhook. Maximum 100 characters.

Maximum string length: 100
client_state
string

Use this field to add state to every subsequent webhook. Must be a valid Base-64 encoded string.

Example:

"aGF2ZSBhIG5pY2UgZGF5ID1d"

Response

Successful response upon making a conference command.

data
Conference Command Result · object
Example:
{ "result": "ok" }