Class: Telnyx::Resources::Texml::Accounts::Conferences::Participants

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/texml/accounts/conferences/participants.rb

Overview

TeXML REST Commands

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Participants

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

Parameters:



313
314
315
# File 'lib/telnyx/resources/texml/accounts/conferences/participants.rb', line 313

def initialize(client:)
  @client = client
end

Instance Method Details

#delete(call_sid_or_participant_label, account_sid:, conference_sid:, request_options: {}) ⇒ nil

Deletes a conference participant

Parameters:

  • call_sid_or_participant_label (String)

    CallSid or Label of the Participant to update.

  • account_sid (String)

    The id of the account the resource belongs to.

  • conference_sid (String)

    The ConferenceSid that uniquely identifies a conference.

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

Returns:

  • (nil)

See Also:



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/telnyx/resources/texml/accounts/conferences/participants.rb', line 129

def delete(call_sid_or_participant_label, params)
  parsed, options = Telnyx::Texml::Accounts::Conferences::ParticipantDeleteParams.dump_request(params)
   =
    parsed.delete(:account_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  conference_sid =
    parsed.delete(:conference_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :delete,
    path: [
      "texml/Accounts/%1$s/Conferences/%2$s/Participants/%3$s",
      ,
      conference_sid,
      call_sid_or_participant_label
    ],
    model: NilClass,
    options: options
  )
end

#participants(conference_sid, account_sid:, amd_status_callback: nil, amd_status_callback_method: nil, application_sid: nil, beep: nil, caller_id: nil, call_sid_to_coach: nil, cancel_playback_on_detect_message_end: nil, cancel_playback_on_machine_detection: nil, coaching: nil, conference_record: nil, conference_recording_status_callback: nil, conference_recording_status_callback_event: nil, conference_recording_status_callback_method: nil, conference_recording_timeout: nil, conference_status_callback: nil, conference_status_callback_event: nil, conference_status_callback_method: nil, conference_trim: nil, custom_headers: nil, early_media: nil, end_conference_on_exit: nil, from: nil, label: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, max_participants: nil, muted: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_track: nil, sip_auth_password: nil, sip_auth_username: nil, start_conference_on_enter: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, time_limit: nil, timeout_seconds: nil, to: nil, trim: nil, wait_url: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsResponse

Some parameter documentations has been truncated, see Models::Texml::Accounts::Conferences::ParticipantParticipantsParams for more details.

Dials a new conference participant

Parameters:

  • conference_sid (String)

    Path param: The ConferenceSid that uniquely identifies a conference.

  • account_sid (String)

    Path param: The id of the account the resource belongs to.

  • amd_status_callback (String)

    Body param: The URL the result of answering machine detection will be sent to.

  • amd_status_callback_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::AmdStatusCallbackMethod)

    Body param: HTTP request type used for ‘AmdStatusCallback`. Defaults to `POST`.

  • application_sid (String)

    Body param: The SID of the TeXML application that will handle the new participan

  • beep (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::Beep)

    Body param: Whether to play a notification beep to the conference when the parti

  • caller_id (String)

    Body param: To be used as the caller id name (SIP From Display Name) presented t

  • call_sid_to_coach (String)

    Body param: The SID of the participant who is being coached. The participant bei

  • cancel_playback_on_detect_message_end (Boolean)

    Body param: Whether to cancel ongoing playback on ‘greeting ended` detection. De

  • cancel_playback_on_machine_detection (Boolean)

    Body param: Whether to cancel ongoing playback on ‘machine` detection. Defaults

  • coaching (Boolean)

    Body param: Whether the participant is coaching another call. When ‘true`, `Call

  • conference_record (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::ConferenceRecord)

    Body param: Whether to record the conference the participant is joining. Defualt

  • conference_recording_status_callback (String)

    Body param: The URL the conference recording callbacks will be sent to.

  • conference_recording_status_callback_event (String)

    Body param: The changes to the conference recording’s state that should generate

  • conference_recording_status_callback_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::ConferenceRecordingStatusCallbackMethod)

    Body param: HTTP request type used for ‘ConferenceRecordingStatusCallback`. Defa

  • conference_recording_timeout (Integer)

    Body param: The number of seconds that Telnyx will wait for the recording to be

  • conference_status_callback (String)

    Body param: The URL the conference callbacks will be sent to.

  • conference_status_callback_event (String)

    Body param: The changes to the conference’s state that should generate a call to

  • conference_status_callback_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::ConferenceStatusCallbackMethod)

    Body param: HTTP request type used for ‘ConferenceStatusCallback`. Defaults to `

  • conference_trim (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::ConferenceTrim)

    Body param: Whether to trim any leading and trailing silence from the conference

  • custom_headers (Array<Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::CustomHeader>)

    Body param: Custom HTTP headers to be sent with the call. Each header should be

  • early_media (Boolean)

    Body param: Whether participant shall be bridged to conference before the partic

  • end_conference_on_exit (Boolean)

    Body param: Whether to end the conference when the participant leaves. Defaults

  • from (String)

    Body param: The phone number of the party that initiated the call. Phone numbers

  • label (String)

    Body param: A unique label for the participant that will be added to the confere

  • machine_detection (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::MachineDetection)

    Body param: Whether to detect if a human or an answering machine picked up the c

  • machine_detection_silence_timeout (Integer)

    Body param: If initial silence duration is greater than this value, consider it

  • machine_detection_speech_end_threshold (Integer)

    Body param: Silence duration threshold after a greeting message or voice for it

  • machine_detection_speech_threshold (Integer)

    Body param: Maximum threshold of a human greeting. If greeting longer than this

  • machine_detection_timeout (Integer)

    Body param: How long answering machine detection should go on for before sending

  • max_participants (Integer)

    Body param: The maximum number of participants in the conference. Can be a posit

  • muted (Boolean)

    Body param: Whether the participant should be muted.

  • preferred_codecs (String)

    Body param: The list of comma-separated codecs to be offered on a call.

  • record (Boolean)

    Body param: Whether to record the entire participant’s call leg. Defaults to ‘fa

  • recording_channels (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::RecordingChannels)

    Body param: The number of channels in the final recording. Defaults to ‘mono`.

  • recording_status_callback (String)

    Body param: The URL the recording callbacks will be sent to.

  • recording_status_callback_event (String)

    Body param: The changes to the recording’s state that should generate a call to

  • recording_status_callback_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::RecordingStatusCallbackMethod)

    Body param: HTTP request type used for ‘RecordingStatusCallback`. Defaults to `P

  • recording_track (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::RecordingTrack)

    Body param: The audio track to record for the call. The default is ‘both`.

  • sip_auth_password (String)

    Body param: The password to use for SIP authentication.

  • sip_auth_username (String)

    Body param: The username to use for SIP authentication.

  • start_conference_on_enter (Boolean)

    Body param: Whether to start the conference when the participant enters. Default

  • status_callback (String)

    Body param: URL destination for Telnyx to send status callback events to for the

  • status_callback_event (String)

    Body param: The changes to the call’s state that should generate a call to ‘Stat

  • status_callback_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::StatusCallbackMethod)

    Body param: HTTP request type used for ‘StatusCallback`.

  • time_limit (Integer)

    Body param: The maximum duration of the call in seconds.

  • timeout_seconds (Integer)

    Body param: The number of seconds that we should allow the phone to ring before

  • to (String)

    Body param: The phone number of the called party. Phone numbers are formatted wi

  • trim (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsParams::Trim)

    Body param: Whether to trim any leading and trailing silence from the recording.

  • wait_url (String)

    Body param: The URL to call for an audio file to play while the participant is w

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

Returns:

See Also:



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/telnyx/resources/texml/accounts/conferences/participants.rb', line 265

def participants(conference_sid, params)
  parsed, options =
    Telnyx::Texml::Accounts::Conferences::ParticipantParticipantsParams.dump_request(params)
   =
    parsed.delete(:account_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: ["texml/Accounts/%1$s/Conferences/%2$s/Participants", , conference_sid],
    headers: {"content-type" => "application/x-www-form-urlencoded"},
    body: parsed,
    model: Telnyx::Models::Texml::Accounts::Conferences::ParticipantParticipantsResponse,
    options: options
  )
end

#retrieve(call_sid_or_participant_label, account_sid:, conference_sid:, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::Conferences::ParticipantRetrieveResponse

Gets conference participant resource

Parameters:

  • call_sid_or_participant_label (String)

    CallSid or Label of the Participant to update.

  • account_sid (String)

    The id of the account the resource belongs to.

  • conference_sid (String)

    The ConferenceSid that uniquely identifies a conference.

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

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/telnyx/resources/texml/accounts/conferences/participants.rb', line 25

def retrieve(call_sid_or_participant_label, params)
  parsed, options = Telnyx::Texml::Accounts::Conferences::ParticipantRetrieveParams.dump_request(params)
   =
    parsed.delete(:account_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  conference_sid =
    parsed.delete(:conference_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "texml/Accounts/%1$s/Conferences/%2$s/Participants/%3$s",
      ,
      conference_sid,
      call_sid_or_participant_label
    ],
    model: Telnyx::Models::Texml::Accounts::Conferences::ParticipantRetrieveResponse,
    options: options
  )
end

#retrieve_participants(conference_sid, account_sid:, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::Conferences::ParticipantRetrieveParticipantsResponse

Lists conference participants

Parameters:

  • conference_sid (String)

    The ConferenceSid that uniquely identifies a conference.

  • account_sid (String)

    The id of the account the resource belongs to.

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

Returns:

See Also:



295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/telnyx/resources/texml/accounts/conferences/participants.rb', line 295

def retrieve_participants(conference_sid, params)
  parsed, options =
    Telnyx::Texml::Accounts::Conferences::ParticipantRetrieveParticipantsParams.dump_request(params)
   =
    parsed.delete(:account_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["texml/Accounts/%1$s/Conferences/%2$s/Participants", , conference_sid],
    model: Telnyx::Models::Texml::Accounts::Conferences::ParticipantRetrieveParticipantsResponse,
    options: options
  )
end

#update(call_sid_or_participant_label, account_sid:, conference_sid:, announce_method: nil, announce_url: nil, beep_on_exit: nil, call_sid_to_coach: nil, coaching: nil, end_conference_on_exit: nil, hold: nil, hold_method: nil, hold_url: nil, muted: nil, wait_url: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::Conferences::ParticipantUpdateResponse

Some parameter documentations has been truncated, see Models::Texml::Accounts::Conferences::ParticipantUpdateParams for more details.

Updates a conference participant

Parameters:

  • call_sid_or_participant_label (String)

    Path param: CallSid or Label of the Participant to update.

  • account_sid (String)

    Path param: The id of the account the resource belongs to.

  • conference_sid (String)

    Path param: The ConferenceSid that uniquely identifies a conference.

  • announce_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantUpdateParams::AnnounceMethod)

    Body param: The HTTP method used to call the ‘AnnounceUrl`. Defaults to `POST`.

  • announce_url (String)

    Body param: The URL to call to announce something to the participant. The URL ma

  • beep_on_exit (Boolean)

    Body param: Whether to play a notification beep to the conference when the parti

  • call_sid_to_coach (String)

    Body param: The SID of the participant who is being coached. The participant bei

  • coaching (Boolean)

    Body param: Whether the participant is coaching another call. When ‘true`, `Call

  • end_conference_on_exit (Boolean)

    Body param: Whether to end the conference when the participant leaves.

  • hold (Boolean)

    Body param: Whether the participant should be on hold.

  • hold_method (Symbol, Telnyx::Models::Texml::Accounts::Conferences::ParticipantUpdateParams::HoldMethod)

    Body param: The HTTP method to use when calling the ‘HoldUrl`.

  • hold_url (String)

    Body param: The URL to be called using the ‘HoldMethod` for music that plays whe

  • muted (Boolean)

    Body param: Whether the participant should be muted.

  • wait_url (String)

    Body param: The URL to call for an audio file to play while the participant is w

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

Returns:

See Also:



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/telnyx/resources/texml/accounts/conferences/participants.rb', line 89

def update(call_sid_or_participant_label, params)
  parsed, options = Telnyx::Texml::Accounts::Conferences::ParticipantUpdateParams.dump_request(params)
   =
    parsed.delete(:account_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  conference_sid =
    parsed.delete(:conference_sid) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: [
      "texml/Accounts/%1$s/Conferences/%2$s/Participants/%3$s",
      ,
      conference_sid,
      call_sid_or_participant_label
    ],
    headers: {"content-type" => "application/x-www-form-urlencoded"},
    body: parsed,
    model: Telnyx::Models::Texml::Accounts::Conferences::ParticipantUpdateResponse,
    options: options
  )
end