Class: Telnyx::Resources::Conferences::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/conferences/actions.rb

Overview

Conference command operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Actions

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Actions.

Parameters:



631
632
633
# File 'lib/telnyx/resources/conferences/actions.rb', line 631

def initialize(client:)
  @client = client
end

Instance Method Details

#end_conference(id, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionEndConferenceResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionEndConferenceParams for more details.

End a conference and terminate all active participants.

Parameters:

  • id (String)

    Uniquely identifies the conference.

  • command_id (String)

    Use this field to avoid duplicate commands. Telnyx will ignore any command with

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



59
60
61
62
63
64
65
66
67
68
# File 'lib/telnyx/resources/conferences/actions.rb', line 59

def end_conference(id, params = {})
  parsed, options = Telnyx::Conferences::ActionEndConferenceParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/end", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionEndConferenceResponse,
    options: options
  )
end

#gather_dtmf_audio(id, call_control_id:, audio_url: nil, client_state: nil, gather_id: nil, initial_timeout_millis: nil, inter_digit_timeout_millis: nil, invalid_audio_url: nil, invalid_media_name: nil, maximum_digits: nil, maximum_tries: nil, media_name: nil, minimum_digits: nil, stop_playback_on_dtmf: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionGatherDtmfAudioResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionGatherDtmfAudioParams for more details.

Play an audio file to a specific conference participant and gather DTMF input.

Parameters:

  • id (String)

    Uniquely identifies the conference.

  • call_control_id (String)

    Unique identifier and token for controlling the call leg that will receive the g

  • audio_url (String)

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

  • client_state (String)

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

  • gather_id (String)

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

  • initial_timeout_millis (Integer)

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

  • inter_digit_timeout_millis (Integer)

    Duration in milliseconds to wait between digits.

  • 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.

  • maximum_digits (Integer)

    Maximum number of digits to gather.

  • maximum_tries (Integer)

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

  • media_name (String)

    The name of the media file uploaded to the Media Storage API to play as the gath

  • minimum_digits (Integer)

    Minimum number of digits to gather.

  • stop_playback_on_dtmf (Boolean)

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

  • terminating_digit (String)

    Digit that terminates gathering.

  • timeout_millis (Integer)

    Duration in milliseconds to wait for input before timing out.

  • valid_digits (String)

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

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



116
117
118
119
120
121
122
123
124
125
# File 'lib/telnyx/resources/conferences/actions.rb', line 116

def gather_dtmf_audio(id, params)
  parsed, options = Telnyx::Conferences::ActionGatherDtmfAudioParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/gather_using_audio", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionGatherDtmfAudioResponse,
    options: options
  )
end

#hold(id, audio_url: nil, call_control_ids: nil, media_name: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionHoldResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionHoldParams for more details.

Hold a list of participants in a conference call

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • audio_url (String)

    The URL of a file to be played to the participants when they are put on hold. me

  • call_control_ids (Array<String>)

    List of unique identifiers and tokens for controlling the call. When empty all p

  • media_name (String)

    The media_name of a file to be played to the participants when they are put on h

  • region (Symbol, Telnyx::Models::Conferences::ActionHoldParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



149
150
151
152
153
154
155
156
157
158
# File 'lib/telnyx/resources/conferences/actions.rb', line 149

def hold(id, params = {})
  parsed, options = Telnyx::Conferences::ActionHoldParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/hold", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionHoldResponse,
    options: options
  )
end

#join(id, call_control_id:, beep_enabled: nil, client_state: nil, command_id: nil, end_conference_on_exit: nil, hold: nil, hold_audio_url: nil, hold_media_name: nil, mute: nil, region: nil, soft_end_conference_on_exit: nil, start_conference_on_enter: nil, supervisor_role: nil, whisper_call_control_ids: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionJoinResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionJoinParams for more details.

Join an existing call leg to a conference. Issue the Join Conference command with the conference ID in the path and the ‘call_control_id` of the leg you wish to join to the conference as an attribute. The conference can have up to a certain amount of active participants, as set by the `max_participants` parameter in conference creation request.

**Expected Webhooks:**

  • ‘conference.participant.joined`

  • ‘conference.participant.left`

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • call_control_id (String)

    Unique identifier and token for controlling the call

  • beep_enabled (Symbol, Telnyx::Models::Conferences::ActionJoinParams::BeepEnabled)

    Whether a beep sound should be played when the participant joins and/or leaves t

  • client_state (String)

    Use this field to add state to every subsequent webhook. It must be a valid Base

  • command_id (String)

    Use this field to avoid execution of duplicate commands. Telnyx will ignore subs

  • end_conference_on_exit (Boolean)

    Whether the conference should end and all remaining participants be hung up afte

  • hold (Boolean)

    Whether the participant should be put on hold immediately after joining the conf

  • hold_audio_url (String)

    The URL of a file to be played to the participant when they are put on hold afte

  • hold_media_name (String)

    The media_name of a file to be played to the participant when they are put on ho

  • mute (Boolean)

    Whether the participant should be muted immediately after joining the conference

  • region (Symbol, Telnyx::Models::Conferences::ActionJoinParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • soft_end_conference_on_exit (Boolean)

    Whether the conference should end after the participant leaves the conference. N

  • start_conference_on_enter (Boolean)

    Whether the conference should be started after the participant joins the confere

  • supervisor_role (Symbol, Telnyx::Models::Conferences::ActionJoinParams::SupervisorRole)

    Sets the joining participant as a supervisor for the conference. A conference ca

  • whisper_call_control_ids (Array<String>)

    Array of unique call_control_ids the joining supervisor can whisper to. If none

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



211
212
213
214
215
216
217
218
219
220
# File 'lib/telnyx/resources/conferences/actions.rb', line 211

def join(id, params)
  parsed, options = Telnyx::Conferences::ActionJoinParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/join", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionJoinResponse,
    options: options
  )
end

#leave(id, call_control_id:, beep_enabled: nil, command_id: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionLeaveResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionLeaveParams for more details.

Removes a call leg from a conference and moves it back to parked state.

**Expected Webhooks:**

  • ‘conference.participant.left`

Parameters:

Returns:

See Also:



248
249
250
251
252
253
254
255
256
257
# File 'lib/telnyx/resources/conferences/actions.rb', line 248

def leave(id, params)
  parsed, options = Telnyx::Conferences::ActionLeaveParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/leave", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionLeaveResponse,
    options: options
  )
end

#mute(id, call_control_ids: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionMuteResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionMuteParams for more details.

Mute a list of participants in a conference call

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • call_control_ids (Array<String>)

    Array of unique identifiers and tokens for controlling the call. When empty all

  • region (Symbol, Telnyx::Models::Conferences::ActionMuteParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



277
278
279
280
281
282
283
284
285
286
# File 'lib/telnyx/resources/conferences/actions.rb', line 277

def mute(id, params = {})
  parsed, options = Telnyx::Conferences::ActionMuteParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/mute", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionMuteResponse,
    options: options
  )
end

#play(id, audio_url: nil, call_control_ids: nil, loop_: nil, media_name: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionPlayResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionPlayParams for more details.

Play audio to all or some participants on a conference call.

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • audio_url (String)

    The URL of a file to be played back in the conference. media_name and audio_url

  • call_control_ids (Array<String>)

    List of call control ids identifying participants the audio file should be playe

  • loop_ (String, Integer)

    The number of times the audio file should be played. If supplied, the value must

  • media_name (String)

    The media_name of a file to be played back in the conference. The media_name mus

  • region (Symbol, Telnyx::Models::Conferences::ActionPlayParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



312
313
314
315
316
317
318
319
320
321
# File 'lib/telnyx/resources/conferences/actions.rb', line 312

def play(id, params = {})
  parsed, options = Telnyx::Conferences::ActionPlayParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/play", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionPlayResponse,
    options: options
  )
end

#record_pause(id, command_id: nil, recording_id: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionRecordPauseResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionRecordPauseParams for more details.

Pause conference recording.

Parameters:

  • id (String)

    Specifies the conference by id or name

  • command_id (String)

    Use this field to avoid duplicate commands. Telnyx will ignore any command with

  • recording_id (String)

    Use this field to pause specific recording.

  • region (Symbol, Telnyx::Models::Conferences::ActionRecordPauseParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



343
344
345
346
347
348
349
350
351
352
# File 'lib/telnyx/resources/conferences/actions.rb', line 343

def record_pause(id, params = {})
  parsed, options = Telnyx::Conferences::ActionRecordPauseParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/record_pause", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionRecordPauseResponse,
    options: options
  )
end

#record_resume(id, command_id: nil, recording_id: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionRecordResumeResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionRecordResumeParams for more details.

Resume conference recording.

Parameters:

  • id (String)

    Specifies the conference by id or name

  • command_id (String)

    Use this field to avoid duplicate commands. Telnyx will ignore any command with

  • recording_id (String)

    Use this field to resume specific recording.

  • region (Symbol, Telnyx::Models::Conferences::ActionRecordResumeParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



374
375
376
377
378
379
380
381
382
383
# File 'lib/telnyx/resources/conferences/actions.rb', line 374

def record_resume(id, params = {})
  parsed, options = Telnyx::Conferences::ActionRecordResumeParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/record_resume", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionRecordResumeResponse,
    options: options
  )
end

#record_start(id, format_:, channels: nil, command_id: nil, custom_file_name: nil, play_beep: nil, region: nil, trim: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionRecordStartResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionRecordStartParams for more details.

Start recording the conference. Recording will stop on conference end, or via the Stop Recording command.

**Expected Webhooks:**

  • ‘conference.recording.saved`

Parameters:

Returns:

See Also:



418
419
420
421
422
423
424
425
426
427
# File 'lib/telnyx/resources/conferences/actions.rb', line 418

def record_start(id, params)
  parsed, options = Telnyx::Conferences::ActionRecordStartParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/record_start", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionRecordStartResponse,
    options: options
  )
end

#record_stop(id, client_state: nil, command_id: nil, recording_id: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionRecordStopResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionRecordStopParams for more details.

Stop recording the conference.

**Expected Webhooks:**

  • ‘conference.recording.saved`

Parameters:

  • id (String)

    Specifies the conference to stop the recording for by id or name

  • client_state (String)

    Use this field to add state to every subsequent webhook. It must be a valid Base

  • command_id (String)

    Use this field to avoid duplicate commands. Telnyx will ignore any command with

  • recording_id (String)

    Uniquely identifies the resource.

  • region (Symbol, Telnyx::Models::Conferences::ActionRecordStopParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



455
456
457
458
459
460
461
462
463
464
# File 'lib/telnyx/resources/conferences/actions.rb', line 455

def record_stop(id, params = {})
  parsed, options = Telnyx::Conferences::ActionRecordStopParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/record_stop", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionRecordStopResponse,
    options: options
  )
end

#send_dtmf(id, digits:, call_control_ids: nil, client_state: nil, duration_millis: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionSendDtmfResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionSendDtmfParams for more details.

Send DTMF tones to one or more conference participants.

pau

Parameters:

  • id (String)

    Uniquely identifies the conference.

  • digits (String)

    DTMF digits to send. Valid characters: 0-9, A-D, *, #, w (0.5s pause), W (1s

  • call_control_ids (Array<String>)

    Array of participant call control IDs to send DTMF to. When empty, DTMF will be

  • client_state (String)

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

  • duration_millis (Integer)

    Duration of each DTMF digit in milliseconds.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



489
490
491
492
493
494
495
496
497
498
# File 'lib/telnyx/resources/conferences/actions.rb', line 489

def send_dtmf(id, params)
  parsed, options = Telnyx::Conferences::ActionSendDtmfParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/send_dtmf", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionSendDtmfResponse,
    options: options
  )
end

#speak(id, payload:, voice:, call_control_ids: nil, command_id: nil, language: nil, payload_type: nil, region: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionSpeakResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionSpeakParams for more details.

Convert text to speech and play it to all or some participants.

Parameters:

Returns:

See Also:



530
531
532
533
534
535
536
537
538
539
# File 'lib/telnyx/resources/conferences/actions.rb', line 530

def speak(id, params)
  parsed, options = Telnyx::Conferences::ActionSpeakParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/speak", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionSpeakResponse,
    options: options
  )
end

#stop(id, call_control_ids: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionStopResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionStopParams for more details.

Stop audio being played to all or some participants on a conference call.

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • call_control_ids (Array<String>)

    List of call control ids identifying participants the audio file should stop be

  • region (Symbol, Telnyx::Models::Conferences::ActionStopParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



559
560
561
562
563
564
565
566
567
568
# File 'lib/telnyx/resources/conferences/actions.rb', line 559

def stop(id, params = {})
  parsed, options = Telnyx::Conferences::ActionStopParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/stop", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionStopResponse,
    options: options
  )
end

#unhold(id, call_control_ids:, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionUnholdResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionUnholdParams for more details.

Unhold a list of participants in a conference call

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • call_control_ids (Array<String>)

    List of unique identifiers and tokens for controlling the call. Enter each call

  • region (Symbol, Telnyx::Models::Conferences::ActionUnholdParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



588
589
590
591
592
593
594
595
596
597
# File 'lib/telnyx/resources/conferences/actions.rb', line 588

def unhold(id, params)
  parsed, options = Telnyx::Conferences::ActionUnholdParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/unhold", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionUnholdResponse,
    options: options
  )
end

#unmute(id, call_control_ids: nil, region: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionUnmuteResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionUnmuteParams for more details.

Unmute a list of participants in a conference call

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • call_control_ids (Array<String>)

    List of unique identifiers and tokens for controlling the call. Enter each call

  • region (Symbol, Telnyx::Models::Conferences::ActionUnmuteParams::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



617
618
619
620
621
622
623
624
625
626
# File 'lib/telnyx/resources/conferences/actions.rb', line 617

def unmute(id, params = {})
  parsed, options = Telnyx::Conferences::ActionUnmuteParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/unmute", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionUnmuteResponse,
    options: options
  )
end

#update(id, call_control_id:, supervisor_role:, command_id: nil, region: nil, whisper_call_control_ids: nil, request_options: {}) ⇒ Telnyx::Models::Conferences::ActionUpdateResponse

Some parameter documentations has been truncated, see Models::Conferences::ActionUpdateParams for more details.

Update conference participant supervisor_role

Parameters:

  • id (String)

    Uniquely identifies the conference by id or name

  • call_control_id (String)

    Unique identifier and token for controlling the call

  • supervisor_role (Symbol, Telnyx::Models::Conferences::UpdateConference::SupervisorRole)

    Sets the participant as a supervisor for the conference. A conference can have m

  • command_id (String)

    Use this field to avoid execution of duplicate commands. Telnyx will ignore subs

  • region (Symbol, Telnyx::Models::Conferences::UpdateConference::Region)

    Region where the conference data is located. Defaults to the region defined in u

  • whisper_call_control_ids (Array<String>)

    Array of unique call_control_ids the supervisor can whisper to. If none provided

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



32
33
34
35
36
37
38
39
40
41
# File 'lib/telnyx/resources/conferences/actions.rb', line 32

def update(id, params)
  parsed, options = Telnyx::Conferences::ActionUpdateParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["conferences/%1$s/actions/update", id],
    body: parsed,
    model: Telnyx::Models::Conferences::ActionUpdateResponse,
    options: options
  )
end