Class: Telnyx::Resources::Conferences

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

Defined Under Namespace

Classes: Actions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Conferences

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

Parameters:



165
166
167
168
# File 'lib/telnyx/resources/conferences.rb', line 165

def initialize(client:)
  @client = client
  @actions = Telnyx::Resources::Conferences::Actions.new(client: client)
end

Instance Attribute Details

#actionsTelnyx::Resources::Conferences::Actions (readonly)



7
8
9
# File 'lib/telnyx/resources/conferences.rb', line 7

def actions
  @actions
end

Instance Method Details

#create(call_control_id:, name:, beep_enabled: nil, client_state: nil, comfort_noise: nil, command_id: nil, duration_minutes: nil, hold_audio_url: nil, hold_media_name: nil, max_participants: nil, region: nil, start_conference_on_create: nil, request_options: {}) ⇒ Telnyx::Models::ConferenceCreateResponse

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

Create a conference from an existing call leg using a ‘call_control_id` and a conference name. Upon creating the conference, the call will be automatically bridged to the conference. Conferences will expire after all participants have left the conference or after 4 hours regardless of the number of active participants.

**Expected Webhooks:**

  • ‘conference.created`

  • ‘conference.participant.joined`

  • ‘conference.participant.left`

  • ‘conference.ended`

  • ‘conference.recording.saved`

  • ‘conference.floor.changed`

Parameters:

  • call_control_id (String)

    Unique identifier and token for controlling the call

  • name (String)

    Name of the conference

  • beep_enabled (Symbol, Telnyx::Models::ConferenceCreateParams::BeepEnabled)

    Whether a beep sound should be played when participants join and/or leave the co

  • client_state (String)

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

  • comfort_noise (Boolean)

    Toggle background comfort noise.

  • command_id (String)

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

  • duration_minutes (Integer)

    Time length (minutes) after which the conference will end.

  • hold_audio_url (String)

    The URL of a file to be played to participants joining the conference. The URL c

  • hold_media_name (String)

    The media_name of a file to be played to participants joining the conference. Th

  • max_participants (Integer)

    The maximum number of active conference participants to allow. Must be between 2

  • region (Symbol, Telnyx::Models::ConferenceCreateParams::Region)

    Sets the region where the conference data will be hosted. Defaults to the region

  • start_conference_on_create (Boolean)

    Whether the conference should be started on creation. If the conference isn’t st

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

Returns:

See Also:



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

def create(params)
  parsed, options = Telnyx::ConferenceCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "conferences",
    body: parsed,
    model: Telnyx::Models::ConferenceCreateResponse,
    options: options
  )
end

#list(filter: nil, page_number: nil, page_size: nil, region: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Conference>

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

Lists conferences. Conferences are created on demand, and will expire after all participants have left the conference or after 4 hours regardless of the number of active participants. Conferences are listed in descending order by ‘expires_at`.

Parameters:

Returns:

See Also:



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

def list(params = {})
  parsed, options = Telnyx::ConferenceListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "conferences",
    query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::Conference,
    options: options
  )
end

#list_participants(conference_id, filter: nil, page_number: nil, page_size: nil, region: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ConferenceListParticipantsResponse>

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

Lists conference participants

Parameters:

Returns:

See Also:



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

def list_participants(conference_id, params = {})
  parsed, options = Telnyx::ConferenceListParticipantsParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["conferences/%1$s/participants", conference_id],
    query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::Models::ConferenceListParticipantsResponse,
    options: options
  )
end

#retrieve(id, region: nil, request_options: {}) ⇒ Telnyx::Models::ConferenceRetrieveResponse

Retrieve an existing conference

Parameters:

Returns:

See Also:



82
83
84
85
86
87
88
89
90
91
# File 'lib/telnyx/resources/conferences.rb', line 82

def retrieve(id, params = {})
  parsed, options = Telnyx::ConferenceRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["conferences/%1$s", id],
    query: parsed,
    model: Telnyx::Models::ConferenceRetrieveResponse,
    options: options
  )
end