@telnyx/webrtc 2.27.1 → 2.27.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -257,6 +257,33 @@ const client = new TelnyxRTC({
257
257
  client.connect();
258
258
  ```
259
259
 
260
+ By default, anonymous login starts a new AI Assistant conversation. Do not pass
261
+ `target_params.conversation_id` for application session tracking or as a
262
+ customer-generated correlation ID.
263
+
264
+ `target_params.conversation_id` is only for joining an existing Telnyx AI
265
+ conversation:
266
+
267
+ ```js
268
+ const client = new TelnyxRTC({
269
+ anonymous_login: {
270
+ target_id: 'assistant-UUID',
271
+ target_type: 'ai_assistant',
272
+ target_params: {
273
+ conversation_id: 'existing-telnyx-conversation-id',
274
+ },
275
+ },
276
+ });
277
+ ```
278
+
279
+ When `conversation_id` is omitted, the TeXML endpoint starts a new conversation
280
+ with `<AIAssistant id="...">`. When it is provided, voice-sdk-proxy forwards it
281
+ as the `X-AI-Assistant-Conversation-ID` SIP header and the TeXML endpoint uses
282
+ `<AIAssistant join="...">` to attach the call to that existing conversation. If
283
+ the conversation does not exist or does not belong to the caller's
284
+ project/account, the join fails (for example with AI Assistant error code
285
+ `10007`: `The conversation does not exist or does not belong to this user`).
286
+
260
287
  ### Making Calls to AI Assistants
261
288
 
262
289
  Making calls to the AI assistant is similar to making calls with a SIP connection. You can use the `newCall` method to initiate a call, the destination number can be left blank.