Skip to content

Commit a4fe437

Browse files
release: 4.131.0 (#289)
* ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. * feat: Document AI call status callback overrides * release: 4.131.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 3a4ab13 commit a4fe437

10 files changed

Lines changed: 112 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
runs-on: ${{ github.repository == 'stainless-sdks/telnyx-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2222
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
2323
steps:
24-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525

2626
- name: Install uv
27-
uses: astral-sh/setup-uv@v5
27+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
2828
with:
2929
version: '0.10.2'
3030

@@ -43,10 +43,10 @@ jobs:
4343
id-token: write
4444
runs-on: ${{ github.repository == 'stainless-sdks/telnyx-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4545
steps:
46-
- uses: actions/checkout@v6
46+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747

4848
- name: Install uv
49-
uses: astral-sh/setup-uv@v5
49+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
5050
with:
5151
version: '0.10.2'
5252

@@ -61,7 +61,7 @@ jobs:
6161
github.repository == 'stainless-sdks/telnyx-python' &&
6262
!startsWith(github.ref, 'refs/heads/stl/')
6363
id: github-oidc
64-
uses: actions/github-script@v8
64+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
6565
with:
6666
script: core.setOutput('github_token', await core.getIDToken());
6767

@@ -81,10 +81,10 @@ jobs:
8181
runs-on: ${{ github.repository == 'stainless-sdks/telnyx-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
8282
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
8383
steps:
84-
- uses: actions/checkout@v6
84+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8585

8686
- name: Install uv
87-
uses: astral-sh/setup-uv@v5
87+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
8888
with:
8989
version: '0.10.2'
9090

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
id-token: write
1818

1919
steps:
20-
- uses: actions/checkout@v6
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121

2222
- name: Install uv
23-
uses: astral-sh/setup-uv@v5
23+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
2424
with:
2525
version: '0.9.13'
2626

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'team-telnyx/telnyx-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
15-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1616

1717
- name: Check release environment
1818
run: |

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.130.0"
2+
".": "4.131.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1039
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-d29d8b4b1cfd89d8feeaab4d5e950f49bb77c55ebb86c76ae1d797b974dc64f7.yml
3-
openapi_spec_hash: ccf682c997bdd7754fcfa8cf7bd924bc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-ffde1e24535b84cba3dac4fdf2ef6df0fe07639f3429f606c5256c870fe5e062.yml
3+
openapi_spec_hash: 9d4326316d01d0bd0b1b4fcaa849b80c
44
config_hash: bc071de39b424ea1ecf205d551ac87cc

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 4.131.0 (2026-05-13)
4+
5+
Full Changelog: [v4.130.0...v4.131.0](https://github.com/team-telnyx/telnyx-python/compare/v4.130.0...v4.131.0)
6+
7+
### Features
8+
9+
* Document AI call status callback overrides ([87723f8](https://github.com/team-telnyx/telnyx-python/commit/87723f8a9160be89eaf88a209c621edb3fa27e0c))
10+
311
## 4.130.0 (2026-05-11)
412

513
Full Changelog: [v4.129.0...v4.130.0](https://github.com/team-telnyx/telnyx-python/compare/v4.129.0...v4.130.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "telnyx"
3-
version = "4.130.0"
3+
version = "4.131.0"
44
description = "The official Python library for the telnyx API"
55
dynamic = ["readme"]
66
license = "MIT"

src/telnyx/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "telnyx"
4-
__version__ = "4.130.0" # x-release-please-version
4+
__version__ = "4.131.0" # x-release-please-version

src/telnyx/resources/texml/texml.py

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

src/telnyx/types/texml_initiate_ai_call_params.py

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,20 @@ class TexmlInitiateAICallParams(TypedDict, total=False):
5656
"""
5757

5858
conversation_callback: Annotated[str, PropertyInfo(alias="ConversationCallback")]
59-
"""URL destination for Telnyx to send conversation callback events to."""
59+
"""URL destination for Telnyx to send AI conversation callback events for this
60+
call.
61+
62+
Events include `conversation_created` and `conversation_ended`.
63+
"""
6064

6165
conversation_callback_method: Annotated[Literal["GET", "POST"], PropertyInfo(alias="ConversationCallbackMethod")]
62-
"""HTTP request type used for `ConversationCallback`."""
66+
"""HTTP request type used for `ConversationCallback` and `ConversationCallbacks`."""
6367

6468
conversation_callbacks: Annotated[SequenceNotStr[str], PropertyInfo(alias="ConversationCallbacks")]
65-
"""An array of URL destinations for conversation callback events."""
69+
"""Array of URL destinations for AI conversation callback events for this call.
70+
71+
Events include `conversation_created` and `conversation_ended`.
72+
"""
6673

6774
custom_headers: Annotated[Iterable[CustomHeader], PropertyInfo(alias="CustomHeaders")]
6875
"""Custom HTTP headers to be sent with the call.
@@ -152,22 +159,33 @@ class TexmlInitiateAICallParams(TypedDict, total=False):
152159
"""Defines the SIP region to be used for the call."""
153160

154161
status_callback: Annotated[str, PropertyInfo(alias="StatusCallback")]
155-
"""URL destination for Telnyx to send status callback events to for the call."""
162+
"""URL destination for Telnyx to send status callback events for this AI call.
156163
157-
status_callback_event: Annotated[str, PropertyInfo(alias="StatusCallbackEvent")]
158-
"""The call events for which Telnyx should send a webhook.
164+
When provided, this per-call value overrides the status callback URL configured
165+
on the TeXML application/connection.
166+
"""
159167

160-
Multiple events can be defined when separated by a space. Valid values:
161-
initiated, ringing, answered, completed.
168+
status_callback_event: Annotated[str, PropertyInfo(alias="StatusCallbackEvent")]
169+
"""
170+
The status callback events for which Telnyx should send a webhook for this AI
171+
call. Multiple events can be defined when separated by a space. Valid values:
172+
initiated, ringing, answered, completed, no-answer, busy, canceled, failed,
173+
analyzed. When provided, this per-call value overrides the status callback
174+
events configured on the TeXML application/connection.
162175
"""
163176

164177
status_callback_method: Annotated[Literal["GET", "POST"], PropertyInfo(alias="StatusCallbackMethod")]
165-
"""HTTP request type used for `StatusCallback`."""
178+
"""
179+
HTTP request type used for `StatusCallback` and `StatusCallbacks` for this AI
180+
call. When provided, this per-call value overrides the status callback method
181+
configured on the TeXML application/connection.
182+
"""
166183

167184
status_callbacks: Annotated[SequenceNotStr[str], PropertyInfo(alias="StatusCallbacks")]
168185
"""
169-
An array of URL destinations for Telnyx to send status callback events to for
170-
the call.
186+
Array of URL destinations for Telnyx to send status callback events for this AI
187+
call. When provided, these per-call values override the status callback URL
188+
configured on the TeXML application/connection.
171189
"""
172190

173191
time_limit: Annotated[int, PropertyInfo(alias="TimeLimit")]

0 commit comments

Comments
 (0)