Class: Telnyx::Resources::MeetingSessions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/meeting_sessions.rb,
lib/telnyx/resources/meeting_sessions/actions.rb,
lib/telnyx/resources/meeting_sessions/artifacts.rb,
sig/telnyx/resources/meeting_sessions.rbs,
sig/telnyx/resources/meeting_sessions/actions.rbs,
sig/telnyx/resources/meeting_sessions/artifacts.rbs

Defined Under Namespace

Classes: Actions, Artifacts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ MeetingSessions

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

Parameters:



283
284
285
286
287
# File 'lib/telnyx/resources/meeting_sessions.rb', line 283

def initialize(client:)
  @client = client
  @actions = Telnyx::Resources::MeetingSessions::Actions.new(client: client)
  @artifacts = Telnyx::Resources::MeetingSessions::Artifacts.new(client: client)
end

Instance Attribute Details

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

Send real-time speech and chat actions to an active meeting session.



8
9
10
# File 'lib/telnyx/resources/meeting_sessions.rb', line 8

def actions
  @actions
end

#artifactsTelnyx::Resources::MeetingSessions::Artifacts (readonly)

Create and retrieve asynchronous summaries and action-item artifacts.



12
13
14
# File 'lib/telnyx/resources/meeting_sessions.rb', line 12

def artifacts
  @artifacts
end

Instance Method Details

#create(meeting_url:, assistant: nil, avatar: nil, barge_in: nil, bot_name: nil, camera_image: nil, idempotency_key: nil, join_at: nil, metadata: nil, speak_on_enter: nil, summarize_on_end: nil, voice: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MeetingSessionResponse

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

Creates a new meeting session. When an idempotency_key is supplied in the request body, replay lookup is scoped to the authenticated account and compares only the key; the request payload is not fingerprinted or compared. If a session with that key already exists for the account, the existing session is replayed (200); otherwise a new session is created (201). Supports bring-your-own-key (BYOK) configuration. The session may enter asynchronous states (e.g. joining, waiting_for_admission) before becoming active. Optional camera_image input is write-only and applies only when no Avatar or Assistant webpage output takes precedence. An ignored URL is not fetched. An effective URL source is resolved before bot creation; neither the source URL nor image bytes are persisted, returned, or logged. Treat signed URLs as credentials.

Parameters:

  • meeting_url (String)

    The meeting URL the bot should join.

  • assistant (Telnyx::Models::MeetingSessionCreateParams::Assistant)

    Request options for attaching a voice assistant to the session. Routing fields (

  • avatar (Telnyx::Models::MeetingSessionCreateParams::Avatar)

    Request options for attaching a bring-your-own-key avatar to the session.

  • barge_in (Boolean)

    When enabled, a human participant speech_on event interrupts and stops the cur

  • bot_name (String)

    Display name for the bot in the meeting. Defaults to "Meeting Bot".

  • camera_image (Telnyx::Models::MeetingSessionCreateParams::CameraImage::MeetingSessionCameraImageBase64Source, Telnyx::Models::MeetingSessionCreateParams::CameraImage::MeetingSessionCameraImageURLSource)

    Write-only static camera-tile image for this session, not a native account or pa

  • idempotency_key (String)

    Client-supplied idempotency key to safely retry creation requests without duplic

  • join_at (Time)

    ISO-8601 timestamp in the future at which the bot should join. If omitted, the b

  • metadata (Hash{Symbol=>Object})

    Arbitrary key-value metadata attached to the session. The serialized JSON repres

  • speak_on_enter (String)

    Text the bot speaks when it enters the meeting.

  • summarize_on_end (Boolean)

    If true, generate a summary artifact when the session ends.

  • voice (String)

    Session-default voice identifier used for speak_on_enter and ordinary speak ac

  • webhook_url (String)

    HTTPS endpoint to receive session lifecycle callbacks. Static validation require

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

Returns:

See Also:



62
63
64
65
66
67
68
69
70
71
# File 'lib/telnyx/resources/meeting_sessions.rb', line 62

def create(params)
  parsed, options = Telnyx::MeetingSessionCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "meeting_sessions",
    body: parsed,
    model: Telnyx::MeetingSessionResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::MeetingSessionResponse

Stops a meeting session without deleting its persisted record. Scheduled bots are cancelled, while bots that are joining or active are asked to leave. The persisted meeting session record remains available.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

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

Returns:

See Also:



159
160
161
162
163
164
165
166
# File 'lib/telnyx/resources/meeting_sessions.rb', line 159

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["meeting_sessions/%1$s", id],
    model: Telnyx::MeetingSessionResponse,
    options: params[:request_options]
  )
end

#delete_recording_media(id, request_options: {}) ⇒ Telnyx::Models::MeetingSessionDeleteRecordingMediaResponse

Not yet available in production — this route is not currently routed on api.telnyx.com and returns a generic 404; it is documented ahead of rollout. Irreversibly requests deletion of provider-hosted aggregate recording media under the provider contract. The operation retains the Telnyx-local Meeting session, transcript segments, events, artifacts, and usage records. It is separate from DELETE /meeting_sessions/{id}, which stops or cancels participation without deleting the persisted session. A missing/foreign session returns 404; provider deletion failures return 502.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

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

Returns:

See Also:



186
187
188
189
190
191
192
193
# File 'lib/telnyx/resources/meeting_sessions.rb', line 186

def delete_recording_media(id, params = {})
  @client.request(
    method: :delete,
    path: ["meeting_sessions/%1$s/recording_media", id],
    model: Telnyx::Models::MeetingSessionDeleteRecordingMediaResponse,
    options: params[:request_options]
  )
end

#list(status: nil, request_options: {}) ⇒ Telnyx::Models::MeetingSessionListResponse

Returns a list of meeting sessions, optionally filtered by status.

Parameters:

Returns:

See Also:



134
135
136
137
138
139
140
141
142
143
144
# File 'lib/telnyx/resources/meeting_sessions.rb', line 134

def list(params = {})
  parsed, options = Telnyx::MeetingSessionListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "meeting_sessions",
    query: query,
    model: Telnyx::Models::MeetingSessionListResponse,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::MeetingSessionResponse

Retrieves a single meeting session by ID. A session that does not exist or that belongs to a different account both return 404.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

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

Returns:

See Also:



85
86
87
88
89
90
91
92
# File 'lib/telnyx/resources/meeting_sessions.rb', line 85

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["meeting_sessions/%1$s", id],
    model: Telnyx::MeetingSessionResponse,
    options: params[:request_options]
  )
end

#retrieve_events(id, after: nil, limit: nil, request_options: {}) ⇒ Telnyx::Models::MeetingSessionRetrieveEventsResponse

Returns stored events ordered by ascending seq. To continue, pass the last returned item's seq as after. An empty page means no later stored events existed at read time; this operation returns no separate next-page cursor. Default limit is 100 and maximum is 1,000.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

  • after (Integer)

    Return results with a cursor position after this value.

  • limit (Integer)

    Maximum number of results to return per page.

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

Returns:

See Also:



213
214
215
216
217
218
219
220
221
222
223
# File 'lib/telnyx/resources/meeting_sessions.rb', line 213

def retrieve_events(id, params = {})
  parsed, options = Telnyx::MeetingSessionRetrieveEventsParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["meeting_sessions/%1$s/events", id],
    query: query,
    model: Telnyx::Models::MeetingSessionRetrieveEventsResponse,
    options: options
  )
end

#retrieve_recordings(id, request_options: {}) ⇒ Telnyx::Models::MeetingSessionRetrieveRecordingsResponse

Returns recordings for a meeting session.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

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

Returns:

See Also:



236
237
238
239
240
241
242
243
# File 'lib/telnyx/resources/meeting_sessions.rb', line 236

def retrieve_recordings(id, params = {})
  @client.request(
    method: :get,
    path: ["meeting_sessions/%1$s/recordings", id],
    model: Telnyx::Models::MeetingSessionRetrieveRecordingsResponse,
    options: params[:request_options]
  )
end

#retrieve_transcript(id, after: nil, limit: nil, wait_seconds: nil, request_options: {}) ⇒ Telnyx::Models::MeetingSessionRetrieveTranscriptResponse

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

Returns transcript segments ordered by ascending seq. Default limit is 100 and maximum is 1,000. Continue with after=meta.next_after. A long-poll timeout returns 200 with empty data and meta.next_after: null; retain the cursor supplied to that request because null is not a replacement cursor.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

  • after (Integer)

    Return results with a cursor position after this value.

  • limit (Integer)

    Maximum number of results to return per page.

  • wait_seconds (Integer)

    Long-poll duration in seconds. The server holds the connection open for up to th

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

Returns:

See Also:



268
269
270
271
272
273
274
275
276
277
278
# File 'lib/telnyx/resources/meeting_sessions.rb', line 268

def retrieve_transcript(id, params = {})
  parsed, options = Telnyx::MeetingSessionRetrieveTranscriptParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["meeting_sessions/%1$s/transcript", id],
    query: query,
    model: Telnyx::Models::MeetingSessionRetrieveTranscriptResponse,
    options: options
  )
end

#update(id, bot_name: nil, join_at: nil, request_options: {}) ⇒ Telnyx::Models::MeetingSessionResponse

Updates mutable properties of a meeting session. Only sessions in the scheduled state can be updated; any other state returns 409 with the invalid_state error code. All request fields are optional, and an empty object is a valid no-op update.

Parameters:

  • id (String)

    Unique identifier for the meeting session.

  • bot_name (String)

    Updated display name for the bot.

  • join_at (Time)

    ISO-8601 timestamp for the bot to join. May be updated to reschedule.

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

Returns:

See Also:



112
113
114
115
116
117
118
119
120
121
# File 'lib/telnyx/resources/meeting_sessions.rb', line 112

def update(id, params = {})
  parsed, options = Telnyx::MeetingSessionUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["meeting_sessions/%1$s", id],
    body: parsed,
    model: Telnyx::MeetingSessionResponse,
    options: options
  )
end