telnyx 3.9.0__py3-none-any.whl → 3.10.0__py3-none-any.whl

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.

Potentially problematic release.


This version of telnyx might be problematic. Click here for more details.

telnyx/_streaming.py CHANGED
@@ -57,9 +57,8 @@ class Stream(Generic[_T]):
57
57
  for sse in iterator:
58
58
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59
59
 
60
- # Ensure the entire stream is consumed
61
- for _sse in iterator:
62
- ...
60
+ # As we might not fully consume the response stream, we need to close it explicitly
61
+ response.close()
63
62
 
64
63
  def __enter__(self) -> Self:
65
64
  return self
@@ -121,9 +120,8 @@ class AsyncStream(Generic[_T]):
121
120
  async for sse in iterator:
122
121
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123
122
 
124
- # Ensure the entire stream is consumed
125
- async for _sse in iterator:
126
- ...
123
+ # As we might not fully consume the response stream, we need to close it explicitly
124
+ await response.aclose()
127
125
 
128
126
  async def __aenter__(self) -> Self:
129
127
  return self
telnyx/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "telnyx"
4
- __version__ = "3.9.0" # x-release-please-version
4
+ __version__ = "3.10.0" # x-release-please-version
@@ -3120,6 +3120,7 @@ class ActionsResource(SyncAPIResource):
3120
3120
  sip_auth_password: str | Omit = omit,
3121
3121
  sip_auth_username: str | Omit = omit,
3122
3122
  sip_headers: Iterable[SipHeaderParam] | Omit = omit,
3123
+ sip_region: Literal["US", "Europe", "Canada", "Australia", "Middle East"] | Omit = omit,
3123
3124
  sip_transport_protocol: Literal["UDP", "TCP", "TLS"] | Omit = omit,
3124
3125
  sound_modifications: SoundModificationsParam | Omit = omit,
3125
3126
  target_leg_client_state: str | Omit = omit,
@@ -3241,6 +3242,8 @@ class ActionsResource(SyncAPIResource):
3241
3242
  sip_headers: SIP headers to be added to the SIP INVITE. Currently only User-to-User header is
3242
3243
  supported.
3243
3244
 
3245
+ sip_region: Defines the SIP region to be used for the call.
3246
+
3244
3247
  sip_transport_protocol: Defines SIP transport protocol to be used on the call.
3245
3248
 
3246
3249
  sound_modifications: Use this field to modify sound effects, for example adjust the pitch.
@@ -3305,6 +3308,7 @@ class ActionsResource(SyncAPIResource):
3305
3308
  "sip_auth_password": sip_auth_password,
3306
3309
  "sip_auth_username": sip_auth_username,
3307
3310
  "sip_headers": sip_headers,
3311
+ "sip_region": sip_region,
3308
3312
  "sip_transport_protocol": sip_transport_protocol,
3309
3313
  "sound_modifications": sound_modifications,
3310
3314
  "target_leg_client_state": target_leg_client_state,
@@ -6365,6 +6369,7 @@ class AsyncActionsResource(AsyncAPIResource):
6365
6369
  sip_auth_password: str | Omit = omit,
6366
6370
  sip_auth_username: str | Omit = omit,
6367
6371
  sip_headers: Iterable[SipHeaderParam] | Omit = omit,
6372
+ sip_region: Literal["US", "Europe", "Canada", "Australia", "Middle East"] | Omit = omit,
6368
6373
  sip_transport_protocol: Literal["UDP", "TCP", "TLS"] | Omit = omit,
6369
6374
  sound_modifications: SoundModificationsParam | Omit = omit,
6370
6375
  target_leg_client_state: str | Omit = omit,
@@ -6486,6 +6491,8 @@ class AsyncActionsResource(AsyncAPIResource):
6486
6491
  sip_headers: SIP headers to be added to the SIP INVITE. Currently only User-to-User header is
6487
6492
  supported.
6488
6493
 
6494
+ sip_region: Defines the SIP region to be used for the call.
6495
+
6489
6496
  sip_transport_protocol: Defines SIP transport protocol to be used on the call.
6490
6497
 
6491
6498
  sound_modifications: Use this field to modify sound effects, for example adjust the pitch.
@@ -6550,6 +6557,7 @@ class AsyncActionsResource(AsyncAPIResource):
6550
6557
  "sip_auth_password": sip_auth_password,
6551
6558
  "sip_auth_username": sip_auth_username,
6552
6559
  "sip_headers": sip_headers,
6560
+ "sip_region": sip_region,
6553
6561
  "sip_transport_protocol": sip_transport_protocol,
6554
6562
  "sound_modifications": sound_modifications,
6555
6563
  "target_leg_client_state": target_leg_client_state,
@@ -113,6 +113,7 @@ class CallsResource(SyncAPIResource):
113
113
  sip_auth_password: str | Omit = omit,
114
114
  sip_auth_username: str | Omit = omit,
115
115
  sip_headers: Iterable[SipHeaderParam] | Omit = omit,
116
+ sip_region: Literal["US", "Europe", "Canada", "Australia", "Middle East"] | Omit = omit,
116
117
  sip_transport_protocol: Literal["UDP", "TCP", "TLS"] | Omit = omit,
117
118
  sound_modifications: SoundModificationsParam | Omit = omit,
118
119
  stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
@@ -276,6 +277,8 @@ class CallsResource(SyncAPIResource):
276
277
  sip_headers: SIP headers to be added to the SIP INVITE request. Currently only User-to-User
277
278
  header is supported.
278
279
 
280
+ sip_region: Defines the SIP region to be used for the call.
281
+
279
282
  sip_transport_protocol: Defines SIP transport protocol to be used on the call.
280
283
 
281
284
  sound_modifications: Use this field to modify sound effects, for example adjust the pitch.
@@ -372,6 +375,7 @@ class CallsResource(SyncAPIResource):
372
375
  "sip_auth_password": sip_auth_password,
373
376
  "sip_auth_username": sip_auth_username,
374
377
  "sip_headers": sip_headers,
378
+ "sip_region": sip_region,
375
379
  "sip_transport_protocol": sip_transport_protocol,
376
380
  "sound_modifications": sound_modifications,
377
381
  "stream_bidirectional_codec": stream_bidirectional_codec,
@@ -496,6 +500,7 @@ class AsyncCallsResource(AsyncAPIResource):
496
500
  sip_auth_password: str | Omit = omit,
497
501
  sip_auth_username: str | Omit = omit,
498
502
  sip_headers: Iterable[SipHeaderParam] | Omit = omit,
503
+ sip_region: Literal["US", "Europe", "Canada", "Australia", "Middle East"] | Omit = omit,
499
504
  sip_transport_protocol: Literal["UDP", "TCP", "TLS"] | Omit = omit,
500
505
  sound_modifications: SoundModificationsParam | Omit = omit,
501
506
  stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
@@ -659,6 +664,8 @@ class AsyncCallsResource(AsyncAPIResource):
659
664
  sip_headers: SIP headers to be added to the SIP INVITE request. Currently only User-to-User
660
665
  header is supported.
661
666
 
667
+ sip_region: Defines the SIP region to be used for the call.
668
+
662
669
  sip_transport_protocol: Defines SIP transport protocol to be used on the call.
663
670
 
664
671
  sound_modifications: Use this field to modify sound effects, for example adjust the pitch.
@@ -755,6 +762,7 @@ class AsyncCallsResource(AsyncAPIResource):
755
762
  "sip_auth_password": sip_auth_password,
756
763
  "sip_auth_username": sip_auth_username,
757
764
  "sip_headers": sip_headers,
765
+ "sip_region": sip_region,
758
766
  "sip_transport_protocol": sip_transport_protocol,
759
767
  "sound_modifications": sound_modifications,
760
768
  "stream_bidirectional_codec": stream_bidirectional_codec,
@@ -108,7 +108,7 @@ class RecordingsResource(SyncAPIResource):
108
108
  Consolidated filter parameter (deepObject style). Originally:
109
109
  filter[conference_id], filter[created_at][gte], filter[created_at][lte],
110
110
  filter[call_leg_id], filter[call_session_id], filter[from], filter[to],
111
- filter[connection_id]
111
+ filter[connection_id], filter[sip_call_id]
112
112
 
113
113
  page: Consolidated page parameter (deepObject style). Originally: page[size],
114
114
  page[number]
@@ -250,7 +250,7 @@ class AsyncRecordingsResource(AsyncAPIResource):
250
250
  Consolidated filter parameter (deepObject style). Originally:
251
251
  filter[conference_id], filter[created_at][gte], filter[created_at][lte],
252
252
  filter[call_leg_id], filter[call_session_id], filter[from], filter[to],
253
- filter[connection_id]
253
+ filter[connection_id], filter[sip_call_id]
254
254
 
255
255
  page: Consolidated page parameter (deepObject style). Originally: page[size],
256
256
  page[number]
@@ -219,6 +219,9 @@ class CallDialParams(TypedDict, total=False):
219
219
  Currently only User-to-User header is supported.
220
220
  """
221
221
 
222
+ sip_region: Literal["US", "Europe", "Canada", "Australia", "Middle East"]
223
+ """Defines the SIP region to be used for the call."""
224
+
222
225
  sip_transport_protocol: Literal["UDP", "TCP", "TLS"]
223
226
  """Defines SIP transport protocol to be used on the call."""
224
227
 
@@ -164,6 +164,9 @@ class ActionTransferParams(TypedDict, total=False):
164
164
  Currently only User-to-User header is supported.
165
165
  """
166
166
 
167
+ sip_region: Literal["US", "Europe", "Canada", "Australia", "Middle East"]
168
+ """Defines the SIP region to be used for the call."""
169
+
167
170
  sip_transport_protocol: Literal["UDP", "TCP", "TLS"]
168
171
  """Defines SIP transport protocol to be used on the call."""
169
172
 
@@ -13,7 +13,7 @@ class RecordingListParams(TypedDict, total=False):
13
13
 
14
14
  Originally: filter[conference_id], filter[created_at][gte],
15
15
  filter[created_at][lte], filter[call_leg_id], filter[call_session_id],
16
- filter[from], filter[to], filter[connection_id]
16
+ filter[from], filter[to], filter[connection_id], filter[sip_call_id]
17
17
  """
18
18
 
19
19
  page: Page
@@ -61,6 +61,12 @@ class Filter(_FilterReservedKeywords, total=False):
61
61
 
62
62
  created_at: FilterCreatedAt
63
63
 
64
+ sip_call_id: str
65
+ """
66
+ If present, recordings will be filtered to those with a matching `sip_call_id`
67
+ attribute. Matching is case-sensitive
68
+ """
69
+
64
70
  to: str
65
71
  """
66
72
  If present, recordings will be filtered to those with a matching `to` attribute
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telnyx
3
- Version: 3.9.0
3
+ Version: 3.10.0
4
4
  Summary: Telnyx API SDK for global Voice, SMS, MMS, WhatsApp, Fax, Wireless IoT, SIP Trunking, and Call Control.
5
5
  Project-URL: Homepage, https://github.com/team-telnyx/telnyx-python
6
6
  Project-URL: Repository, https://github.com/team-telnyx/telnyx-python
@@ -9,9 +9,9 @@ telnyx/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
9
9
  telnyx/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  telnyx/_resource.py,sha256=B4Qg-uO2a34FQHHZskn89eVURqMuSvv1TdeBJH1z1rU,1100
11
11
  telnyx/_response.py,sha256=4X24wr7uQn2hnM_b0xqQ92zSgxRFFfWG2lTg93-KzNo,28788
12
- telnyx/_streaming.py,sha256=OfSFcMQJ_mnvfkbIdOG7Ajp0SMbXnOJSga4xXHjNAJk,10100
12
+ telnyx/_streaming.py,sha256=RoCjf00pIQGCktRA1QMPzY5vQs4pgpn3DEyLXTWHbXY,10149
13
13
  telnyx/_types.py,sha256=Du3G2vdqeLhhdJZ4Jtck4vOqEvAKI9rB1FnrwB1b_k8,7236
14
- telnyx/_version.py,sha256=yO7Mq2vTSOGHLfystQT0aBZqhiqyLnH7G4MvkMkg3l8,158
14
+ telnyx/_version.py,sha256=WPybo6Rx7K-0KJLkV1WRR56mu9fCdZ_hBqgsTwkHZhs,159
15
15
  telnyx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  telnyx/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  telnyx/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -185,8 +185,8 @@ telnyx/resources/bundle_pricing/billing_bundles.py,sha256=qMCmAtoj48PbHObmv53B-6
185
185
  telnyx/resources/bundle_pricing/bundle_pricing.py,sha256=d3L80tHqOCfcTxVQ7c6DDLfO-5FkG7HMlOfTLVz52-A,5371
186
186
  telnyx/resources/bundle_pricing/user_bundles.py,sha256=d44DFB_SSgXQcFceR3vY4wsQ8pukdATqWoSBoLUcYLA,28714
187
187
  telnyx/resources/calls/__init__.py,sha256=zQUq3YFSSLeXKg5bb5oG2Hh7VJsNmm_Z5nm68sU98LY,1002
188
- telnyx/resources/calls/actions.py,sha256=Dckv3a45gu1onwftc3hUrKUVjB8dWieNV_r0Y9RkwN8,309099
189
- telnyx/resources/calls/calls.py,sha256=tmG2IWlA5OLZ7xDybyycpVKzAQ2G9KaOlxnf1xfrz3E,44548
188
+ telnyx/resources/calls/actions.py,sha256=Cf3cJNt5tlbYVV5oNhEHq21VfKLhZ5pr5_rp9Mt9mHE,309527
189
+ telnyx/resources/calls/calls.py,sha256=TQ-4DQCvh9afTbNHkMOpHzpSBrNYQlJWeP1ZkIIaZLk,44976
190
190
  telnyx/resources/campaign/__init__.py,sha256=MGF-U4sQL_jE6xQKvsDXhucn5snUbtl1naBlZDaujPk,1452
191
191
  telnyx/resources/campaign/campaign.py,sha256=CDmsWo_1eAg9tIdAu9SwU-8xTusuxSU76o2V_mKuCiI,41458
192
192
  telnyx/resources/campaign/osr.py,sha256=q-xqVNbfaDh73WYjcwNiPmQ9kUFO0lncRaAKcdIojkk,5764
@@ -297,7 +297,7 @@ telnyx/resources/queues/calls.py,sha256=A33wkOC6WU1cC7Xm25OtIpOPxA7Rv4kART_K5jep
297
297
  telnyx/resources/queues/queues.py,sha256=zm_7gMojxayn6OiHYGezvrkBs_MYv3CPtWycG62QvwQ,6937
298
298
  telnyx/resources/recordings/__init__.py,sha256=QKXCeJ_NDUEkDXQtFJigJNZ58I1T-VHo0vj_CwuOQXg,1067
299
299
  telnyx/resources/recordings/actions.py,sha256=RuRlHxaoDeZqH5efWFE8t-74abCMGdixbcEwEKpURIo,6154
300
- telnyx/resources/recordings/recordings.py,sha256=GCNVxO2-hl6yFj4XSF5LD26LZR_FcNGpfaiUhDKMlMk,14881
300
+ telnyx/resources/recordings/recordings.py,sha256=h4qWYR6ayUJpI054vOnodLgVflKXlE1rfAgaF2odeSw,14923
301
301
  telnyx/resources/reports/__init__.py,sha256=qk_1dlPxez7lw7AgoInNUZJ7Ri9eGaZSN3_x_2uhBpE,1703
302
302
  telnyx/resources/reports/cdr_usage_reports.py,sha256=n8f0FGM2yUJkuE1AlUzRKQ89kgtilyqrMoxUsElqVfo,8471
303
303
  telnyx/resources/reports/mdr_usage_reports.py,sha256=GllNbFrMnz3s0b-rgaLTnPKIIeJmGjhJkyC9cg9SoaE,22298
@@ -444,7 +444,7 @@ telnyx/types/call_conversation_ended_webhook_event.py,sha256=xkOxhj7h2duW6U0O7PJ
444
444
  telnyx/types/call_conversation_ended_webhook_event1.py,sha256=xkOxhj7h2duW6U0O7PJvcb9YWWhq8HFRKcuGpeZ0dKI,2621
445
445
  telnyx/types/call_conversation_insights_generated_webhook_event.py,sha256=wnCJCAR3Jn6-qSz3AxCu35TRF_3lehVkozUJZyWtwNU,2255
446
446
  telnyx/types/call_conversation_insights_generated_webhook_event1.py,sha256=wnCJCAR3Jn6-qSz3AxCu35TRF_3lehVkozUJZyWtwNU,2255
447
- telnyx/types/call_dial_params.py,sha256=uGIMCdkBCC4OEo9zZiXGd53m3FiKLdbWRXaIcQiknBA,16198
447
+ telnyx/types/call_dial_params.py,sha256=ee-rwsOZu7EoJSXCuzcBif6e88QmIuPen0XPWGvZppo,16335
448
448
  telnyx/types/call_dial_response.py,sha256=qV7fNdy_vNuhBte6B_jxhSqvNQMht8tyq3DZ3-YHQAM,1575
449
449
  telnyx/types/call_dtmf_received_webhook_event.py,sha256=By7pJP_IGMHOjf5rbqBrkGo3V_SEjpZbug5Qpo4R5fc,1853
450
450
  telnyx/types/call_dtmf_received_webhook_event1.py,sha256=By7pJP_IGMHOjf5rbqBrkGo3V_SEjpZbug5Qpo4R5fc,1853
@@ -1095,7 +1095,7 @@ telnyx/types/rcs_suggestion_param.py,sha256=npO5BVYMj_Ok5LDxxU2XX8C_snh3eWasEV32
1095
1095
  telnyx/types/record.py,sha256=PZKiKpovPR_hGKNPmtJD4v5hp37mqTn88bXnHy8dve0,585
1096
1096
  telnyx/types/record_param.py,sha256=e7mXDk3lSFS76D1AuKOEahlGzEnDr1hxMy-7GWwG3YU,244
1097
1097
  telnyx/types/recording_delete_response.py,sha256=J4KEMuOCWhhA7hjADDYNfkt7o7OZlLVttd1gpC4HYN8,339
1098
- telnyx/types/recording_list_params.py,sha256=yJPZB__JJfioYMT3kv8L1q2ZVKTj2Ri7UkJnbwzXpPM,1904
1098
+ telnyx/types/recording_list_params.py,sha256=2RnrvPS2Fj0j4VgzU3mFX5-uy3liEm3-7pbABYBMX74,2088
1099
1099
  telnyx/types/recording_list_response.py,sha256=c_H6mrGUhwUfVBMxkmWOg2J6h6pr0xrMXQIlnXA5MK8,434
1100
1100
  telnyx/types/recording_response_data.py,sha256=oLOd031wHG5MNY3j2ZajgD92e-2_OVTkDW6OwtDbzdE,2330
1101
1101
  telnyx/types/recording_retrieve_response.py,sha256=sy2bO-EiLx3a9_TDcjSMVrXgSqSG8x7opUsYIg3cgu0,343
@@ -1588,7 +1588,7 @@ telnyx/types/calls/action_stop_transcription_params.py,sha256=YUb-a_KunUDsD6fbau
1588
1588
  telnyx/types/calls/action_stop_transcription_response.py,sha256=hltLMgIxyJxj_PEeBuA3BPQ_33n1LvKSiDBV3EspYCY,366
1589
1589
  telnyx/types/calls/action_switch_supervisor_role_params.py,sha256=_oDT9Uae3ODWqltkCHnAyf1H3lRQZ_gmlBI4_EKr-4U,529
1590
1590
  telnyx/types/calls/action_switch_supervisor_role_response.py,sha256=0JlFJ7E6GGgtB9ZmyEB01RH0MmiEHjp_O3LEiIPCRWY,372
1591
- telnyx/types/calls/action_transfer_params.py,sha256=VxWU0BuPn_C8rUmNTOjiMjCmXKPxDnYbQvwml1HnsxE,8894
1591
+ telnyx/types/calls/action_transfer_params.py,sha256=tYPwShytyB_U6ADyvopOtdT6ntxZHKtHvV4PZ4qfBJ0,9031
1592
1592
  telnyx/types/calls/action_transfer_response.py,sha256=HVyyXYhzue5F6EuZtm3DGxX52fopUO6lqRWz06nrqJw,348
1593
1593
  telnyx/types/calls/action_update_client_state_params.py,sha256=tXxzOKclY3R_ZIRgleAY9sfge7Kwi9Vk48yu6CqXVpk,433
1594
1594
  telnyx/types/calls/action_update_client_state_response.py,sha256=S560c0ysvnArlfz0YogaMLuLpGpDJIaVSnQ4tTIRvok,366
@@ -2096,7 +2096,7 @@ telnyx/types/wireless/detail_records_report_list_params.py,sha256=cfjsh4L_8mpDkg
2096
2096
  telnyx/types/wireless/detail_records_report_list_response.py,sha256=S_6nD0fm5EseRIZHnML-UN0-g8Q_0J1cXfg_eLNUev8,331
2097
2097
  telnyx/types/wireless/detail_records_report_retrieve_response.py,sha256=f0C8z8uo_QeCyi3nSDME4f4F3vqcy7o0MpinwDIqe_s,327
2098
2098
  telnyx/types/wireless/wdr_report.py,sha256=bxRr-dc_IW6D0E3i_PUHK-bbu9w114Qql1uoJ_znxEE,1068
2099
- telnyx-3.9.0.dist-info/METADATA,sha256=9Py7FhgBTlrRKMb8HgttIgL5imGDe79WNGvnaddz-bY,15823
2100
- telnyx-3.9.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
2101
- telnyx-3.9.0.dist-info/licenses/LICENSE,sha256=PprdXvskBJR41_t2uhgs5rHYGME_Ek-lh2PAxKtdZs8,1046
2102
- telnyx-3.9.0.dist-info/RECORD,,
2099
+ telnyx-3.10.0.dist-info/METADATA,sha256=5PpVsKNOSE2YILuqxcmJC-lwB8qsSZbZNoJpak1B5vw,15824
2100
+ telnyx-3.10.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
2101
+ telnyx-3.10.0.dist-info/licenses/LICENSE,sha256=PprdXvskBJR41_t2uhgs5rHYGME_Ek-lh2PAxKtdZs8,1046
2102
+ telnyx-3.10.0.dist-info/RECORD,,