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

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

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:



510
511
512
# File 'lib/telnyx/resources/conferences/actions.rb', line 510

def initialize(client:)
  @client = client
end

Instance Method Details

#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:



64
65
66
67
68
69
70
71
72
73
# File 'lib/telnyx/resources/conferences/actions.rb', line 64

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:



126
127
128
129
130
131
132
133
134
135
# File 'lib/telnyx/resources/conferences/actions.rb', line 126

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:



163
164
165
166
167
168
169
170
171
172
# File 'lib/telnyx/resources/conferences/actions.rb', line 163

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:



192
193
194
195
196
197
198
199
200
201
# File 'lib/telnyx/resources/conferences/actions.rb', line 192

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:



227
228
229
230
231
232
233
234
235
236
# File 'lib/telnyx/resources/conferences/actions.rb', line 227

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:



258
259
260
261
262
263
264
265
266
267
# File 'lib/telnyx/resources/conferences/actions.rb', line 258

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:



289
290
291
292
293
294
295
296
297
298
# File 'lib/telnyx/resources/conferences/actions.rb', line 289

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_:, 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:



331
332
333
334
335
336
337
338
339
340
# File 'lib/telnyx/resources/conferences/actions.rb', line 331

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:



368
369
370
371
372
373
374
375
376
377
# File 'lib/telnyx/resources/conferences/actions.rb', line 368

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

#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:



409
410
411
412
413
414
415
416
417
418
# File 'lib/telnyx/resources/conferences/actions.rb', line 409

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:



438
439
440
441
442
443
444
445
446
447
# File 'lib/telnyx/resources/conferences/actions.rb', line 438

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:



467
468
469
470
471
472
473
474
475
476
# File 'lib/telnyx/resources/conferences/actions.rb', line 467

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:



496
497
498
499
500
501
502
503
504
505
# File 'lib/telnyx/resources/conferences/actions.rb', line 496

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:



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

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