telnyx 3.5.0a0__py3-none-any.whl → 3.6.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/_client.py +56 -756
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +70 -0
- telnyx/resources/advanced_orders.py +63 -63
- telnyx/resources/ai/assistants/assistants.py +15 -17
- telnyx/resources/ai/assistants/versions.py +13 -15
- telnyx/resources/ai/conversations/conversations.py +137 -3
- telnyx/resources/ai/conversations/messages.py +1 -134
- telnyx/resources/brand/brand.py +8 -4
- telnyx/resources/calls/actions.py +154 -150
- telnyx/resources/calls/calls.py +18 -10
- telnyx/resources/conferences/actions.py +8 -24
- telnyx/resources/conferences/conferences.py +2 -6
- telnyx/resources/documents.py +242 -37
- telnyx/resources/legacy/__init__.py +33 -0
- telnyx/resources/legacy/legacy.py +102 -0
- telnyx/resources/legacy/reporting/__init__.py +47 -0
- telnyx/resources/legacy/reporting/batch_detail_records/__init__.py +61 -0
- telnyx/resources/legacy/reporting/batch_detail_records/batch_detail_records.py +166 -0
- telnyx/resources/legacy/reporting/batch_detail_records/messaging.py +482 -0
- telnyx/resources/legacy/reporting/batch_detail_records/speech_to_text.py +399 -0
- telnyx/resources/legacy/reporting/batch_detail_records/voice.py +539 -0
- telnyx/resources/legacy/reporting/reporting.py +134 -0
- telnyx/resources/legacy/reporting/usage_reports/__init__.py +61 -0
- telnyx/resources/legacy/reporting/usage_reports/messaging.py +471 -0
- telnyx/resources/legacy/reporting/usage_reports/number_lookup.py +464 -0
- telnyx/resources/legacy/reporting/usage_reports/usage_reports.py +288 -0
- telnyx/resources/legacy/reporting/usage_reports/voice.py +493 -0
- telnyx/resources/messaging_profiles/messaging_profiles.py +16 -0
- telnyx/resources/messaging_tollfree/verification/requests.py +203 -1
- telnyx/resources/oauth.py +855 -0
- telnyx/resources/oauth_clients.py +711 -0
- telnyx/resources/oauth_grants.py +349 -0
- telnyx/resources/outbound_voice_profiles.py +24 -4
- telnyx/resources/phone_numbers/jobs.py +12 -0
- telnyx/resources/porting_orders/porting_orders.py +20 -8
- telnyx/resources/sim_cards/actions.py +12 -12
- telnyx/resources/sim_cards/sim_cards.py +3 -2
- telnyx/resources/texml/accounts/calls/calls.py +11 -0
- telnyx/resources/texml/accounts/conferences/participants.py +11 -0
- telnyx/resources/verifications/verifications.py +10 -0
- telnyx/resources/verified_numbers/verified_numbers.py +25 -4
- telnyx/resources/verify_profiles.py +182 -1
- telnyx/resources/well_known.py +198 -0
- telnyx/types/__init__.py +51 -9
- telnyx/types/access_ip_address_list_response.py +3 -12
- telnyx/types/access_ip_range_list_response.py +3 -12
- telnyx/types/addresses/action_validate_response.py +8 -3
- telnyx/types/{advanced_order_update_params.py → advanced_order_update_requirement_group_params.py} +2 -2
- telnyx/types/ai/__init__.py +2 -3
- telnyx/types/ai/assistant_import_params.py +1 -1
- telnyx/types/ai/assistants/__init__.py +0 -3
- telnyx/types/ai/assistants_list.py +4 -88
- telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +4 -4
- telnyx/types/ai/conversations/__init__.py +0 -1
- telnyx/types/ai/import_metadata.py +1 -1
- telnyx/types/ai/{assistant_clone_response.py → inference_embedding.py} +2 -2
- telnyx/types/ai/inference_embedding_transfer_tool_params.py +6 -0
- telnyx/types/ai/inference_embedding_transfer_tool_params_param.py +6 -0
- telnyx/types/ai/inference_embedding_webhook_tool_params.py +2 -0
- telnyx/types/ai/inference_embedding_webhook_tool_params_param.py +2 -0
- telnyx/types/ai/voice_settings.py +49 -2
- telnyx/types/ai/voice_settings_param.py +49 -2
- telnyx/types/brand_create_params.py +2 -1
- telnyx/types/brand_update_params.py +2 -1
- telnyx/types/call_dial_params.py +11 -3
- telnyx/types/calls/__init__.py +1 -0
- telnyx/types/calls/action_answer_params.py +1 -2
- telnyx/types/calls/action_gather_using_ai_params.py +5 -8
- telnyx/types/calls/action_start_streaming_params.py +5 -2
- telnyx/types/calls/action_start_transcription_params.py +160 -6
- telnyx/types/calls/action_transfer_params.py +50 -0
- telnyx/types/calls/telnyx_transcription_language.py +108 -0
- telnyx/types/calls/transcription_engine_b_config_param.py +3 -102
- telnyx/types/calls/transcription_start_request_param.py +161 -6
- telnyx/types/campaign_submit_appeal_response.py +0 -3
- telnyx/types/country_coverage_retrieve_country_response.py +7 -0
- telnyx/types/country_coverage_retrieve_response.py +7 -0
- telnyx/types/document_upload_json_params.py +39 -0
- telnyx/types/document_upload_json_response.py +12 -0
- telnyx/types/legacy/__init__.py +3 -0
- telnyx/types/legacy/reporting/__init__.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/__init__.py +24 -0
- telnyx/types/legacy/reporting/batch_detail_records/batch_csv_pagination_meta.py +17 -0
- telnyx/types/legacy/reporting/batch_detail_records/cdr_detailed_req_response.py +63 -0
- telnyx/types/legacy/reporting/batch_detail_records/mdr_detail_report_response.py +42 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_create_params.py +55 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_create_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_delete_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_list_response.py +15 -0
- telnyx/types/legacy/reporting/batch_detail_records/messaging_retrieve_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_params.py +19 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_create_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_delete_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_list_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/speech_to_text_retrieve_response.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/stt_detail_report_response.py +27 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_create_params.py +57 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_create_response.py +13 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_delete_response.py +13 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_list_response.py +15 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_fields_response.py +23 -0
- telnyx/types/legacy/reporting/batch_detail_records/voice_retrieve_response.py +13 -0
- telnyx/types/legacy/reporting/filter.py +31 -0
- telnyx/types/legacy/reporting/filter_param.py +30 -0
- telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_params.py +17 -0
- telnyx/types/legacy/reporting/usage_report_retrieve_speech_to_text_response.py +11 -0
- telnyx/types/legacy/reporting/usage_reports/__init__.py +21 -0
- telnyx/types/legacy/reporting/usage_reports/cdr_usage_report_response_legacy.py +43 -0
- telnyx/types/legacy/reporting/usage_reports/mdr_usage_report_response_legacy.py +38 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_create_params.py +29 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_create_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_delete_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_list_params.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_list_response.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/messaging_retrieve_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/number_lookup_create_params.py +26 -0
- telnyx/types/legacy/reporting/usage_reports/number_lookup_list_params.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/standard_pagination_meta.py +17 -0
- telnyx/types/legacy/reporting/usage_reports/voice_create_params.py +40 -0
- telnyx/types/legacy/reporting/usage_reports/voice_create_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/voice_delete_response.py +13 -0
- telnyx/types/legacy/reporting/usage_reports/voice_list_params.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/voice_list_response.py +15 -0
- telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +13 -0
- telnyx/types/message_template.py +12 -0
- telnyx/types/messaging_profile.py +3 -0
- telnyx/types/messaging_profile_create_params.py +3 -0
- telnyx/types/messaging_profile_update_params.py +3 -0
- telnyx/types/messaging_tollfree/verification/__init__.py +1 -0
- telnyx/types/messaging_tollfree/verification/request_create_params.py +51 -1
- telnyx/types/messaging_tollfree/verification/request_update_params.py +51 -1
- telnyx/types/messaging_tollfree/verification/toll_free_verification_entity_type.py +9 -0
- telnyx/types/messaging_tollfree/verification/verification_request_egress.py +24 -0
- telnyx/types/messaging_tollfree/verification/verification_request_status.py +24 -0
- telnyx/types/number_order_status_update_webhook_event.py +30 -4
- telnyx/types/oauth_client.py +59 -0
- telnyx/types/oauth_client_create_params.py +39 -0
- telnyx/types/oauth_client_create_response.py +12 -0
- telnyx/types/oauth_client_list_params.py +38 -0
- telnyx/types/oauth_client_list_response.py +15 -0
- telnyx/types/oauth_client_retrieve_response.py +12 -0
- telnyx/types/oauth_client_update_params.py +36 -0
- telnyx/types/oauth_client_update_response.py +12 -0
- telnyx/types/oauth_grant.py +29 -0
- telnyx/types/oauth_grant_delete_response.py +12 -0
- telnyx/types/oauth_grant_list_params.py +17 -0
- telnyx/types/oauth_grant_list_response.py +15 -0
- telnyx/types/oauth_grant_retrieve_response.py +12 -0
- telnyx/types/oauth_grants_params.py +15 -0
- telnyx/types/oauth_grants_response.py +10 -0
- telnyx/types/oauth_introspect_params.py +12 -0
- telnyx/types/oauth_introspect_response.py +30 -0
- telnyx/types/oauth_register_params.py +39 -0
- telnyx/types/oauth_register_response.py +45 -0
- telnyx/types/oauth_retrieve_authorize_params.py +30 -0
- telnyx/types/oauth_retrieve_jwks_response.py +25 -0
- telnyx/types/oauth_retrieve_response.py +47 -0
- telnyx/types/oauth_token_params.py +33 -0
- telnyx/types/oauth_token_response.py +25 -0
- telnyx/types/outbound_voice_profile.py +27 -1
- telnyx/types/outbound_voice_profile_create_params.py +27 -1
- telnyx/types/outbound_voice_profile_list_params.py +1 -1
- telnyx/types/outbound_voice_profile_update_params.py +27 -1
- telnyx/types/pagination_meta_cloudflare_ip_list_sync.py +15 -0
- telnyx/types/pagination_meta_oauth.py +21 -0
- telnyx/types/phone_number_blocks/__init__.py +1 -0
- telnyx/types/phone_number_blocks/job.py +3 -34
- telnyx/types/phone_number_blocks/job_error.py +32 -0
- telnyx/types/phone_number_delete_response.py +7 -0
- telnyx/types/phone_number_detailed.py +7 -0
- telnyx/types/phone_number_list_params.py +6 -0
- telnyx/types/phone_numbers/job_update_batch_params.py +7 -0
- telnyx/types/phone_numbers/phone_numbers_job.py +3 -36
- telnyx/types/porting_order.py +3 -0
- telnyx/types/porting_order_create_params.py +3 -0
- telnyx/types/porting_order_list_params.py +52 -31
- telnyx/types/porting_order_update_params.py +2 -0
- telnyx/types/porting_orders/phone_number_configuration_list_params.py +19 -19
- telnyx/types/report_list_mdrs_response.py +3 -12
- telnyx/types/reports/__init__.py +1 -0
- telnyx/types/reports/mdr_usage_report_list_response.py +3 -12
- telnyx/types/reports/pagination_meta_reporting.py +17 -0
- telnyx/types/requirement_group.py +2 -2
- telnyx/types/requirement_group_list_params.py +1 -1
- telnyx/types/shared/__init__.py +1 -0
- telnyx/types/{error.py → shared/api_error.py} +3 -3
- telnyx/types/shared/simple_sim_card.py +15 -0
- telnyx/types/sim_card.py +12 -0
- telnyx/types/sim_card_update_params.py +2 -1
- telnyx/types/stream_bidirectional_codec.py +1 -1
- telnyx/types/stream_bidirectional_sampling_rate.py +7 -0
- telnyx/types/stream_codec.py +1 -1
- telnyx/types/texml/accounts/call_calls_params.py +16 -1
- telnyx/types/texml/accounts/conferences/participant_participants_params.py +16 -1
- telnyx/types/verification_trigger_call_params.py +7 -0
- telnyx/types/verifications/__init__.py +1 -0
- telnyx/types/verifications/by_phone_number_list_response.py +4 -13
- telnyx/types/verifications/verify_meta.py +17 -0
- telnyx/types/verified_number_create_params.py +10 -0
- telnyx/types/verify_profile.py +18 -3
- telnyx/types/verify_profile_create_template_params.py +12 -0
- telnyx/types/verify_profile_list_response.py +4 -13
- telnyx/types/verify_profile_message_template_response.py +13 -0
- telnyx/types/verify_profile_retrieve_templates_response.py +4 -9
- telnyx/types/verify_profile_update_template_params.py +12 -0
- telnyx/types/well_known_retrieve_authorization_server_metadata_response.py +42 -0
- telnyx/types/well_known_retrieve_protected_resource_metadata_response.py +15 -0
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/METADATA +4 -4
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/RECORD +212 -121
- telnyx/types/ai/assistant_create_response.py +0 -92
- telnyx/types/ai/assistant_retrieve_response.py +0 -92
- telnyx/types/ai/assistants/version_promote_response.py +0 -92
- telnyx/types/ai/assistants/version_retrieve_response.py +0 -92
- telnyx/types/ai/assistants/version_update_response.py +0 -92
- telnyx/types/client_create_bucket_params.py +0 -13
- telnyx/types/client_delete_objects_params.py +0 -20
- telnyx/types/client_get_object_params.py +0 -15
- telnyx/types/client_list_objects_params.py +0 -13
- telnyx/types/client_put_object_params.py +0 -20
- telnyx/types/list_buckets_response.py +0 -20
- telnyx/types/list_objects_response.py +0 -24
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/WHEEL +0 -0
- {telnyx-3.5.0a0.dist-info → telnyx-3.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -12,6 +12,7 @@ from ...types import (
|
|
|
12
12
|
StreamBidirectionalMode,
|
|
13
13
|
StreamBidirectionalCodec,
|
|
14
14
|
StreamBidirectionalTargetLegs,
|
|
15
|
+
StreamBidirectionalSamplingRate,
|
|
15
16
|
)
|
|
16
17
|
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
17
18
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
@@ -90,6 +91,7 @@ from ...types.calls.action_stop_siprec_response import ActionStopSiprecResponse
|
|
|
90
91
|
from ...types.calls.interruption_settings_param import InterruptionSettingsParam
|
|
91
92
|
from ...types.calls.action_start_siprec_response import ActionStartSiprecResponse
|
|
92
93
|
from ...types.calls.action_stop_forking_response import ActionStopForkingResponse
|
|
94
|
+
from ...types.stream_bidirectional_sampling_rate import StreamBidirectionalSamplingRate
|
|
93
95
|
from ...types.calls.action_send_sip_info_response import ActionSendSipInfoResponse
|
|
94
96
|
from ...types.calls.action_start_forking_response import ActionStartForkingResponse
|
|
95
97
|
from ...types.calls.action_stop_playback_response import ActionStopPlaybackResponse
|
|
@@ -179,9 +181,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
179
181
|
You must issue this command before executing subsequent
|
|
180
182
|
commands on an incoming call.
|
|
181
183
|
|
|
182
|
-
**Expected Webhooks
|
|
183
|
-
[callback schema](https://developers.telnyx.com/api/call-control/answer-call#callbacks)
|
|
184
|
-
below):**
|
|
184
|
+
**Expected Webhooks:**
|
|
185
185
|
|
|
186
186
|
- `call.answered`
|
|
187
187
|
- `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
@@ -248,7 +248,6 @@ class ActionsResource(SyncAPIResource):
|
|
|
248
248
|
|
|
249
249
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
250
250
|
when transcoding is not possible, the codec from the call will be used.
|
|
251
|
-
Currently, transcoding is only supported between PCMU and PCMA codecs.
|
|
252
251
|
|
|
253
252
|
stream_track: Specifies which track should be streamed.
|
|
254
253
|
|
|
@@ -384,9 +383,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
384
383
|
"""
|
|
385
384
|
Bridge two call control calls.
|
|
386
385
|
|
|
387
|
-
**Expected Webhooks
|
|
388
|
-
[callback schema](https://developers.telnyx.com/api/call-control/bridge-call#callbacks)
|
|
389
|
-
below):**
|
|
386
|
+
**Expected Webhooks:**
|
|
390
387
|
|
|
391
388
|
- `call.bridged` for Leg A
|
|
392
389
|
- `call.bridged` for Leg B
|
|
@@ -587,9 +584,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
587
584
|
You can pass a list of valid digits. The `Answer` command must be issued before
|
|
588
585
|
the `gather` command.
|
|
589
586
|
|
|
590
|
-
**Expected Webhooks
|
|
591
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-call#callbacks)
|
|
592
|
-
below):**
|
|
587
|
+
**Expected Webhooks:**
|
|
593
588
|
|
|
594
589
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
595
590
|
- `call.gather.ended`
|
|
@@ -684,9 +679,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
684
679
|
You can pass parameters described as a JSON Schema object and the voice
|
|
685
680
|
assistant will attempt to gather these informations.
|
|
686
681
|
|
|
687
|
-
**Expected Webhooks
|
|
688
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-gather-using-ai#callbacks)
|
|
689
|
-
below):**
|
|
682
|
+
**Expected Webhooks:**
|
|
690
683
|
|
|
691
684
|
- `call.ai_gather.ended`
|
|
692
685
|
- `call.conversation.ended`
|
|
@@ -721,16 +714,13 @@ class ActionsResource(SyncAPIResource):
|
|
|
721
714
|
information to the voice assistant.
|
|
722
715
|
|
|
723
716
|
send_message_history_updates: Default is `false`. If set to `true`, the voice assistant will send updates to
|
|
724
|
-
the message history via the `call.ai_gather.message_history_updated`
|
|
725
|
-
|
|
726
|
-
in real time as the message history is updated.
|
|
717
|
+
the message history via the `call.ai_gather.message_history_updated` callback in
|
|
718
|
+
real time as the message history is updated.
|
|
727
719
|
|
|
728
720
|
send_partial_results: Default is `false`. If set to `true`, the voice assistant will send partial
|
|
729
|
-
results via the `call.ai_gather.partial_results`
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
assistant will only send the final result via the `call.ai_gather.ended`
|
|
733
|
-
callback.
|
|
721
|
+
results via the `call.ai_gather.partial_results` callback in real time as
|
|
722
|
+
individual fields are gathered. If set to `false`, the voice assistant will only
|
|
723
|
+
send the final result via the `call.ai_gather.ended` callback.
|
|
734
724
|
|
|
735
725
|
transcription: The settings associated with speech to text for the voice assistant. This is
|
|
736
726
|
only relevant if the assistant uses a text-to-text language model. Any assistant
|
|
@@ -835,9 +825,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
835
825
|
interrupted when a DTMF signal is received. The
|
|
836
826
|
`Answer command must be issued before the `gather_using_audio` command.
|
|
837
827
|
|
|
838
|
-
**Expected Webhooks
|
|
839
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-audio#callbacks)
|
|
840
|
-
below):**
|
|
828
|
+
**Expected Webhooks:**
|
|
841
829
|
|
|
842
830
|
- `call.playback.started`
|
|
843
831
|
- `call.playback.ended`
|
|
@@ -991,9 +979,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
991
979
|
a DTMF signal is received. The `Answer` command must be issued before the
|
|
992
980
|
`gather_using_speak` command.
|
|
993
981
|
|
|
994
|
-
**Expected Webhooks
|
|
995
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-speak#callbacks)
|
|
996
|
-
below):**
|
|
982
|
+
**Expected Webhooks:**
|
|
997
983
|
|
|
998
984
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
999
985
|
- `call.gather.ended`
|
|
@@ -1124,9 +1110,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1124
1110
|
"""
|
|
1125
1111
|
Hang up the call.
|
|
1126
1112
|
|
|
1127
|
-
**Expected Webhooks
|
|
1128
|
-
[callback schema](https://developers.telnyx.com/api/call-control/hangup-call#callbacks)
|
|
1129
|
-
below):**
|
|
1113
|
+
**Expected Webhooks:**
|
|
1130
1114
|
|
|
1131
1115
|
- `call.hangup`
|
|
1132
1116
|
- `call.recording.saved`
|
|
@@ -1291,9 +1275,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1291
1275
|
You can initiate a SIP Refer at any
|
|
1292
1276
|
point in the duration of a call.
|
|
1293
1277
|
|
|
1294
|
-
**Expected Webhooks
|
|
1295
|
-
[callback schema](https://developers.telnyx.com/api/call-control/refer-call#callbacks)
|
|
1296
|
-
below):**
|
|
1278
|
+
**Expected Webhooks:**
|
|
1297
1279
|
|
|
1298
1280
|
- `call.refer.started`
|
|
1299
1281
|
- `call.refer.completed`
|
|
@@ -1365,9 +1347,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1365
1347
|
"""
|
|
1366
1348
|
Reject an incoming call.
|
|
1367
1349
|
|
|
1368
|
-
**Expected Webhooks
|
|
1369
|
-
[callback schema](https://developers.telnyx.com/api/call-control/reject-call#callbacks)
|
|
1370
|
-
below):**
|
|
1350
|
+
**Expected Webhooks:**
|
|
1371
1351
|
|
|
1372
1352
|
- `call.hangup`
|
|
1373
1353
|
|
|
@@ -1644,9 +1624,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1644
1624
|
commands are issued consecutively, the audio files will be placed in a queue
|
|
1645
1625
|
awaiting playback.
|
|
1646
1626
|
|
|
1647
|
-
**Expected Webhooks
|
|
1648
|
-
[callback schema](https://developers.telnyx.com/api/call-control/speak-call#callbacks)
|
|
1649
|
-
below):**
|
|
1627
|
+
**Expected Webhooks:**
|
|
1650
1628
|
|
|
1651
1629
|
- `call.speak.started`
|
|
1652
1630
|
- `call.speak.ended`
|
|
@@ -1759,9 +1737,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1759
1737
|
"""
|
|
1760
1738
|
Start an AI assistant on the call.
|
|
1761
1739
|
|
|
1762
|
-
**Expected Webhooks
|
|
1763
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-start-ai-assistant#callbacks)
|
|
1764
|
-
below):**
|
|
1740
|
+
**Expected Webhooks:**
|
|
1765
1741
|
|
|
1766
1742
|
- `call.conversation.ended`
|
|
1767
1743
|
- `call.conversation_insights.generated`
|
|
@@ -1865,9 +1841,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1865
1841
|
audio responses. Requests must specify either the `target` attribute or the `rx`
|
|
1866
1842
|
and `tx` attributes.
|
|
1867
1843
|
|
|
1868
|
-
**Expected Webhooks
|
|
1869
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-fork#callbacks)
|
|
1870
|
-
below):**
|
|
1844
|
+
**Expected Webhooks:**
|
|
1871
1845
|
|
|
1872
1846
|
- `call.fork.started`
|
|
1873
1847
|
- `call.fork.stopped`
|
|
@@ -2007,9 +1981,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2007
1981
|
- A customer cannot Play Audio with `overlay=true` unless there is a Play Audio
|
|
2008
1982
|
with `overlay=false` actively playing.
|
|
2009
1983
|
|
|
2010
|
-
**Expected Webhooks
|
|
2011
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-playback#callbacks)
|
|
2012
|
-
below):**
|
|
1984
|
+
**Expected Webhooks:**
|
|
2013
1985
|
|
|
2014
1986
|
- `call.playback.started`
|
|
2015
1987
|
- `call.playback.ended`
|
|
@@ -2268,9 +2240,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2268
2240
|
Recording will stop on call hang-up, or can be
|
|
2269
2241
|
initiated via the Stop Recording command.
|
|
2270
2242
|
|
|
2271
|
-
**Expected Webhooks
|
|
2272
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-record#callbacks)
|
|
2273
|
-
below):**
|
|
2243
|
+
**Expected Webhooks:**
|
|
2274
2244
|
|
|
2275
2245
|
- `call.recording.saved`
|
|
2276
2246
|
- `call.recording.transcription.saved`
|
|
@@ -2453,6 +2423,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2453
2423
|
enable_dialogflow: bool | Omit = omit,
|
|
2454
2424
|
stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
|
|
2455
2425
|
stream_bidirectional_mode: StreamBidirectionalMode | Omit = omit,
|
|
2426
|
+
stream_bidirectional_sampling_rate: StreamBidirectionalSamplingRate | Omit = omit,
|
|
2456
2427
|
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs | Omit = omit,
|
|
2457
2428
|
stream_codec: StreamCodec | Omit = omit,
|
|
2458
2429
|
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
@@ -2486,11 +2457,12 @@ class ActionsResource(SyncAPIResource):
|
|
|
2486
2457
|
|
|
2487
2458
|
stream_bidirectional_mode: Configures method of bidirectional streaming (mp3, rtp).
|
|
2488
2459
|
|
|
2460
|
+
stream_bidirectional_sampling_rate: Audio sampling rate.
|
|
2461
|
+
|
|
2489
2462
|
stream_bidirectional_target_legs: Specifies which call legs should receive the bidirectional stream audio.
|
|
2490
2463
|
|
|
2491
2464
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
2492
2465
|
when transcoding is not possible, the codec from the call will be used.
|
|
2493
|
-
Currently, transcoding is only supported between PCMU and PCMA codecs.
|
|
2494
2466
|
|
|
2495
2467
|
stream_track: Specifies which track should be streamed.
|
|
2496
2468
|
|
|
@@ -2516,6 +2488,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2516
2488
|
"enable_dialogflow": enable_dialogflow,
|
|
2517
2489
|
"stream_bidirectional_codec": stream_bidirectional_codec,
|
|
2518
2490
|
"stream_bidirectional_mode": stream_bidirectional_mode,
|
|
2491
|
+
"stream_bidirectional_sampling_rate": stream_bidirectional_sampling_rate,
|
|
2519
2492
|
"stream_bidirectional_target_legs": stream_bidirectional_target_legs,
|
|
2520
2493
|
"stream_codec": stream_codec,
|
|
2521
2494
|
"stream_track": stream_track,
|
|
@@ -2535,7 +2508,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2535
2508
|
*,
|
|
2536
2509
|
client_state: str | Omit = omit,
|
|
2537
2510
|
command_id: str | Omit = omit,
|
|
2538
|
-
transcription_engine: Literal["A", "B"] | Omit = omit,
|
|
2511
|
+
transcription_engine: Literal["Google", "Telnyx", "Deepgram", "A", "B"] | Omit = omit,
|
|
2539
2512
|
transcription_engine_config: action_start_transcription_params.TranscriptionEngineConfig | Omit = omit,
|
|
2540
2513
|
transcription_tracks: str | Omit = omit,
|
|
2541
2514
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -2550,9 +2523,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2550
2523
|
Transcription will stop on call hang-up, or can
|
|
2551
2524
|
be initiated via the Transcription stop command.
|
|
2552
2525
|
|
|
2553
|
-
**Expected Webhooks
|
|
2554
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-transcription#callbacks)
|
|
2555
|
-
below):**
|
|
2526
|
+
**Expected Webhooks:**
|
|
2556
2527
|
|
|
2557
2528
|
- `call.transcription`
|
|
2558
2529
|
|
|
@@ -2563,7 +2534,8 @@ class ActionsResource(SyncAPIResource):
|
|
|
2563
2534
|
command_id: Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
2564
2535
|
the same `command_id` for the same `call_control_id`.
|
|
2565
2536
|
|
|
2566
|
-
transcription_engine: Engine to use for speech recognition. `A` - `Google`, `B` -
|
|
2537
|
+
transcription_engine: Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
2538
|
+
`Telnyx` are supported for backward compatibility.
|
|
2567
2539
|
|
|
2568
2540
|
transcription_tracks: Indicates which leg of the call will be transcribed. Use `inbound` for the leg
|
|
2569
2541
|
that requested the transcription, `outbound` for the other leg, and `both` for
|
|
@@ -2662,9 +2634,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2662
2634
|
"""
|
|
2663
2635
|
Stop forking a call.
|
|
2664
2636
|
|
|
2665
|
-
**Expected Webhooks
|
|
2666
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-fork#callbacks)
|
|
2667
|
-
below):**
|
|
2637
|
+
**Expected Webhooks:**
|
|
2668
2638
|
|
|
2669
2639
|
- `call.fork.stopped`
|
|
2670
2640
|
|
|
@@ -2720,9 +2690,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2720
2690
|
"""
|
|
2721
2691
|
Stop current gather.
|
|
2722
2692
|
|
|
2723
|
-
**Expected Webhooks
|
|
2724
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-gather#callbacks)
|
|
2725
|
-
below):**
|
|
2693
|
+
**Expected Webhooks:**
|
|
2726
2694
|
|
|
2727
2695
|
- `call.gather.ended`
|
|
2728
2696
|
|
|
@@ -2824,9 +2792,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2824
2792
|
"""
|
|
2825
2793
|
Stop audio being played on the call.
|
|
2826
2794
|
|
|
2827
|
-
**Expected Webhooks
|
|
2828
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-playback#callbacks)
|
|
2829
|
-
below):**
|
|
2795
|
+
**Expected Webhooks:**
|
|
2830
2796
|
|
|
2831
2797
|
- `call.playback.ended` or `call.speak.ended`
|
|
2832
2798
|
|
|
@@ -2886,9 +2852,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2886
2852
|
"""
|
|
2887
2853
|
Stop recording the call.
|
|
2888
2854
|
|
|
2889
|
-
**Expected Webhooks
|
|
2890
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-recording#callbacks)
|
|
2891
|
-
below):**
|
|
2855
|
+
**Expected Webhooks:**
|
|
2892
2856
|
|
|
2893
2857
|
- `call.recording.saved`
|
|
2894
2858
|
|
|
@@ -2996,9 +2960,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2996
2960
|
"""
|
|
2997
2961
|
Stop streaming a call to a WebSocket.
|
|
2998
2962
|
|
|
2999
|
-
**Expected Webhooks
|
|
3000
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-streaming#callbacks)
|
|
3001
|
-
below):**
|
|
2963
|
+
**Expected Webhooks:**
|
|
3002
2964
|
|
|
3003
2965
|
- `streaming.stopped`
|
|
3004
2966
|
|
|
@@ -3147,6 +3109,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
3147
3109
|
media_name: str | Omit = omit,
|
|
3148
3110
|
mute_dtmf: Literal["none", "both", "self", "opposite"] | Omit = omit,
|
|
3149
3111
|
park_after_unbridge: str | Omit = omit,
|
|
3112
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
3113
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
3114
|
+
record_custom_file_name: str | Omit = omit,
|
|
3115
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
3116
|
+
record_max_length: int | Omit = omit,
|
|
3117
|
+
record_timeout_secs: int | Omit = omit,
|
|
3118
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
3119
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
3150
3120
|
sip_auth_password: str | Omit = omit,
|
|
3151
3121
|
sip_auth_username: str | Omit = omit,
|
|
3152
3122
|
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
@@ -3172,9 +3142,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
3172
3142
|
may be issued additional commands, potentially transfering the call to an
|
|
3173
3143
|
alternate destination.
|
|
3174
3144
|
|
|
3175
|
-
**Expected Webhooks
|
|
3176
|
-
[callback schema](https://developers.telnyx.com/api/call-control/transfer-call#callbacks)
|
|
3177
|
-
below):**
|
|
3145
|
+
**Expected Webhooks:**
|
|
3178
3146
|
|
|
3179
3147
|
- `call.initiated`
|
|
3180
3148
|
- `call.bridged` to Leg B
|
|
@@ -3239,6 +3207,33 @@ class ActionsResource(SyncAPIResource):
|
|
|
3239
3207
|
or is transferred). If supplied with the value `self`, the current leg will be
|
|
3240
3208
|
parked after unbridge. If not set, the default behavior is to hang up the leg.
|
|
3241
3209
|
|
|
3210
|
+
record: Start recording automatically after an event. Disabled by default.
|
|
3211
|
+
|
|
3212
|
+
record_channels: Defines which channel should be recorded ('single' or 'dual') when `record` is
|
|
3213
|
+
specified.
|
|
3214
|
+
|
|
3215
|
+
record_custom_file_name: The custom recording file name to be used instead of the default `call_leg_id`.
|
|
3216
|
+
Telnyx will still add a Unix timestamp suffix.
|
|
3217
|
+
|
|
3218
|
+
record_format: Defines the format of the recording ('wav' or 'mp3') when `record` is specified.
|
|
3219
|
+
|
|
3220
|
+
record_max_length: Defines the maximum length for the recording in seconds when `record` is
|
|
3221
|
+
specified. The minimum value is 0. The maximum value is 43200. The default value
|
|
3222
|
+
is 0 (infinite).
|
|
3223
|
+
|
|
3224
|
+
record_timeout_secs: The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
3225
|
+
silence is detected when `record` is specified. The timer only starts when the
|
|
3226
|
+
speech is detected. Please note that call transcription is used to detect
|
|
3227
|
+
silence and the related charge will be applied. The minimum value is 0. The
|
|
3228
|
+
default value is 0 (infinite).
|
|
3229
|
+
|
|
3230
|
+
record_track: The audio track to be recorded. Can be either `both`, `inbound` or `outbound`.
|
|
3231
|
+
If only single track is specified (`inbound`, `outbound`), `channels`
|
|
3232
|
+
configuration is ignored and it will be recorded as mono (single channel).
|
|
3233
|
+
|
|
3234
|
+
record_trim: When set to `trim-silence`, silence will be removed from the beginning and end
|
|
3235
|
+
of the recording.
|
|
3236
|
+
|
|
3242
3237
|
sip_auth_password: SIP Authentication password used for SIP challenges.
|
|
3243
3238
|
|
|
3244
3239
|
sip_auth_username: SIP Authentication username used for SIP challenges.
|
|
@@ -3299,6 +3294,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
3299
3294
|
"media_name": media_name,
|
|
3300
3295
|
"mute_dtmf": mute_dtmf,
|
|
3301
3296
|
"park_after_unbridge": park_after_unbridge,
|
|
3297
|
+
"record": record,
|
|
3298
|
+
"record_channels": record_channels,
|
|
3299
|
+
"record_custom_file_name": record_custom_file_name,
|
|
3300
|
+
"record_format": record_format,
|
|
3301
|
+
"record_max_length": record_max_length,
|
|
3302
|
+
"record_timeout_secs": record_timeout_secs,
|
|
3303
|
+
"record_track": record_track,
|
|
3304
|
+
"record_trim": record_trim,
|
|
3302
3305
|
"sip_auth_password": sip_auth_password,
|
|
3303
3306
|
"sip_auth_username": sip_auth_username,
|
|
3304
3307
|
"sip_headers": sip_headers,
|
|
@@ -3421,9 +3424,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3421
3424
|
You must issue this command before executing subsequent
|
|
3422
3425
|
commands on an incoming call.
|
|
3423
3426
|
|
|
3424
|
-
**Expected Webhooks
|
|
3425
|
-
[callback schema](https://developers.telnyx.com/api/call-control/answer-call#callbacks)
|
|
3426
|
-
below):**
|
|
3427
|
+
**Expected Webhooks:**
|
|
3427
3428
|
|
|
3428
3429
|
- `call.answered`
|
|
3429
3430
|
- `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
@@ -3490,7 +3491,6 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3490
3491
|
|
|
3491
3492
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
3492
3493
|
when transcoding is not possible, the codec from the call will be used.
|
|
3493
|
-
Currently, transcoding is only supported between PCMU and PCMA codecs.
|
|
3494
3494
|
|
|
3495
3495
|
stream_track: Specifies which track should be streamed.
|
|
3496
3496
|
|
|
@@ -3626,9 +3626,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3626
3626
|
"""
|
|
3627
3627
|
Bridge two call control calls.
|
|
3628
3628
|
|
|
3629
|
-
**Expected Webhooks
|
|
3630
|
-
[callback schema](https://developers.telnyx.com/api/call-control/bridge-call#callbacks)
|
|
3631
|
-
below):**
|
|
3629
|
+
**Expected Webhooks:**
|
|
3632
3630
|
|
|
3633
3631
|
- `call.bridged` for Leg A
|
|
3634
3632
|
- `call.bridged` for Leg B
|
|
@@ -3829,9 +3827,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3829
3827
|
You can pass a list of valid digits. The `Answer` command must be issued before
|
|
3830
3828
|
the `gather` command.
|
|
3831
3829
|
|
|
3832
|
-
**Expected Webhooks
|
|
3833
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-call#callbacks)
|
|
3834
|
-
below):**
|
|
3830
|
+
**Expected Webhooks:**
|
|
3835
3831
|
|
|
3836
3832
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
3837
3833
|
- `call.gather.ended`
|
|
@@ -3926,9 +3922,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3926
3922
|
You can pass parameters described as a JSON Schema object and the voice
|
|
3927
3923
|
assistant will attempt to gather these informations.
|
|
3928
3924
|
|
|
3929
|
-
**Expected Webhooks
|
|
3930
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-gather-using-ai#callbacks)
|
|
3931
|
-
below):**
|
|
3925
|
+
**Expected Webhooks:**
|
|
3932
3926
|
|
|
3933
3927
|
- `call.ai_gather.ended`
|
|
3934
3928
|
- `call.conversation.ended`
|
|
@@ -3963,16 +3957,13 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3963
3957
|
information to the voice assistant.
|
|
3964
3958
|
|
|
3965
3959
|
send_message_history_updates: Default is `false`. If set to `true`, the voice assistant will send updates to
|
|
3966
|
-
the message history via the `call.ai_gather.message_history_updated`
|
|
3967
|
-
|
|
3968
|
-
in real time as the message history is updated.
|
|
3960
|
+
the message history via the `call.ai_gather.message_history_updated` callback in
|
|
3961
|
+
real time as the message history is updated.
|
|
3969
3962
|
|
|
3970
3963
|
send_partial_results: Default is `false`. If set to `true`, the voice assistant will send partial
|
|
3971
|
-
results via the `call.ai_gather.partial_results`
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
assistant will only send the final result via the `call.ai_gather.ended`
|
|
3975
|
-
callback.
|
|
3964
|
+
results via the `call.ai_gather.partial_results` callback in real time as
|
|
3965
|
+
individual fields are gathered. If set to `false`, the voice assistant will only
|
|
3966
|
+
send the final result via the `call.ai_gather.ended` callback.
|
|
3976
3967
|
|
|
3977
3968
|
transcription: The settings associated with speech to text for the voice assistant. This is
|
|
3978
3969
|
only relevant if the assistant uses a text-to-text language model. Any assistant
|
|
@@ -4077,9 +4068,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4077
4068
|
interrupted when a DTMF signal is received. The
|
|
4078
4069
|
`Answer command must be issued before the `gather_using_audio` command.
|
|
4079
4070
|
|
|
4080
|
-
**Expected Webhooks
|
|
4081
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-audio#callbacks)
|
|
4082
|
-
below):**
|
|
4071
|
+
**Expected Webhooks:**
|
|
4083
4072
|
|
|
4084
4073
|
- `call.playback.started`
|
|
4085
4074
|
- `call.playback.ended`
|
|
@@ -4233,9 +4222,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4233
4222
|
a DTMF signal is received. The `Answer` command must be issued before the
|
|
4234
4223
|
`gather_using_speak` command.
|
|
4235
4224
|
|
|
4236
|
-
**Expected Webhooks
|
|
4237
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-speak#callbacks)
|
|
4238
|
-
below):**
|
|
4225
|
+
**Expected Webhooks:**
|
|
4239
4226
|
|
|
4240
4227
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
4241
4228
|
- `call.gather.ended`
|
|
@@ -4366,9 +4353,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4366
4353
|
"""
|
|
4367
4354
|
Hang up the call.
|
|
4368
4355
|
|
|
4369
|
-
**Expected Webhooks
|
|
4370
|
-
[callback schema](https://developers.telnyx.com/api/call-control/hangup-call#callbacks)
|
|
4371
|
-
below):**
|
|
4356
|
+
**Expected Webhooks:**
|
|
4372
4357
|
|
|
4373
4358
|
- `call.hangup`
|
|
4374
4359
|
- `call.recording.saved`
|
|
@@ -4533,9 +4518,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4533
4518
|
You can initiate a SIP Refer at any
|
|
4534
4519
|
point in the duration of a call.
|
|
4535
4520
|
|
|
4536
|
-
**Expected Webhooks
|
|
4537
|
-
[callback schema](https://developers.telnyx.com/api/call-control/refer-call#callbacks)
|
|
4538
|
-
below):**
|
|
4521
|
+
**Expected Webhooks:**
|
|
4539
4522
|
|
|
4540
4523
|
- `call.refer.started`
|
|
4541
4524
|
- `call.refer.completed`
|
|
@@ -4607,9 +4590,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4607
4590
|
"""
|
|
4608
4591
|
Reject an incoming call.
|
|
4609
4592
|
|
|
4610
|
-
**Expected Webhooks
|
|
4611
|
-
[callback schema](https://developers.telnyx.com/api/call-control/reject-call#callbacks)
|
|
4612
|
-
below):**
|
|
4593
|
+
**Expected Webhooks:**
|
|
4613
4594
|
|
|
4614
4595
|
- `call.hangup`
|
|
4615
4596
|
|
|
@@ -4886,9 +4867,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4886
4867
|
commands are issued consecutively, the audio files will be placed in a queue
|
|
4887
4868
|
awaiting playback.
|
|
4888
4869
|
|
|
4889
|
-
**Expected Webhooks
|
|
4890
|
-
[callback schema](https://developers.telnyx.com/api/call-control/speak-call#callbacks)
|
|
4891
|
-
below):**
|
|
4870
|
+
**Expected Webhooks:**
|
|
4892
4871
|
|
|
4893
4872
|
- `call.speak.started`
|
|
4894
4873
|
- `call.speak.ended`
|
|
@@ -5001,9 +4980,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5001
4980
|
"""
|
|
5002
4981
|
Start an AI assistant on the call.
|
|
5003
4982
|
|
|
5004
|
-
**Expected Webhooks
|
|
5005
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-start-ai-assistant#callbacks)
|
|
5006
|
-
below):**
|
|
4983
|
+
**Expected Webhooks:**
|
|
5007
4984
|
|
|
5008
4985
|
- `call.conversation.ended`
|
|
5009
4986
|
- `call.conversation_insights.generated`
|
|
@@ -5107,9 +5084,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5107
5084
|
audio responses. Requests must specify either the `target` attribute or the `rx`
|
|
5108
5085
|
and `tx` attributes.
|
|
5109
5086
|
|
|
5110
|
-
**Expected Webhooks
|
|
5111
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-fork#callbacks)
|
|
5112
|
-
below):**
|
|
5087
|
+
**Expected Webhooks:**
|
|
5113
5088
|
|
|
5114
5089
|
- `call.fork.started`
|
|
5115
5090
|
- `call.fork.stopped`
|
|
@@ -5249,9 +5224,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5249
5224
|
- A customer cannot Play Audio with `overlay=true` unless there is a Play Audio
|
|
5250
5225
|
with `overlay=false` actively playing.
|
|
5251
5226
|
|
|
5252
|
-
**Expected Webhooks
|
|
5253
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-playback#callbacks)
|
|
5254
|
-
below):**
|
|
5227
|
+
**Expected Webhooks:**
|
|
5255
5228
|
|
|
5256
5229
|
- `call.playback.started`
|
|
5257
5230
|
- `call.playback.ended`
|
|
@@ -5510,9 +5483,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5510
5483
|
Recording will stop on call hang-up, or can be
|
|
5511
5484
|
initiated via the Stop Recording command.
|
|
5512
5485
|
|
|
5513
|
-
**Expected Webhooks
|
|
5514
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-record#callbacks)
|
|
5515
|
-
below):**
|
|
5486
|
+
**Expected Webhooks:**
|
|
5516
5487
|
|
|
5517
5488
|
- `call.recording.saved`
|
|
5518
5489
|
- `call.recording.transcription.saved`
|
|
@@ -5695,6 +5666,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5695
5666
|
enable_dialogflow: bool | Omit = omit,
|
|
5696
5667
|
stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
|
|
5697
5668
|
stream_bidirectional_mode: StreamBidirectionalMode | Omit = omit,
|
|
5669
|
+
stream_bidirectional_sampling_rate: StreamBidirectionalSamplingRate | Omit = omit,
|
|
5698
5670
|
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs | Omit = omit,
|
|
5699
5671
|
stream_codec: StreamCodec | Omit = omit,
|
|
5700
5672
|
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
@@ -5728,11 +5700,12 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5728
5700
|
|
|
5729
5701
|
stream_bidirectional_mode: Configures method of bidirectional streaming (mp3, rtp).
|
|
5730
5702
|
|
|
5703
|
+
stream_bidirectional_sampling_rate: Audio sampling rate.
|
|
5704
|
+
|
|
5731
5705
|
stream_bidirectional_target_legs: Specifies which call legs should receive the bidirectional stream audio.
|
|
5732
5706
|
|
|
5733
5707
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
5734
5708
|
when transcoding is not possible, the codec from the call will be used.
|
|
5735
|
-
Currently, transcoding is only supported between PCMU and PCMA codecs.
|
|
5736
5709
|
|
|
5737
5710
|
stream_track: Specifies which track should be streamed.
|
|
5738
5711
|
|
|
@@ -5758,6 +5731,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5758
5731
|
"enable_dialogflow": enable_dialogflow,
|
|
5759
5732
|
"stream_bidirectional_codec": stream_bidirectional_codec,
|
|
5760
5733
|
"stream_bidirectional_mode": stream_bidirectional_mode,
|
|
5734
|
+
"stream_bidirectional_sampling_rate": stream_bidirectional_sampling_rate,
|
|
5761
5735
|
"stream_bidirectional_target_legs": stream_bidirectional_target_legs,
|
|
5762
5736
|
"stream_codec": stream_codec,
|
|
5763
5737
|
"stream_track": stream_track,
|
|
@@ -5777,7 +5751,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5777
5751
|
*,
|
|
5778
5752
|
client_state: str | Omit = omit,
|
|
5779
5753
|
command_id: str | Omit = omit,
|
|
5780
|
-
transcription_engine: Literal["A", "B"] | Omit = omit,
|
|
5754
|
+
transcription_engine: Literal["Google", "Telnyx", "Deepgram", "A", "B"] | Omit = omit,
|
|
5781
5755
|
transcription_engine_config: action_start_transcription_params.TranscriptionEngineConfig | Omit = omit,
|
|
5782
5756
|
transcription_tracks: str | Omit = omit,
|
|
5783
5757
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -5792,9 +5766,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5792
5766
|
Transcription will stop on call hang-up, or can
|
|
5793
5767
|
be initiated via the Transcription stop command.
|
|
5794
5768
|
|
|
5795
|
-
**Expected Webhooks
|
|
5796
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-transcription#callbacks)
|
|
5797
|
-
below):**
|
|
5769
|
+
**Expected Webhooks:**
|
|
5798
5770
|
|
|
5799
5771
|
- `call.transcription`
|
|
5800
5772
|
|
|
@@ -5805,7 +5777,8 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5805
5777
|
command_id: Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
5806
5778
|
the same `command_id` for the same `call_control_id`.
|
|
5807
5779
|
|
|
5808
|
-
transcription_engine: Engine to use for speech recognition. `A` - `Google`, `B` -
|
|
5780
|
+
transcription_engine: Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
5781
|
+
`Telnyx` are supported for backward compatibility.
|
|
5809
5782
|
|
|
5810
5783
|
transcription_tracks: Indicates which leg of the call will be transcribed. Use `inbound` for the leg
|
|
5811
5784
|
that requested the transcription, `outbound` for the other leg, and `both` for
|
|
@@ -5904,9 +5877,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5904
5877
|
"""
|
|
5905
5878
|
Stop forking a call.
|
|
5906
5879
|
|
|
5907
|
-
**Expected Webhooks
|
|
5908
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-fork#callbacks)
|
|
5909
|
-
below):**
|
|
5880
|
+
**Expected Webhooks:**
|
|
5910
5881
|
|
|
5911
5882
|
- `call.fork.stopped`
|
|
5912
5883
|
|
|
@@ -5962,9 +5933,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5962
5933
|
"""
|
|
5963
5934
|
Stop current gather.
|
|
5964
5935
|
|
|
5965
|
-
**Expected Webhooks
|
|
5966
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-gather#callbacks)
|
|
5967
|
-
below):**
|
|
5936
|
+
**Expected Webhooks:**
|
|
5968
5937
|
|
|
5969
5938
|
- `call.gather.ended`
|
|
5970
5939
|
|
|
@@ -6066,9 +6035,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6066
6035
|
"""
|
|
6067
6036
|
Stop audio being played on the call.
|
|
6068
6037
|
|
|
6069
|
-
**Expected Webhooks
|
|
6070
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-playback#callbacks)
|
|
6071
|
-
below):**
|
|
6038
|
+
**Expected Webhooks:**
|
|
6072
6039
|
|
|
6073
6040
|
- `call.playback.ended` or `call.speak.ended`
|
|
6074
6041
|
|
|
@@ -6128,9 +6095,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6128
6095
|
"""
|
|
6129
6096
|
Stop recording the call.
|
|
6130
6097
|
|
|
6131
|
-
**Expected Webhooks
|
|
6132
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-recording#callbacks)
|
|
6133
|
-
below):**
|
|
6098
|
+
**Expected Webhooks:**
|
|
6134
6099
|
|
|
6135
6100
|
- `call.recording.saved`
|
|
6136
6101
|
|
|
@@ -6238,9 +6203,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6238
6203
|
"""
|
|
6239
6204
|
Stop streaming a call to a WebSocket.
|
|
6240
6205
|
|
|
6241
|
-
**Expected Webhooks
|
|
6242
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-streaming#callbacks)
|
|
6243
|
-
below):**
|
|
6206
|
+
**Expected Webhooks:**
|
|
6244
6207
|
|
|
6245
6208
|
- `streaming.stopped`
|
|
6246
6209
|
|
|
@@ -6391,6 +6354,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6391
6354
|
media_name: str | Omit = omit,
|
|
6392
6355
|
mute_dtmf: Literal["none", "both", "self", "opposite"] | Omit = omit,
|
|
6393
6356
|
park_after_unbridge: str | Omit = omit,
|
|
6357
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
6358
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
6359
|
+
record_custom_file_name: str | Omit = omit,
|
|
6360
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
6361
|
+
record_max_length: int | Omit = omit,
|
|
6362
|
+
record_timeout_secs: int | Omit = omit,
|
|
6363
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
6364
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
6394
6365
|
sip_auth_password: str | Omit = omit,
|
|
6395
6366
|
sip_auth_username: str | Omit = omit,
|
|
6396
6367
|
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
@@ -6416,9 +6387,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6416
6387
|
may be issued additional commands, potentially transfering the call to an
|
|
6417
6388
|
alternate destination.
|
|
6418
6389
|
|
|
6419
|
-
**Expected Webhooks
|
|
6420
|
-
[callback schema](https://developers.telnyx.com/api/call-control/transfer-call#callbacks)
|
|
6421
|
-
below):**
|
|
6390
|
+
**Expected Webhooks:**
|
|
6422
6391
|
|
|
6423
6392
|
- `call.initiated`
|
|
6424
6393
|
- `call.bridged` to Leg B
|
|
@@ -6483,6 +6452,33 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6483
6452
|
or is transferred). If supplied with the value `self`, the current leg will be
|
|
6484
6453
|
parked after unbridge. If not set, the default behavior is to hang up the leg.
|
|
6485
6454
|
|
|
6455
|
+
record: Start recording automatically after an event. Disabled by default.
|
|
6456
|
+
|
|
6457
|
+
record_channels: Defines which channel should be recorded ('single' or 'dual') when `record` is
|
|
6458
|
+
specified.
|
|
6459
|
+
|
|
6460
|
+
record_custom_file_name: The custom recording file name to be used instead of the default `call_leg_id`.
|
|
6461
|
+
Telnyx will still add a Unix timestamp suffix.
|
|
6462
|
+
|
|
6463
|
+
record_format: Defines the format of the recording ('wav' or 'mp3') when `record` is specified.
|
|
6464
|
+
|
|
6465
|
+
record_max_length: Defines the maximum length for the recording in seconds when `record` is
|
|
6466
|
+
specified. The minimum value is 0. The maximum value is 43200. The default value
|
|
6467
|
+
is 0 (infinite).
|
|
6468
|
+
|
|
6469
|
+
record_timeout_secs: The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
6470
|
+
silence is detected when `record` is specified. The timer only starts when the
|
|
6471
|
+
speech is detected. Please note that call transcription is used to detect
|
|
6472
|
+
silence and the related charge will be applied. The minimum value is 0. The
|
|
6473
|
+
default value is 0 (infinite).
|
|
6474
|
+
|
|
6475
|
+
record_track: The audio track to be recorded. Can be either `both`, `inbound` or `outbound`.
|
|
6476
|
+
If only single track is specified (`inbound`, `outbound`), `channels`
|
|
6477
|
+
configuration is ignored and it will be recorded as mono (single channel).
|
|
6478
|
+
|
|
6479
|
+
record_trim: When set to `trim-silence`, silence will be removed from the beginning and end
|
|
6480
|
+
of the recording.
|
|
6481
|
+
|
|
6486
6482
|
sip_auth_password: SIP Authentication password used for SIP challenges.
|
|
6487
6483
|
|
|
6488
6484
|
sip_auth_username: SIP Authentication username used for SIP challenges.
|
|
@@ -6543,6 +6539,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6543
6539
|
"media_name": media_name,
|
|
6544
6540
|
"mute_dtmf": mute_dtmf,
|
|
6545
6541
|
"park_after_unbridge": park_after_unbridge,
|
|
6542
|
+
"record": record,
|
|
6543
|
+
"record_channels": record_channels,
|
|
6544
|
+
"record_custom_file_name": record_custom_file_name,
|
|
6545
|
+
"record_format": record_format,
|
|
6546
|
+
"record_max_length": record_max_length,
|
|
6547
|
+
"record_timeout_secs": record_timeout_secs,
|
|
6548
|
+
"record_track": record_track,
|
|
6549
|
+
"record_trim": record_trim,
|
|
6546
6550
|
"sip_auth_password": sip_auth_password,
|
|
6547
6551
|
"sip_auth_username": sip_auth_username,
|
|
6548
6552
|
"sip_headers": sip_headers,
|