@@ -117,6 +117,17 @@ def initiate_ai_call(
117117 client state, and calls the dial API. The Twiml, Texml, and Url parameters are
118118 not allowed and will result in a 422 error.
119119
120+ **Expected callback events:**
121+
122+ Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
123+ (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
124+ after post-call processing completes.
125+
126+ Conversation callbacks: `conversation_created` and `conversation_ended`.
127+
128+ Recording, AMD, transcription, and deepfake detection callbacks are only sent
129+ when those features are enabled.
130+
120131 Args:
121132 ai_assistant_id: The ID of the AI assistant to use for the call.
122133
@@ -142,11 +153,13 @@ def initiate_ai_call(
142153 containing only letters, numbers, spaces, and `-_~!.+` special characters. If
143154 omitted, the display name will be the same as the number in the `From` field.
144155
145- conversation_callback: URL destination for Telnyx to send conversation callback events to.
156+ conversation_callback: URL destination for Telnyx to send AI conversation callback events for this
157+ call. Events include `conversation_created` and `conversation_ended`.
146158
147- conversation_callback_method: HTTP request type used for `ConversationCallback`.
159+ conversation_callback_method: HTTP request type used for `ConversationCallback` and `ConversationCallbacks` .
148160
149- conversation_callbacks: An array of URL destinations for conversation callback events.
161+ conversation_callbacks: Array of URL destinations for AI conversation callback events for this call.
162+ Events include `conversation_created` and `conversation_ended`.
150163
151164 custom_headers: Custom HTTP headers to be sent with the call. Each header should be an object
152165 with 'name' and 'value' properties.
@@ -196,16 +209,23 @@ def initiate_ai_call(
196209
197210 sip_region: Defines the SIP region to be used for the call.
198211
199- status_callback: URL destination for Telnyx to send status callback events to for the call.
212+ status_callback: URL destination for Telnyx to send status callback events for this AI call. When
213+ provided, this per-call value overrides the status callback URL configured on
214+ the TeXML application/connection.
200215
201- status_callback_event: The call events for which Telnyx should send a webhook. Multiple events can be
202- defined when separated by a space. Valid values: initiated, ringing, answered,
203- completed.
216+ status_callback_event: The status callback events for which Telnyx should send a webhook for this AI
217+ call. Multiple events can be defined when separated by a space. Valid values:
218+ initiated, ringing, answered, completed, no-answer, busy, canceled, failed,
219+ analyzed. When provided, this per-call value overrides the status callback
220+ events configured on the TeXML application/connection.
204221
205- status_callback_method: HTTP request type used for `StatusCallback`.
222+ status_callback_method: HTTP request type used for `StatusCallback` and `StatusCallbacks` for this AI
223+ call. When provided, this per-call value overrides the status callback method
224+ configured on the TeXML application/connection.
206225
207- status_callbacks: An array of URL destinations for Telnyx to send status callback events to for
208- the call.
226+ status_callbacks: Array of URL destinations for Telnyx to send status callback events for this AI
227+ call. When provided, these per-call values override the status callback URL
228+ configured on the TeXML application/connection.
209229
210230 time_limit: The maximum duration of the call in seconds. The minimum value is 30 and the
211231 maximum value is 14400 (4 hours). Default is 14400 seconds.
@@ -412,6 +432,17 @@ async def initiate_ai_call(
412432 client state, and calls the dial API. The Twiml, Texml, and Url parameters are
413433 not allowed and will result in a 422 error.
414434
435+ **Expected callback events:**
436+
437+ Status callbacks: `initiated`, `ringing`, `answered`, one terminal status
438+ (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed`
439+ after post-call processing completes.
440+
441+ Conversation callbacks: `conversation_created` and `conversation_ended`.
442+
443+ Recording, AMD, transcription, and deepfake detection callbacks are only sent
444+ when those features are enabled.
445+
415446 Args:
416447 ai_assistant_id: The ID of the AI assistant to use for the call.
417448
@@ -437,11 +468,13 @@ async def initiate_ai_call(
437468 containing only letters, numbers, spaces, and `-_~!.+` special characters. If
438469 omitted, the display name will be the same as the number in the `From` field.
439470
440- conversation_callback: URL destination for Telnyx to send conversation callback events to.
471+ conversation_callback: URL destination for Telnyx to send AI conversation callback events for this
472+ call. Events include `conversation_created` and `conversation_ended`.
441473
442- conversation_callback_method: HTTP request type used for `ConversationCallback`.
474+ conversation_callback_method: HTTP request type used for `ConversationCallback` and `ConversationCallbacks` .
443475
444- conversation_callbacks: An array of URL destinations for conversation callback events.
476+ conversation_callbacks: Array of URL destinations for AI conversation callback events for this call.
477+ Events include `conversation_created` and `conversation_ended`.
445478
446479 custom_headers: Custom HTTP headers to be sent with the call. Each header should be an object
447480 with 'name' and 'value' properties.
@@ -491,16 +524,23 @@ async def initiate_ai_call(
491524
492525 sip_region: Defines the SIP region to be used for the call.
493526
494- status_callback: URL destination for Telnyx to send status callback events to for the call.
527+ status_callback: URL destination for Telnyx to send status callback events for this AI call. When
528+ provided, this per-call value overrides the status callback URL configured on
529+ the TeXML application/connection.
495530
496- status_callback_event: The call events for which Telnyx should send a webhook. Multiple events can be
497- defined when separated by a space. Valid values: initiated, ringing, answered,
498- completed.
531+ status_callback_event: The status callback events for which Telnyx should send a webhook for this AI
532+ call. Multiple events can be defined when separated by a space. Valid values:
533+ initiated, ringing, answered, completed, no-answer, busy, canceled, failed,
534+ analyzed. When provided, this per-call value overrides the status callback
535+ events configured on the TeXML application/connection.
499536
500- status_callback_method: HTTP request type used for `StatusCallback`.
537+ status_callback_method: HTTP request type used for `StatusCallback` and `StatusCallbacks` for this AI
538+ call. When provided, this per-call value overrides the status callback method
539+ configured on the TeXML application/connection.
501540
502- status_callbacks: An array of URL destinations for Telnyx to send status callback events to for
503- the call.
541+ status_callbacks: Array of URL destinations for Telnyx to send status callback events for this AI
542+ call. When provided, these per-call values override the status callback URL
543+ configured on the TeXML application/connection.
504544
505545 time_limit: The maximum duration of the call in seconds. The minimum value is 30 and the
506546 maximum value is 14400 (4 hours). Default is 14400 seconds.
0 commit comments