telnyx 3.3.0a0__py3-none-any.whl → 3.4.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/__init__.py +3 -1
- telnyx/_base_client.py +12 -12
- telnyx/_client.py +63 -762
- telnyx/_compat.py +48 -48
- telnyx/_models.py +50 -44
- telnyx/_qs.py +7 -7
- telnyx/_types.py +53 -12
- telnyx/_utils/__init__.py +9 -2
- telnyx/_utils/_compat.py +45 -0
- telnyx/_utils/_datetime_parse.py +136 -0
- telnyx/_utils/_transform.py +13 -3
- telnyx/_utils/_typing.py +6 -1
- telnyx/_utils/_utils.py +4 -5
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +70 -0
- telnyx/resources/access_ip_address.py +15 -15
- telnyx/resources/access_ip_ranges.py +13 -13
- telnyx/resources/actions/purchase.py +13 -14
- telnyx/resources/actions/register.py +11 -12
- telnyx/resources/addresses/actions.py +13 -13
- telnyx/resources/addresses/addresses.py +33 -35
- telnyx/resources/advanced_orders.py +102 -106
- telnyx/resources/ai/ai.py +7 -7
- telnyx/resources/ai/assistants/assistants.py +89 -89
- telnyx/resources/ai/assistants/canary_deploys.py +9 -9
- telnyx/resources/ai/assistants/scheduled_events.py +21 -21
- telnyx/resources/ai/assistants/tests/runs.py +13 -13
- telnyx/resources/ai/assistants/tests/test_suites/runs.py +13 -13
- telnyx/resources/ai/assistants/tests/test_suites/test_suites.py +3 -3
- telnyx/resources/ai/assistants/tests/tests.py +43 -43
- telnyx/resources/ai/assistants/tools.py +7 -7
- telnyx/resources/ai/assistants/versions.py +45 -45
- telnyx/resources/ai/audio.py +11 -11
- telnyx/resources/ai/chat.py +48 -48
- telnyx/resources/ai/clusters.py +27 -29
- telnyx/resources/ai/conversations/conversations.py +179 -45
- telnyx/resources/ai/conversations/insight_groups/insight_groups.py +23 -23
- telnyx/resources/ai/conversations/insight_groups/insights.py +5 -5
- telnyx/resources/ai/conversations/insights.py +25 -25
- telnyx/resources/ai/conversations/messages.py +3 -136
- telnyx/resources/ai/embeddings/buckets.py +7 -7
- telnyx/resources/ai/embeddings/embeddings.py +23 -24
- telnyx/resources/ai/fine_tuning/jobs.py +13 -13
- telnyx/resources/audit_events.py +9 -9
- telnyx/resources/authentication_providers.py +29 -29
- telnyx/resources/available_phone_number_blocks.py +5 -5
- telnyx/resources/available_phone_numbers.py +5 -5
- telnyx/resources/balance.py +3 -3
- telnyx/resources/billing_groups.py +17 -17
- telnyx/resources/brand/brand.py +121 -117
- telnyx/resources/brand/external_vetting.py +9 -9
- telnyx/resources/bulk_sim_card_actions.py +11 -11
- telnyx/resources/bundle_pricing/billing_bundles.py +13 -13
- telnyx/resources/bundle_pricing/user_bundles.py +35 -35
- telnyx/resources/call_control_applications.py +64 -68
- telnyx/resources/call_events.py +7 -7
- telnyx/resources/calls/actions.py +699 -699
- telnyx/resources/calls/calls.py +116 -110
- telnyx/resources/campaign/campaign.py +47 -47
- telnyx/resources/campaign/osr.py +3 -3
- telnyx/resources/campaign/usecase.py +3 -3
- telnyx/resources/campaign_builder/brand.py +3 -3
- telnyx/resources/campaign_builder/campaign_builder.py +68 -68
- telnyx/resources/channel_zones.py +7 -7
- telnyx/resources/charges_breakdown.py +7 -7
- telnyx/resources/charges_summary.py +3 -3
- telnyx/resources/comments.py +17 -17
- telnyx/resources/conferences/actions.py +123 -140
- telnyx/resources/conferences/conferences.py +37 -41
- telnyx/resources/connections.py +15 -15
- telnyx/resources/country_coverage.py +5 -5
- telnyx/resources/credential_connections/actions.py +3 -3
- telnyx/resources/credential_connections/credential_connections.py +96 -96
- telnyx/resources/custom_storage_credentials.py +9 -9
- telnyx/resources/customer_service_records.py +21 -23
- telnyx/resources/detail_records.py +9 -11
- telnyx/resources/dialogflow_connections.py +25 -25
- telnyx/resources/document_links.py +7 -7
- telnyx/resources/documents.py +45 -45
- telnyx/resources/dynamic_emergency_addresses.py +23 -23
- telnyx/resources/dynamic_emergency_endpoints.py +13 -13
- telnyx/resources/enum.py +3 -3
- telnyx/resources/external_connections/civic_addresses.py +7 -7
- telnyx/resources/external_connections/external_connections.py +42 -42
- telnyx/resources/external_connections/log_messages.py +11 -11
- telnyx/resources/external_connections/phone_numbers.py +13 -13
- telnyx/resources/external_connections/releases.py +9 -9
- telnyx/resources/external_connections/uploads.py +27 -29
- telnyx/resources/fax_applications.py +48 -48
- telnyx/resources/faxes/actions.py +5 -5
- telnyx/resources/faxes/faxes.py +35 -35
- telnyx/resources/fqdn_connections.py +94 -94
- telnyx/resources/fqdns.py +25 -25
- telnyx/resources/global_ip_allowed_ports.py +3 -3
- telnyx/resources/global_ip_assignment_health.py +5 -5
- telnyx/resources/global_ip_assignments.py +19 -19
- telnyx/resources/global_ip_assignments_usage.py +5 -5
- telnyx/resources/global_ip_health_check_types.py +3 -3
- telnyx/resources/global_ip_health_checks.py +17 -17
- telnyx/resources/global_ip_latency.py +5 -5
- telnyx/resources/global_ip_protocols.py +3 -3
- telnyx/resources/global_ip_usage.py +5 -5
- telnyx/resources/global_ips.py +17 -17
- telnyx/resources/inbound_channels.py +5 -5
- telnyx/resources/integration_secrets.py +17 -17
- telnyx/resources/inventory_coverage.py +5 -5
- telnyx/resources/invoices.py +11 -11
- telnyx/resources/ip_connections.py +94 -94
- telnyx/resources/ips.py +23 -23
- telnyx/resources/ledger_billing_group_reports.py +9 -9
- 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/list.py +5 -5
- telnyx/resources/managed_accounts/actions.py +7 -7
- telnyx/resources/managed_accounts/managed_accounts.py +33 -33
- telnyx/resources/media.py +23 -23
- telnyx/resources/messages/messages.py +124 -124
- telnyx/resources/messages/rcs.py +7 -7
- telnyx/resources/messaging/rcs/agents.py +15 -15
- telnyx/resources/messaging/rcs/rcs.py +9 -11
- telnyx/resources/messaging_hosted_number_orders/actions.py +7 -7
- telnyx/resources/messaging_hosted_number_orders/messaging_hosted_number_orders.py +26 -26
- telnyx/resources/messaging_hosted_numbers.py +3 -3
- telnyx/resources/messaging_numbers_bulk_updates.py +7 -9
- telnyx/resources/messaging_optouts.py +11 -11
- telnyx/resources/messaging_profiles/autoresp_configs.py +25 -26
- telnyx/resources/messaging_profiles/messaging_profiles.py +92 -76
- telnyx/resources/messaging_tollfree/verification/requests.py +27 -27
- telnyx/resources/messaging_url_domains.py +5 -5
- telnyx/resources/messsages.py +11 -11
- telnyx/resources/mobile_network_operators.py +7 -7
- telnyx/resources/mobile_push_credentials.py +23 -23
- telnyx/resources/network_coverage.py +9 -9
- telnyx/resources/networks/default_gateway.py +9 -9
- telnyx/resources/networks/networks.py +21 -21
- telnyx/resources/notification_channels.py +27 -27
- telnyx/resources/notification_event_conditions.py +7 -7
- telnyx/resources/notification_events.py +5 -5
- telnyx/resources/notification_profiles.py +17 -17
- telnyx/resources/notification_settings.py +21 -21
- telnyx/resources/number_block_orders.py +17 -17
- telnyx/resources/number_lookup.py +5 -5
- telnyx/resources/number_order_phone_numbers.py +13 -13
- telnyx/resources/number_orders.py +27 -27
- telnyx/resources/number_reservations/actions.py +3 -3
- telnyx/resources/number_reservations/number_reservations.py +15 -15
- telnyx/resources/numbers_features.py +5 -7
- telnyx/resources/oauth.py +855 -0
- telnyx/resources/oauth_clients.py +711 -0
- telnyx/resources/oauth_grants.py +349 -0
- telnyx/resources/operator_connect/actions.py +3 -3
- telnyx/resources/ota_updates.py +9 -9
- telnyx/resources/outbound_voice_profiles.py +66 -66
- telnyx/resources/partner_campaigns.py +25 -25
- telnyx/resources/payment/auto_recharge_prefs.py +15 -15
- telnyx/resources/phone_number_assignment_by_profile.py +15 -15
- telnyx/resources/phone_number_blocks/jobs.py +13 -13
- telnyx/resources/phone_number_campaigns.py +19 -19
- telnyx/resources/phone_numbers/actions.py +9 -11
- telnyx/resources/phone_numbers/csv_downloads.py +13 -13
- telnyx/resources/phone_numbers/jobs.py +54 -42
- telnyx/resources/phone_numbers/messaging.py +13 -13
- telnyx/resources/phone_numbers/phone_numbers.py +39 -40
- telnyx/resources/phone_numbers/voice.py +31 -31
- telnyx/resources/phone_numbers/voicemail.py +15 -15
- telnyx/resources/phone_numbers_regulatory_requirements.py +5 -5
- telnyx/resources/portability_checks.py +5 -7
- telnyx/resources/porting/events.py +11 -11
- telnyx/resources/porting/loa_configurations.py +17 -17
- telnyx/resources/porting/porting.py +3 -3
- telnyx/resources/porting/reports.py +11 -11
- telnyx/resources/porting_orders/action_requirements.py +11 -11
- telnyx/resources/porting_orders/actions.py +13 -13
- telnyx/resources/porting_orders/activation_jobs.py +11 -11
- telnyx/resources/porting_orders/additional_documents.py +15 -15
- telnyx/resources/porting_orders/associated_phone_numbers.py +13 -13
- telnyx/resources/porting_orders/comments.py +9 -9
- telnyx/resources/porting_orders/phone_number_blocks.py +13 -13
- telnyx/resources/porting_orders/phone_number_configurations.py +13 -13
- telnyx/resources/porting_orders/phone_number_extensions.py +13 -13
- telnyx/resources/porting_orders/porting_orders.py +82 -70
- telnyx/resources/porting_orders/verification_codes.py +20 -20
- telnyx/resources/porting_phone_numbers.py +7 -7
- telnyx/resources/portouts/comments.py +7 -7
- telnyx/resources/portouts/events.py +11 -11
- telnyx/resources/portouts/portouts.py +17 -17
- telnyx/resources/portouts/reports.py +11 -11
- telnyx/resources/portouts/supporting_documents.py +7 -7
- telnyx/resources/private_wireless_gateways.py +25 -25
- telnyx/resources/public_internet_gateways.py +19 -19
- telnyx/resources/queues/calls.py +7 -7
- telnyx/resources/queues/queues.py +3 -3
- telnyx/resources/recording_transcriptions.py +7 -7
- telnyx/resources/recordings/actions.py +5 -7
- telnyx/resources/recordings/recordings.py +11 -11
- telnyx/resources/regions.py +3 -3
- telnyx/resources/regulatory_requirements.py +5 -5
- telnyx/resources/reports/cdr_usage_reports.py +9 -9
- telnyx/resources/reports/mdr_usage_reports.py +22 -22
- telnyx/resources/reports/reports.py +47 -48
- telnyx/resources/requirement_groups.py +23 -23
- telnyx/resources/requirement_types.py +9 -11
- telnyx/resources/requirements.py +11 -11
- telnyx/resources/room_compositions.py +27 -27
- telnyx/resources/room_participants.py +9 -9
- telnyx/resources/room_recordings.py +17 -17
- telnyx/resources/rooms/actions.py +11 -11
- telnyx/resources/rooms/rooms.py +43 -43
- telnyx/resources/rooms/sessions/actions.py +22 -22
- telnyx/resources/rooms/sessions/sessions.py +27 -27
- telnyx/resources/seti.py +5 -5
- telnyx/resources/short_codes.py +11 -11
- telnyx/resources/sim_card_data_usage_notifications.py +21 -21
- telnyx/resources/sim_card_groups/actions.py +23 -23
- telnyx/resources/sim_card_groups/sim_card_groups.py +29 -29
- telnyx/resources/sim_card_order_preview.py +3 -3
- telnyx/resources/sim_card_orders.py +11 -11
- telnyx/resources/sim_cards/actions.py +29 -31
- telnyx/resources/sim_cards/sim_cards.py +48 -48
- telnyx/resources/siprec_connectors.py +13 -13
- telnyx/resources/storage/buckets/buckets.py +5 -5
- telnyx/resources/storage/buckets/ssl_certificate.py +11 -11
- telnyx/resources/storage/buckets/usage.py +5 -5
- telnyx/resources/storage/migration_sources.py +11 -11
- telnyx/resources/storage/migrations/actions.py +3 -3
- telnyx/resources/storage/migrations/migrations.py +9 -9
- telnyx/resources/storage/storage.py +3 -3
- telnyx/resources/sub_number_orders.py +17 -17
- telnyx/resources/sub_number_orders_report.py +19 -19
- telnyx/resources/telephony_credentials.py +31 -31
- telnyx/resources/texml/accounts/accounts.py +15 -15
- telnyx/resources/texml/accounts/calls/calls.py +156 -145
- telnyx/resources/texml/accounts/calls/recordings.py +5 -5
- telnyx/resources/texml/accounts/calls/recordings_json.py +19 -19
- telnyx/resources/texml/accounts/calls/siprec.py +5 -5
- telnyx/resources/texml/accounts/calls/streams.py +5 -5
- telnyx/resources/texml/accounts/conferences/conferences.py +31 -31
- telnyx/resources/texml/accounts/conferences/participants.py +134 -123
- telnyx/resources/texml/accounts/recordings/json.py +5 -5
- telnyx/resources/texml/accounts/transcriptions/json.py +5 -5
- telnyx/resources/texml/calls.py +79 -79
- telnyx/resources/texml/texml.py +3 -3
- telnyx/resources/texml_applications.py +65 -66
- telnyx/resources/text_to_speech.py +9 -9
- telnyx/resources/usage_reports.py +31 -32
- telnyx/resources/user_addresses.py +29 -31
- telnyx/resources/user_tags.py +5 -5
- telnyx/resources/verifications/actions.py +7 -7
- telnyx/resources/verifications/by_phone_number/actions.py +3 -3
- telnyx/resources/verifications/by_phone_number/by_phone_number.py +3 -3
- telnyx/resources/verifications/verifications.py +29 -19
- telnyx/resources/verified_numbers/actions.py +3 -3
- telnyx/resources/verified_numbers/verified_numbers.py +36 -15
- telnyx/resources/verify_profiles.py +226 -44
- telnyx/resources/virtual_cross_connects.py +45 -45
- telnyx/resources/virtual_cross_connects_coverage.py +9 -9
- telnyx/resources/webhook_deliveries.py +9 -9
- telnyx/resources/well_known.py +198 -0
- telnyx/resources/wireguard_interfaces.py +17 -17
- telnyx/resources/wireguard_peers.py +21 -21
- telnyx/resources/wireless/detail_records_reports.py +17 -17
- telnyx/resources/wireless/wireless.py +3 -3
- telnyx/resources/wireless_blocklist_values.py +3 -3
- telnyx/resources/wireless_blocklists.py +29 -30
- telnyx/types/__init__.py +53 -13
- telnyx/types/actions/purchase_create_params.py +3 -2
- telnyx/types/actions/register_create_params.py +4 -3
- 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 +1 -0
- telnyx/types/ai/chat_create_completion_params.py +3 -2
- telnyx/types/ai/cluster_compute_params.py +3 -2
- telnyx/types/ai/{conversations/message_create_params.py → conversation_add_message_params.py} +6 -5
- telnyx/types/ai/conversations/__init__.py +0 -1
- telnyx/types/ai/embedding_list_params.py +3 -2
- telnyx/types/ai/inference_embedding_bucket_ids_param.py +3 -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 +8 -4
- 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/bundle_pricing/billing_bundle_list_params.py +4 -3
- telnyx/types/bundle_pricing/user_bundle_list_params.py +4 -3
- telnyx/types/bundle_pricing/user_bundle_list_unused_params.py +4 -3
- telnyx/types/call_control_application_update_params.py +3 -2
- telnyx/types/call_dial_params.py +14 -6
- 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 +4 -2
- telnyx/types/calls/action_start_transcription_params.py +260 -6
- telnyx/types/calls/action_transfer_params.py +50 -0
- telnyx/types/calls/transcription_engine_a_config_param.py +4 -3
- telnyx/types/calls/transcription_start_request_param.py +261 -6
- telnyx/types/campaign_builder_create_params.py +4 -3
- telnyx/types/campaign_submit_appeal_response.py +0 -3
- telnyx/types/conferences/action_hold_params.py +3 -2
- telnyx/types/conferences/action_join_params.py +3 -2
- telnyx/types/conferences/action_mute_params.py +3 -2
- telnyx/types/conferences/action_play_params.py +2 -2
- telnyx/types/conferences/action_speak_params.py +3 -2
- telnyx/types/conferences/action_stop_params.py +3 -2
- telnyx/types/conferences/action_unhold_params.py +3 -2
- telnyx/types/conferences/action_unmute_params.py +3 -2
- telnyx/types/conferences/action_update_params.py +3 -2
- telnyx/types/country_coverage_retrieve_country_response.py +7 -0
- telnyx/types/country_coverage_retrieve_response.py +7 -0
- telnyx/types/credential_connection_create_params.py +3 -2
- telnyx/types/credential_connection_update_params.py +3 -2
- telnyx/types/credential_inbound_param.py +3 -2
- telnyx/types/customer_service_record_list_params.py +2 -1
- telnyx/types/customer_service_record_verify_phone_number_coverage_params.py +3 -2
- telnyx/types/detail_record_list_params.py +4 -2
- telnyx/types/document_list_params.py +2 -1
- telnyx/types/external_connection_create_params.py +4 -2
- telnyx/types/external_connection_update_params.py +4 -2
- telnyx/types/external_connections/civic_address_list_params.py +3 -2
- telnyx/types/external_connections/upload_create_params.py +3 -1
- telnyx/types/fax_application_create_params.py +3 -2
- telnyx/types/fax_application_update_params.py +3 -2
- telnyx/types/fqdn_connection_create_params.py +3 -2
- telnyx/types/fqdn_connection_update_params.py +3 -2
- telnyx/types/global_ip_latency_retrieve_response.py +7 -7
- telnyx/types/inbound_fqdn_param.py +4 -2
- telnyx/types/inbound_ip_param.py +3 -2
- telnyx/types/ip_connection_create_params.py +4 -3
- telnyx/types/ip_connection_update_params.py +3 -2
- telnyx/types/legacy/__init__.py +3 -0
- telnyx/types/legacy/reporting/__init__.py +12 -0
- telnyx/types/legacy/reporting/batch_detail_records/__init__.py +23 -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 +24 -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 +24 -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 +20 -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 +24 -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/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 +24 -0
- telnyx/types/legacy/reporting/usage_reports/voice_retrieve_response.py +13 -0
- telnyx/types/media_list_params.py +3 -2
- telnyx/types/message_schedule_params.py +3 -2
- telnyx/types/message_send_group_mms_params.py +3 -3
- telnyx/types/message_send_long_code_params.py +2 -2
- telnyx/types/message_send_number_pool_params.py +3 -2
- telnyx/types/message_send_params.py +3 -2
- telnyx/types/message_send_short_code_params.py +2 -2
- telnyx/types/messaging/rc_list_bulk_capabilities_params.py +3 -2
- telnyx/types/messaging_hosted_number_order_check_eligibility_params.py +3 -2
- telnyx/types/messaging_hosted_number_order_create_params.py +3 -2
- telnyx/types/messaging_hosted_number_order_create_verification_codes_params.py +3 -2
- telnyx/types/messaging_numbers_bulk_update_create_params.py +3 -2
- telnyx/types/messaging_profile.py +3 -0
- telnyx/types/messaging_profile_create_params.py +6 -2
- telnyx/types/messaging_profile_update_params.py +6 -2
- telnyx/types/messaging_profiles/autoresp_config_create_params.py +3 -2
- telnyx/types/messaging_profiles/autoresp_config_update_params.py +3 -2
- telnyx/types/messsage_rcs_params.py +2 -2
- telnyx/types/number_order_status_update_webhook_event.py +30 -4
- telnyx/types/numbers_feature_create_params.py +3 -2
- 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 +28 -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 +28 -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_call_recording_param.py +3 -2
- telnyx/types/outbound_voice_profile_create_params.py +4 -3
- telnyx/types/outbound_voice_profile_update_params.py +4 -3
- telnyx/types/phone_number_delete_response.py +7 -0
- telnyx/types/phone_number_detailed.py +7 -0
- telnyx/types/phone_number_list_params.py +9 -2
- telnyx/types/phone_number_slim_list_params.py +3 -2
- telnyx/types/phone_number_update_params.py +3 -2
- telnyx/types/phone_numbers/action_verify_ownership_params.py +3 -2
- telnyx/types/phone_numbers/job_delete_batch_params.py +3 -2
- telnyx/types/phone_numbers/job_update_batch_params.py +10 -3
- telnyx/types/phone_numbers/job_update_emergency_settings_batch_params.py +4 -2
- telnyx/types/portability_check_run_params.py +3 -2
- telnyx/types/porting/export_porting_orders_csv_report_param.py +2 -1
- telnyx/types/porting_order.py +3 -0
- telnyx/types/porting_order_create_params.py +6 -2
- telnyx/types/porting_order_list_params.py +52 -31
- telnyx/types/porting_order_phone_number_configuration_param.py +3 -2
- telnyx/types/porting_order_update_params.py +2 -0
- telnyx/types/porting_orders/action_requirement_list_params.py +3 -2
- telnyx/types/porting_orders/phone_number_block_list_params.py +5 -3
- telnyx/types/porting_orders/phone_number_configuration_list_params.py +22 -21
- telnyx/types/porting_orders/verification_code_send_params.py +3 -2
- telnyx/types/portout_list_params.py +2 -1
- telnyx/types/portouts/export_portouts_csv_report_param.py +3 -2
- telnyx/types/recordings/action_delete_params.py +3 -2
- telnyx/types/report_list_wdrs_params.py +3 -2
- telnyx/types/reports/mdr_usage_report_fetch_sync_params.py +3 -2
- telnyx/types/rooms/sessions/action_kick_params.py +5 -3
- telnyx/types/rooms/sessions/action_mute_params.py +5 -3
- telnyx/types/rooms/sessions/action_unmute_params.py +5 -3
- 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_list_params.py +2 -1
- telnyx/types/sim_card_update_params.py +4 -3
- telnyx/types/sim_cards/action_bulk_set_public_ips_params.py +3 -2
- telnyx/types/sim_cards/action_validate_registration_codes_params.py +3 -2
- telnyx/types/stream_bidirectional_codec.py +1 -1
- 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/texml_application_create_params.py +2 -2
- telnyx/types/texml_application_update_params.py +2 -2
- telnyx/types/usage_report_list_params.py +5 -4
- telnyx/types/verification_trigger_call_params.py +7 -0
- telnyx/types/verified_number_create_params.py +10 -0
- telnyx/types/verify_profile.py +18 -3
- telnyx/types/verify_profile_create_params.py +6 -4
- telnyx/types/verify_profile_create_template_params.py +12 -0
- telnyx/types/verify_profile_create_template_response.py +12 -0
- 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_params.py +6 -4
- telnyx/types/verify_profile_update_template_params.py +12 -0
- telnyx/types/verify_profile_update_template_response.py +12 -0
- telnyx/types/video_region_param.py +4 -2
- 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/types/wireless_blocklist_create_params.py +3 -2
- telnyx/types/wireless_blocklist_update_params.py +3 -2
- {telnyx-3.3.0a0.dist-info → telnyx-3.4.0.dist-info}/METADATA +60 -19
- {telnyx-3.3.0a0.dist-info → telnyx-3.4.0.dist-info}/RECORD +494 -407
- 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.3.0a0.dist-info → telnyx-3.4.0.dist-info}/WHEEL +0 -0
- {telnyx-3.3.0a0.dist-info → telnyx-3.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -13,7 +13,7 @@ from ...types import (
|
|
|
13
13
|
StreamBidirectionalCodec,
|
|
14
14
|
StreamBidirectionalTargetLegs,
|
|
15
15
|
)
|
|
16
|
-
from ..._types import
|
|
16
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
17
17
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
18
18
|
from ..._compat import cached_property
|
|
19
19
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -141,47 +141,45 @@ class ActionsResource(SyncAPIResource):
|
|
|
141
141
|
self,
|
|
142
142
|
call_control_id: str,
|
|
143
143
|
*,
|
|
144
|
-
billing_group_id: str |
|
|
145
|
-
client_state: str |
|
|
146
|
-
command_id: str |
|
|
147
|
-
custom_headers: Iterable[CustomSipHeaderParam] |
|
|
148
|
-
preferred_codecs: Literal["G722,PCMU,PCMA,G729,OPUS,VP8,H264"] |
|
|
149
|
-
record: Literal["record-from-answer"] |
|
|
150
|
-
record_channels: Literal["single", "dual"] |
|
|
151
|
-
record_custom_file_name: str |
|
|
152
|
-
record_format: Literal["wav", "mp3"] |
|
|
153
|
-
record_max_length: int |
|
|
154
|
-
record_timeout_secs: int |
|
|
155
|
-
record_track: Literal["both", "inbound", "outbound"] |
|
|
156
|
-
record_trim: Literal["trim-silence"] |
|
|
157
|
-
send_silence_when_idle: bool |
|
|
158
|
-
sip_headers: Iterable[SipHeaderParam] |
|
|
159
|
-
sound_modifications: SoundModificationsParam |
|
|
160
|
-
stream_bidirectional_codec: StreamBidirectionalCodec |
|
|
161
|
-
stream_bidirectional_mode: StreamBidirectionalMode |
|
|
162
|
-
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs |
|
|
163
|
-
stream_codec: StreamCodec |
|
|
164
|
-
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] |
|
|
165
|
-
stream_url: str |
|
|
166
|
-
transcription: bool |
|
|
167
|
-
transcription_config: TranscriptionStartRequestParam |
|
|
168
|
-
webhook_url: str |
|
|
169
|
-
webhook_url_method: Literal["POST", "GET"] |
|
|
144
|
+
billing_group_id: str | Omit = omit,
|
|
145
|
+
client_state: str | Omit = omit,
|
|
146
|
+
command_id: str | Omit = omit,
|
|
147
|
+
custom_headers: Iterable[CustomSipHeaderParam] | Omit = omit,
|
|
148
|
+
preferred_codecs: Literal["G722,PCMU,PCMA,G729,OPUS,VP8,H264"] | Omit = omit,
|
|
149
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
150
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
151
|
+
record_custom_file_name: str | Omit = omit,
|
|
152
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
153
|
+
record_max_length: int | Omit = omit,
|
|
154
|
+
record_timeout_secs: int | Omit = omit,
|
|
155
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
156
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
157
|
+
send_silence_when_idle: bool | Omit = omit,
|
|
158
|
+
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
159
|
+
sound_modifications: SoundModificationsParam | Omit = omit,
|
|
160
|
+
stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
|
|
161
|
+
stream_bidirectional_mode: StreamBidirectionalMode | Omit = omit,
|
|
162
|
+
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs | Omit = omit,
|
|
163
|
+
stream_codec: StreamCodec | Omit = omit,
|
|
164
|
+
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
165
|
+
stream_url: str | Omit = omit,
|
|
166
|
+
transcription: bool | Omit = omit,
|
|
167
|
+
transcription_config: TranscriptionStartRequestParam | Omit = omit,
|
|
168
|
+
webhook_url: str | Omit = omit,
|
|
169
|
+
webhook_url_method: Literal["POST", "GET"] | Omit = omit,
|
|
170
170
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
171
171
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
172
172
|
extra_headers: Headers | None = None,
|
|
173
173
|
extra_query: Query | None = None,
|
|
174
174
|
extra_body: Body | None = None,
|
|
175
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
175
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
176
176
|
) -> ActionAnswerResponse:
|
|
177
177
|
"""Answer an incoming call.
|
|
178
178
|
|
|
179
179
|
You must issue this command before executing subsequent
|
|
180
180
|
commands on an incoming call.
|
|
181
181
|
|
|
182
|
-
**Expected Webhooks
|
|
183
|
-
[callback schema](https://developers.telnyx.com/api/call-control/answer-call#callbacks)
|
|
184
|
-
below):**
|
|
182
|
+
**Expected Webhooks:**
|
|
185
183
|
|
|
186
184
|
- `call.answered`
|
|
187
185
|
- `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
@@ -248,7 +246,6 @@ class ActionsResource(SyncAPIResource):
|
|
|
248
246
|
|
|
249
247
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
250
248
|
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
249
|
|
|
253
250
|
stream_track: Specifies which track should be streamed.
|
|
254
251
|
|
|
@@ -315,20 +312,20 @@ class ActionsResource(SyncAPIResource):
|
|
|
315
312
|
path_call_control_id: str,
|
|
316
313
|
*,
|
|
317
314
|
body_call_control_id: str,
|
|
318
|
-
client_state: str |
|
|
319
|
-
command_id: str |
|
|
320
|
-
mute_dtmf: Literal["none", "both", "self", "opposite"] |
|
|
321
|
-
park_after_unbridge: str |
|
|
322
|
-
play_ringtone: bool |
|
|
323
|
-
queue: str |
|
|
324
|
-
record: Literal["record-from-answer"] |
|
|
325
|
-
record_channels: Literal["single", "dual"] |
|
|
326
|
-
record_custom_file_name: str |
|
|
327
|
-
record_format: Literal["wav", "mp3"] |
|
|
328
|
-
record_max_length: int |
|
|
329
|
-
record_timeout_secs: int |
|
|
330
|
-
record_track: Literal["both", "inbound", "outbound"] |
|
|
331
|
-
record_trim: Literal["trim-silence"] |
|
|
315
|
+
client_state: str | Omit = omit,
|
|
316
|
+
command_id: str | Omit = omit,
|
|
317
|
+
mute_dtmf: Literal["none", "both", "self", "opposite"] | Omit = omit,
|
|
318
|
+
park_after_unbridge: str | Omit = omit,
|
|
319
|
+
play_ringtone: bool | Omit = omit,
|
|
320
|
+
queue: str | Omit = omit,
|
|
321
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
322
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
323
|
+
record_custom_file_name: str | Omit = omit,
|
|
324
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
325
|
+
record_max_length: int | Omit = omit,
|
|
326
|
+
record_timeout_secs: int | Omit = omit,
|
|
327
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
328
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
332
329
|
ringtone: Literal[
|
|
333
330
|
"at",
|
|
334
331
|
"au",
|
|
@@ -371,22 +368,20 @@ class ActionsResource(SyncAPIResource):
|
|
|
371
368
|
"ve",
|
|
372
369
|
"za",
|
|
373
370
|
]
|
|
374
|
-
|
|
|
375
|
-
video_room_context: str |
|
|
376
|
-
video_room_id: str |
|
|
371
|
+
| Omit = omit,
|
|
372
|
+
video_room_context: str | Omit = omit,
|
|
373
|
+
video_room_id: str | Omit = omit,
|
|
377
374
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
378
375
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
379
376
|
extra_headers: Headers | None = None,
|
|
380
377
|
extra_query: Query | None = None,
|
|
381
378
|
extra_body: Body | None = None,
|
|
382
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
379
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
383
380
|
) -> ActionBridgeResponse:
|
|
384
381
|
"""
|
|
385
382
|
Bridge two call control calls.
|
|
386
383
|
|
|
387
|
-
**Expected Webhooks
|
|
388
|
-
[callback schema](https://developers.telnyx.com/api/call-control/bridge-call#callbacks)
|
|
389
|
-
below):**
|
|
384
|
+
**Expected Webhooks:**
|
|
390
385
|
|
|
391
386
|
- `call.bridged` for Leg A
|
|
392
387
|
- `call.bridged` for Leg B
|
|
@@ -503,16 +498,16 @@ class ActionsResource(SyncAPIResource):
|
|
|
503
498
|
call_control_id: str,
|
|
504
499
|
*,
|
|
505
500
|
queue_name: str,
|
|
506
|
-
client_state: str |
|
|
507
|
-
command_id: str |
|
|
508
|
-
max_size: int |
|
|
509
|
-
max_wait_time_secs: int |
|
|
501
|
+
client_state: str | Omit = omit,
|
|
502
|
+
command_id: str | Omit = omit,
|
|
503
|
+
max_size: int | Omit = omit,
|
|
504
|
+
max_wait_time_secs: int | Omit = omit,
|
|
510
505
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
511
506
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
512
507
|
extra_headers: Headers | None = None,
|
|
513
508
|
extra_query: Query | None = None,
|
|
514
509
|
extra_body: Body | None = None,
|
|
515
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
510
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
516
511
|
) -> ActionEnqueueResponse:
|
|
517
512
|
"""
|
|
518
513
|
Put the call in a queue.
|
|
@@ -564,22 +559,22 @@ class ActionsResource(SyncAPIResource):
|
|
|
564
559
|
self,
|
|
565
560
|
call_control_id: str,
|
|
566
561
|
*,
|
|
567
|
-
client_state: str |
|
|
568
|
-
command_id: str |
|
|
569
|
-
gather_id: str |
|
|
570
|
-
initial_timeout_millis: int |
|
|
571
|
-
inter_digit_timeout_millis: int |
|
|
572
|
-
maximum_digits: int |
|
|
573
|
-
minimum_digits: int |
|
|
574
|
-
terminating_digit: str |
|
|
575
|
-
timeout_millis: int |
|
|
576
|
-
valid_digits: str |
|
|
562
|
+
client_state: str | Omit = omit,
|
|
563
|
+
command_id: str | Omit = omit,
|
|
564
|
+
gather_id: str | Omit = omit,
|
|
565
|
+
initial_timeout_millis: int | Omit = omit,
|
|
566
|
+
inter_digit_timeout_millis: int | Omit = omit,
|
|
567
|
+
maximum_digits: int | Omit = omit,
|
|
568
|
+
minimum_digits: int | Omit = omit,
|
|
569
|
+
terminating_digit: str | Omit = omit,
|
|
570
|
+
timeout_millis: int | Omit = omit,
|
|
571
|
+
valid_digits: str | Omit = omit,
|
|
577
572
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
578
573
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
579
574
|
extra_headers: Headers | None = None,
|
|
580
575
|
extra_query: Query | None = None,
|
|
581
576
|
extra_body: Body | None = None,
|
|
582
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
577
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
583
578
|
) -> ActionGatherResponse:
|
|
584
579
|
"""
|
|
585
580
|
Gather DTMF signals to build interactive menus.
|
|
@@ -587,9 +582,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
587
582
|
You can pass a list of valid digits. The `Answer` command must be issued before
|
|
588
583
|
the `gather` command.
|
|
589
584
|
|
|
590
|
-
**Expected Webhooks
|
|
591
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-call#callbacks)
|
|
592
|
-
below):**
|
|
585
|
+
**Expected Webhooks:**
|
|
593
586
|
|
|
594
587
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
595
588
|
- `call.gather.ended`
|
|
@@ -658,25 +651,25 @@ class ActionsResource(SyncAPIResource):
|
|
|
658
651
|
call_control_id: str,
|
|
659
652
|
*,
|
|
660
653
|
parameters: object,
|
|
661
|
-
assistant: AssistantParam |
|
|
662
|
-
client_state: str |
|
|
663
|
-
command_id: str |
|
|
664
|
-
greeting: str |
|
|
665
|
-
interruption_settings: InterruptionSettingsParam |
|
|
666
|
-
language: GoogleTranscriptionLanguage |
|
|
667
|
-
message_history: Iterable[action_gather_using_ai_params.MessageHistory] |
|
|
668
|
-
send_message_history_updates: bool |
|
|
669
|
-
send_partial_results: bool |
|
|
670
|
-
transcription: TranscriptionConfigParam |
|
|
671
|
-
user_response_timeout_ms: int |
|
|
672
|
-
voice: str |
|
|
673
|
-
voice_settings: action_gather_using_ai_params.VoiceSettings |
|
|
654
|
+
assistant: AssistantParam | Omit = omit,
|
|
655
|
+
client_state: str | Omit = omit,
|
|
656
|
+
command_id: str | Omit = omit,
|
|
657
|
+
greeting: str | Omit = omit,
|
|
658
|
+
interruption_settings: InterruptionSettingsParam | Omit = omit,
|
|
659
|
+
language: GoogleTranscriptionLanguage | Omit = omit,
|
|
660
|
+
message_history: Iterable[action_gather_using_ai_params.MessageHistory] | Omit = omit,
|
|
661
|
+
send_message_history_updates: bool | Omit = omit,
|
|
662
|
+
send_partial_results: bool | Omit = omit,
|
|
663
|
+
transcription: TranscriptionConfigParam | Omit = omit,
|
|
664
|
+
user_response_timeout_ms: int | Omit = omit,
|
|
665
|
+
voice: str | Omit = omit,
|
|
666
|
+
voice_settings: action_gather_using_ai_params.VoiceSettings | Omit = omit,
|
|
674
667
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
675
668
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
676
669
|
extra_headers: Headers | None = None,
|
|
677
670
|
extra_query: Query | None = None,
|
|
678
671
|
extra_body: Body | None = None,
|
|
679
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
672
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
680
673
|
) -> ActionGatherUsingAIResponse:
|
|
681
674
|
"""
|
|
682
675
|
Gather parameters defined in the request payload using a voice assistant.
|
|
@@ -684,9 +677,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
684
677
|
You can pass parameters described as a JSON Schema object and the voice
|
|
685
678
|
assistant will attempt to gather these informations.
|
|
686
679
|
|
|
687
|
-
**Expected Webhooks
|
|
688
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-gather-using-ai#callbacks)
|
|
689
|
-
below):**
|
|
680
|
+
**Expected Webhooks:**
|
|
690
681
|
|
|
691
682
|
- `call.ai_gather.ended`
|
|
692
683
|
- `call.conversation.ended`
|
|
@@ -721,16 +712,13 @@ class ActionsResource(SyncAPIResource):
|
|
|
721
712
|
information to the voice assistant.
|
|
722
713
|
|
|
723
714
|
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.
|
|
715
|
+
the message history via the `call.ai_gather.message_history_updated` callback in
|
|
716
|
+
real time as the message history is updated.
|
|
727
717
|
|
|
728
718
|
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.
|
|
719
|
+
results via the `call.ai_gather.partial_results` callback in real time as
|
|
720
|
+
individual fields are gathered. If set to `false`, the voice assistant will only
|
|
721
|
+
send the final result via the `call.ai_gather.ended` callback.
|
|
734
722
|
|
|
735
723
|
transcription: The settings associated with speech to text for the voice assistant. This is
|
|
736
724
|
only relevant if the assistant uses a text-to-text language model. Any assistant
|
|
@@ -806,25 +794,25 @@ class ActionsResource(SyncAPIResource):
|
|
|
806
794
|
self,
|
|
807
795
|
call_control_id: str,
|
|
808
796
|
*,
|
|
809
|
-
audio_url: str |
|
|
810
|
-
client_state: str |
|
|
811
|
-
command_id: str |
|
|
812
|
-
inter_digit_timeout_millis: int |
|
|
813
|
-
invalid_audio_url: str |
|
|
814
|
-
invalid_media_name: str |
|
|
815
|
-
maximum_digits: int |
|
|
816
|
-
maximum_tries: int |
|
|
817
|
-
media_name: str |
|
|
818
|
-
minimum_digits: int |
|
|
819
|
-
terminating_digit: str |
|
|
820
|
-
timeout_millis: int |
|
|
821
|
-
valid_digits: str |
|
|
797
|
+
audio_url: str | Omit = omit,
|
|
798
|
+
client_state: str | Omit = omit,
|
|
799
|
+
command_id: str | Omit = omit,
|
|
800
|
+
inter_digit_timeout_millis: int | Omit = omit,
|
|
801
|
+
invalid_audio_url: str | Omit = omit,
|
|
802
|
+
invalid_media_name: str | Omit = omit,
|
|
803
|
+
maximum_digits: int | Omit = omit,
|
|
804
|
+
maximum_tries: int | Omit = omit,
|
|
805
|
+
media_name: str | Omit = omit,
|
|
806
|
+
minimum_digits: int | Omit = omit,
|
|
807
|
+
terminating_digit: str | Omit = omit,
|
|
808
|
+
timeout_millis: int | Omit = omit,
|
|
809
|
+
valid_digits: str | Omit = omit,
|
|
822
810
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
823
811
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
824
812
|
extra_headers: Headers | None = None,
|
|
825
813
|
extra_query: Query | None = None,
|
|
826
814
|
extra_body: Body | None = None,
|
|
827
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
815
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
828
816
|
) -> ActionGatherUsingAudioResponse:
|
|
829
817
|
"""
|
|
830
818
|
Play an audio file on the call until the required DTMF signals are gathered to
|
|
@@ -835,9 +823,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
835
823
|
interrupted when a DTMF signal is received. The
|
|
836
824
|
`Answer command must be issued before the `gather_using_audio` command.
|
|
837
825
|
|
|
838
|
-
**Expected Webhooks
|
|
839
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-audio#callbacks)
|
|
840
|
-
below):**
|
|
826
|
+
**Expected Webhooks:**
|
|
841
827
|
|
|
842
828
|
- `call.playback.started`
|
|
843
829
|
- `call.playback.ended`
|
|
@@ -930,10 +916,10 @@ class ActionsResource(SyncAPIResource):
|
|
|
930
916
|
*,
|
|
931
917
|
payload: str,
|
|
932
918
|
voice: str,
|
|
933
|
-
client_state: str |
|
|
934
|
-
command_id: str |
|
|
935
|
-
inter_digit_timeout_millis: int |
|
|
936
|
-
invalid_payload: str |
|
|
919
|
+
client_state: str | Omit = omit,
|
|
920
|
+
command_id: str | Omit = omit,
|
|
921
|
+
inter_digit_timeout_millis: int | Omit = omit,
|
|
922
|
+
invalid_payload: str | Omit = omit,
|
|
937
923
|
language: Literal[
|
|
938
924
|
"arb",
|
|
939
925
|
"cmn-CN",
|
|
@@ -965,22 +951,22 @@ class ActionsResource(SyncAPIResource):
|
|
|
965
951
|
"sv-SE",
|
|
966
952
|
"tr-TR",
|
|
967
953
|
]
|
|
968
|
-
|
|
|
969
|
-
maximum_digits: int |
|
|
970
|
-
maximum_tries: int |
|
|
971
|
-
minimum_digits: int |
|
|
972
|
-
payload_type: Literal["text", "ssml"] |
|
|
973
|
-
service_level: Literal["basic", "premium"] |
|
|
974
|
-
terminating_digit: str |
|
|
975
|
-
timeout_millis: int |
|
|
976
|
-
valid_digits: str |
|
|
977
|
-
voice_settings: action_gather_using_speak_params.VoiceSettings |
|
|
954
|
+
| Omit = omit,
|
|
955
|
+
maximum_digits: int | Omit = omit,
|
|
956
|
+
maximum_tries: int | Omit = omit,
|
|
957
|
+
minimum_digits: int | Omit = omit,
|
|
958
|
+
payload_type: Literal["text", "ssml"] | Omit = omit,
|
|
959
|
+
service_level: Literal["basic", "premium"] | Omit = omit,
|
|
960
|
+
terminating_digit: str | Omit = omit,
|
|
961
|
+
timeout_millis: int | Omit = omit,
|
|
962
|
+
valid_digits: str | Omit = omit,
|
|
963
|
+
voice_settings: action_gather_using_speak_params.VoiceSettings | Omit = omit,
|
|
978
964
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
979
965
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
980
966
|
extra_headers: Headers | None = None,
|
|
981
967
|
extra_query: Query | None = None,
|
|
982
968
|
extra_body: Body | None = None,
|
|
983
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
969
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
984
970
|
) -> ActionGatherUsingSpeakResponse:
|
|
985
971
|
"""
|
|
986
972
|
Convert text to speech and play it on the call until the required DTMF signals
|
|
@@ -991,9 +977,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
991
977
|
a DTMF signal is received. The `Answer` command must be issued before the
|
|
992
978
|
`gather_using_speak` command.
|
|
993
979
|
|
|
994
|
-
**Expected Webhooks
|
|
995
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-speak#callbacks)
|
|
996
|
-
below):**
|
|
980
|
+
**Expected Webhooks:**
|
|
997
981
|
|
|
998
982
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
999
983
|
- `call.gather.ended`
|
|
@@ -1112,21 +1096,19 @@ class ActionsResource(SyncAPIResource):
|
|
|
1112
1096
|
self,
|
|
1113
1097
|
call_control_id: str,
|
|
1114
1098
|
*,
|
|
1115
|
-
client_state: str |
|
|
1116
|
-
command_id: str |
|
|
1099
|
+
client_state: str | Omit = omit,
|
|
1100
|
+
command_id: str | Omit = omit,
|
|
1117
1101
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1118
1102
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1119
1103
|
extra_headers: Headers | None = None,
|
|
1120
1104
|
extra_query: Query | None = None,
|
|
1121
1105
|
extra_body: Body | None = None,
|
|
1122
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1106
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1123
1107
|
) -> ActionHangupResponse:
|
|
1124
1108
|
"""
|
|
1125
1109
|
Hang up the call.
|
|
1126
1110
|
|
|
1127
|
-
**Expected Webhooks
|
|
1128
|
-
[callback schema](https://developers.telnyx.com/api/call-control/hangup-call#callbacks)
|
|
1129
|
-
below):**
|
|
1111
|
+
**Expected Webhooks:**
|
|
1130
1112
|
|
|
1131
1113
|
- `call.hangup`
|
|
1132
1114
|
- `call.recording.saved`
|
|
@@ -1167,14 +1149,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
1167
1149
|
self,
|
|
1168
1150
|
call_control_id: str,
|
|
1169
1151
|
*,
|
|
1170
|
-
client_state: str |
|
|
1171
|
-
command_id: str |
|
|
1152
|
+
client_state: str | Omit = omit,
|
|
1153
|
+
command_id: str | Omit = omit,
|
|
1172
1154
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1173
1155
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1174
1156
|
extra_headers: Headers | None = None,
|
|
1175
1157
|
extra_query: Query | None = None,
|
|
1176
1158
|
extra_body: Body | None = None,
|
|
1177
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1159
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1178
1160
|
) -> ActionLeaveQueueResponse:
|
|
1179
1161
|
"""
|
|
1180
1162
|
Removes the call from a queue.
|
|
@@ -1215,15 +1197,15 @@ class ActionsResource(SyncAPIResource):
|
|
|
1215
1197
|
self,
|
|
1216
1198
|
call_control_id: str,
|
|
1217
1199
|
*,
|
|
1218
|
-
client_state: str |
|
|
1219
|
-
command_id: str |
|
|
1220
|
-
recording_id: str |
|
|
1200
|
+
client_state: str | Omit = omit,
|
|
1201
|
+
command_id: str | Omit = omit,
|
|
1202
|
+
recording_id: str | Omit = omit,
|
|
1221
1203
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1222
1204
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1223
1205
|
extra_headers: Headers | None = None,
|
|
1224
1206
|
extra_query: Query | None = None,
|
|
1225
1207
|
extra_body: Body | None = None,
|
|
1226
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1208
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1227
1209
|
) -> ActionPauseRecordingResponse:
|
|
1228
1210
|
"""Pause recording the call.
|
|
1229
1211
|
|
|
@@ -1273,27 +1255,25 @@ class ActionsResource(SyncAPIResource):
|
|
|
1273
1255
|
call_control_id: str,
|
|
1274
1256
|
*,
|
|
1275
1257
|
sip_address: str,
|
|
1276
|
-
client_state: str |
|
|
1277
|
-
command_id: str |
|
|
1278
|
-
custom_headers: Iterable[CustomSipHeaderParam] |
|
|
1279
|
-
sip_auth_password: str |
|
|
1280
|
-
sip_auth_username: str |
|
|
1281
|
-
sip_headers: Iterable[SipHeaderParam] |
|
|
1258
|
+
client_state: str | Omit = omit,
|
|
1259
|
+
command_id: str | Omit = omit,
|
|
1260
|
+
custom_headers: Iterable[CustomSipHeaderParam] | Omit = omit,
|
|
1261
|
+
sip_auth_password: str | Omit = omit,
|
|
1262
|
+
sip_auth_username: str | Omit = omit,
|
|
1263
|
+
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
1282
1264
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1283
1265
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1284
1266
|
extra_headers: Headers | None = None,
|
|
1285
1267
|
extra_query: Query | None = None,
|
|
1286
1268
|
extra_body: Body | None = None,
|
|
1287
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1269
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1288
1270
|
) -> ActionReferResponse:
|
|
1289
1271
|
"""Initiate a SIP Refer on a Call Control call.
|
|
1290
1272
|
|
|
1291
1273
|
You can initiate a SIP Refer at any
|
|
1292
1274
|
point in the duration of a call.
|
|
1293
1275
|
|
|
1294
|
-
**Expected Webhooks
|
|
1295
|
-
[callback schema](https://developers.telnyx.com/api/call-control/refer-call#callbacks)
|
|
1296
|
-
below):**
|
|
1276
|
+
**Expected Webhooks:**
|
|
1297
1277
|
|
|
1298
1278
|
- `call.refer.started`
|
|
1299
1279
|
- `call.refer.completed`
|
|
@@ -1353,21 +1333,19 @@ class ActionsResource(SyncAPIResource):
|
|
|
1353
1333
|
call_control_id: str,
|
|
1354
1334
|
*,
|
|
1355
1335
|
cause: Literal["CALL_REJECTED", "USER_BUSY"],
|
|
1356
|
-
client_state: str |
|
|
1357
|
-
command_id: str |
|
|
1336
|
+
client_state: str | Omit = omit,
|
|
1337
|
+
command_id: str | Omit = omit,
|
|
1358
1338
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1359
1339
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1360
1340
|
extra_headers: Headers | None = None,
|
|
1361
1341
|
extra_query: Query | None = None,
|
|
1362
1342
|
extra_body: Body | None = None,
|
|
1363
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1343
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1364
1344
|
) -> ActionRejectResponse:
|
|
1365
1345
|
"""
|
|
1366
1346
|
Reject an incoming call.
|
|
1367
1347
|
|
|
1368
|
-
**Expected Webhooks
|
|
1369
|
-
[callback schema](https://developers.telnyx.com/api/call-control/reject-call#callbacks)
|
|
1370
|
-
below):**
|
|
1348
|
+
**Expected Webhooks:**
|
|
1371
1349
|
|
|
1372
1350
|
- `call.hangup`
|
|
1373
1351
|
|
|
@@ -1410,15 +1388,15 @@ class ActionsResource(SyncAPIResource):
|
|
|
1410
1388
|
self,
|
|
1411
1389
|
call_control_id: str,
|
|
1412
1390
|
*,
|
|
1413
|
-
client_state: str |
|
|
1414
|
-
command_id: str |
|
|
1415
|
-
recording_id: str |
|
|
1391
|
+
client_state: str | Omit = omit,
|
|
1392
|
+
command_id: str | Omit = omit,
|
|
1393
|
+
recording_id: str | Omit = omit,
|
|
1416
1394
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1417
1395
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1418
1396
|
extra_headers: Headers | None = None,
|
|
1419
1397
|
extra_query: Query | None = None,
|
|
1420
1398
|
extra_body: Body | None = None,
|
|
1421
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1399
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1422
1400
|
) -> ActionResumeRecordingResponse:
|
|
1423
1401
|
"""
|
|
1424
1402
|
Resume recording the call.
|
|
@@ -1467,15 +1445,15 @@ class ActionsResource(SyncAPIResource):
|
|
|
1467
1445
|
call_control_id: str,
|
|
1468
1446
|
*,
|
|
1469
1447
|
digits: str,
|
|
1470
|
-
client_state: str |
|
|
1471
|
-
command_id: str |
|
|
1472
|
-
duration_millis: int |
|
|
1448
|
+
client_state: str | Omit = omit,
|
|
1449
|
+
command_id: str | Omit = omit,
|
|
1450
|
+
duration_millis: int | Omit = omit,
|
|
1473
1451
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1474
1452
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1475
1453
|
extra_headers: Headers | None = None,
|
|
1476
1454
|
extra_query: Query | None = None,
|
|
1477
1455
|
extra_body: Body | None = None,
|
|
1478
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1456
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1479
1457
|
) -> ActionSendDtmfResponse:
|
|
1480
1458
|
"""Sends DTMF tones from this leg.
|
|
1481
1459
|
|
|
@@ -1532,14 +1510,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
1532
1510
|
*,
|
|
1533
1511
|
body: str,
|
|
1534
1512
|
content_type: str,
|
|
1535
|
-
client_state: str |
|
|
1536
|
-
command_id: str |
|
|
1513
|
+
client_state: str | Omit = omit,
|
|
1514
|
+
command_id: str | Omit = omit,
|
|
1537
1515
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1538
1516
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1539
1517
|
extra_headers: Headers | None = None,
|
|
1540
1518
|
extra_query: Query | None = None,
|
|
1541
1519
|
extra_body: Body | None = None,
|
|
1542
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1520
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1543
1521
|
) -> ActionSendSipInfoResponse:
|
|
1544
1522
|
"""
|
|
1545
1523
|
Sends SIP info from this leg.
|
|
@@ -1593,8 +1571,8 @@ class ActionsResource(SyncAPIResource):
|
|
|
1593
1571
|
*,
|
|
1594
1572
|
payload: str,
|
|
1595
1573
|
voice: str,
|
|
1596
|
-
client_state: str |
|
|
1597
|
-
command_id: str |
|
|
1574
|
+
client_state: str | Omit = omit,
|
|
1575
|
+
command_id: str | Omit = omit,
|
|
1598
1576
|
language: Literal[
|
|
1599
1577
|
"arb",
|
|
1600
1578
|
"cmn-CN",
|
|
@@ -1626,17 +1604,17 @@ class ActionsResource(SyncAPIResource):
|
|
|
1626
1604
|
"sv-SE",
|
|
1627
1605
|
"tr-TR",
|
|
1628
1606
|
]
|
|
1629
|
-
|
|
|
1630
|
-
payload_type: Literal["text", "ssml"] |
|
|
1631
|
-
service_level: Literal["basic", "premium"] |
|
|
1632
|
-
stop: str |
|
|
1633
|
-
voice_settings: action_speak_params.VoiceSettings |
|
|
1607
|
+
| Omit = omit,
|
|
1608
|
+
payload_type: Literal["text", "ssml"] | Omit = omit,
|
|
1609
|
+
service_level: Literal["basic", "premium"] | Omit = omit,
|
|
1610
|
+
stop: str | Omit = omit,
|
|
1611
|
+
voice_settings: action_speak_params.VoiceSettings | Omit = omit,
|
|
1634
1612
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1635
1613
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1636
1614
|
extra_headers: Headers | None = None,
|
|
1637
1615
|
extra_query: Query | None = None,
|
|
1638
1616
|
extra_body: Body | None = None,
|
|
1639
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1617
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1640
1618
|
) -> ActionSpeakResponse:
|
|
1641
1619
|
"""Convert text to speech and play it back on the call.
|
|
1642
1620
|
|
|
@@ -1644,9 +1622,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1644
1622
|
commands are issued consecutively, the audio files will be placed in a queue
|
|
1645
1623
|
awaiting playback.
|
|
1646
1624
|
|
|
1647
|
-
**Expected Webhooks
|
|
1648
|
-
[callback schema](https://developers.telnyx.com/api/call-control/speak-call#callbacks)
|
|
1649
|
-
below):**
|
|
1625
|
+
**Expected Webhooks:**
|
|
1650
1626
|
|
|
1651
1627
|
- `call.speak.started`
|
|
1652
1628
|
- `call.speak.ended`
|
|
@@ -1741,27 +1717,25 @@ class ActionsResource(SyncAPIResource):
|
|
|
1741
1717
|
self,
|
|
1742
1718
|
call_control_id: str,
|
|
1743
1719
|
*,
|
|
1744
|
-
assistant: action_start_ai_assistant_params.Assistant |
|
|
1745
|
-
client_state: str |
|
|
1746
|
-
command_id: str |
|
|
1747
|
-
greeting: str |
|
|
1748
|
-
interruption_settings: InterruptionSettingsParam |
|
|
1749
|
-
transcription: TranscriptionConfigParam |
|
|
1750
|
-
voice: str |
|
|
1751
|
-
voice_settings: action_start_ai_assistant_params.VoiceSettings |
|
|
1720
|
+
assistant: action_start_ai_assistant_params.Assistant | Omit = omit,
|
|
1721
|
+
client_state: str | Omit = omit,
|
|
1722
|
+
command_id: str | Omit = omit,
|
|
1723
|
+
greeting: str | Omit = omit,
|
|
1724
|
+
interruption_settings: InterruptionSettingsParam | Omit = omit,
|
|
1725
|
+
transcription: TranscriptionConfigParam | Omit = omit,
|
|
1726
|
+
voice: str | Omit = omit,
|
|
1727
|
+
voice_settings: action_start_ai_assistant_params.VoiceSettings | Omit = omit,
|
|
1752
1728
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1753
1729
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1754
1730
|
extra_headers: Headers | None = None,
|
|
1755
1731
|
extra_query: Query | None = None,
|
|
1756
1732
|
extra_body: Body | None = None,
|
|
1757
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1733
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1758
1734
|
) -> ActionStartAIAssistantResponse:
|
|
1759
1735
|
"""
|
|
1760
1736
|
Start an AI assistant on the call.
|
|
1761
1737
|
|
|
1762
|
-
**Expected Webhooks
|
|
1763
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-start-ai-assistant#callbacks)
|
|
1764
|
-
below):**
|
|
1738
|
+
**Expected Webhooks:**
|
|
1765
1739
|
|
|
1766
1740
|
- `call.conversation.ended`
|
|
1767
1741
|
- `call.conversation_insights.generated`
|
|
@@ -1846,17 +1820,17 @@ class ActionsResource(SyncAPIResource):
|
|
|
1846
1820
|
self,
|
|
1847
1821
|
call_control_id: str,
|
|
1848
1822
|
*,
|
|
1849
|
-
client_state: str |
|
|
1850
|
-
command_id: str |
|
|
1851
|
-
rx: str |
|
|
1852
|
-
stream_type: Literal["decrypted"] |
|
|
1853
|
-
tx: str |
|
|
1823
|
+
client_state: str | Omit = omit,
|
|
1824
|
+
command_id: str | Omit = omit,
|
|
1825
|
+
rx: str | Omit = omit,
|
|
1826
|
+
stream_type: Literal["decrypted"] | Omit = omit,
|
|
1827
|
+
tx: str | Omit = omit,
|
|
1854
1828
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1855
1829
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1856
1830
|
extra_headers: Headers | None = None,
|
|
1857
1831
|
extra_query: Query | None = None,
|
|
1858
1832
|
extra_body: Body | None = None,
|
|
1859
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1833
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1860
1834
|
) -> ActionStartForkingResponse:
|
|
1861
1835
|
"""
|
|
1862
1836
|
Call forking allows you to stream the media from a call to a specific target in
|
|
@@ -1865,9 +1839,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
1865
1839
|
audio responses. Requests must specify either the `target` attribute or the `rx`
|
|
1866
1840
|
and `tx` attributes.
|
|
1867
1841
|
|
|
1868
|
-
**Expected Webhooks
|
|
1869
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-fork#callbacks)
|
|
1870
|
-
below):**
|
|
1842
|
+
**Expected Webhooks:**
|
|
1871
1843
|
|
|
1872
1844
|
- `call.fork.started`
|
|
1873
1845
|
- `call.fork.stopped`
|
|
@@ -1921,16 +1893,16 @@ class ActionsResource(SyncAPIResource):
|
|
|
1921
1893
|
self,
|
|
1922
1894
|
call_control_id: str,
|
|
1923
1895
|
*,
|
|
1924
|
-
client_state: str |
|
|
1925
|
-
command_id: str |
|
|
1926
|
-
direction: Literal["inbound", "outbound", "both"] |
|
|
1927
|
-
noise_suppression_engine: Literal["A", "B"] |
|
|
1896
|
+
client_state: str | Omit = omit,
|
|
1897
|
+
command_id: str | Omit = omit,
|
|
1898
|
+
direction: Literal["inbound", "outbound", "both"] | Omit = omit,
|
|
1899
|
+
noise_suppression_engine: Literal["A", "B"] | Omit = omit,
|
|
1928
1900
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1929
1901
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1930
1902
|
extra_headers: Headers | None = None,
|
|
1931
1903
|
extra_query: Query | None = None,
|
|
1932
1904
|
extra_body: Body | None = None,
|
|
1933
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1905
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1934
1906
|
) -> ActionStartNoiseSuppressionResponse:
|
|
1935
1907
|
"""
|
|
1936
1908
|
Noise Suppression Start (BETA)
|
|
@@ -1978,23 +1950,23 @@ class ActionsResource(SyncAPIResource):
|
|
|
1978
1950
|
self,
|
|
1979
1951
|
call_control_id: str,
|
|
1980
1952
|
*,
|
|
1981
|
-
audio_type: Literal["mp3", "wav"] |
|
|
1982
|
-
audio_url: str |
|
|
1983
|
-
cache_audio: bool |
|
|
1984
|
-
client_state: str |
|
|
1985
|
-
command_id: str |
|
|
1986
|
-
loop: LoopcountParam |
|
|
1987
|
-
media_name: str |
|
|
1988
|
-
overlay: bool |
|
|
1989
|
-
playback_content: str |
|
|
1990
|
-
stop: str |
|
|
1991
|
-
target_legs: str |
|
|
1953
|
+
audio_type: Literal["mp3", "wav"] | Omit = omit,
|
|
1954
|
+
audio_url: str | Omit = omit,
|
|
1955
|
+
cache_audio: bool | Omit = omit,
|
|
1956
|
+
client_state: str | Omit = omit,
|
|
1957
|
+
command_id: str | Omit = omit,
|
|
1958
|
+
loop: LoopcountParam | Omit = omit,
|
|
1959
|
+
media_name: str | Omit = omit,
|
|
1960
|
+
overlay: bool | Omit = omit,
|
|
1961
|
+
playback_content: str | Omit = omit,
|
|
1962
|
+
stop: str | Omit = omit,
|
|
1963
|
+
target_legs: str | Omit = omit,
|
|
1992
1964
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1993
1965
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1994
1966
|
extra_headers: Headers | None = None,
|
|
1995
1967
|
extra_query: Query | None = None,
|
|
1996
1968
|
extra_body: Body | None = None,
|
|
1997
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1969
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1998
1970
|
) -> ActionStartPlaybackResponse:
|
|
1999
1971
|
"""Play an audio file on the call.
|
|
2000
1972
|
|
|
@@ -2007,9 +1979,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2007
1979
|
- A customer cannot Play Audio with `overlay=true` unless there is a Play Audio
|
|
2008
1980
|
with `overlay=false` actively playing.
|
|
2009
1981
|
|
|
2010
|
-
**Expected Webhooks
|
|
2011
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-playback#callbacks)
|
|
2012
|
-
below):**
|
|
1982
|
+
**Expected Webhooks:**
|
|
2013
1983
|
|
|
2014
1984
|
- `call.playback.started`
|
|
2015
1985
|
- `call.playback.ended`
|
|
@@ -2094,15 +2064,15 @@ class ActionsResource(SyncAPIResource):
|
|
|
2094
2064
|
*,
|
|
2095
2065
|
channels: Literal["single", "dual"],
|
|
2096
2066
|
format: Literal["wav", "mp3"],
|
|
2097
|
-
client_state: str |
|
|
2098
|
-
command_id: str |
|
|
2099
|
-
custom_file_name: str |
|
|
2100
|
-
max_length: int |
|
|
2101
|
-
play_beep: bool |
|
|
2102
|
-
recording_track: Literal["both", "inbound", "outbound"] |
|
|
2103
|
-
timeout_secs: int |
|
|
2104
|
-
transcription: bool |
|
|
2105
|
-
transcription_engine: str |
|
|
2067
|
+
client_state: str | Omit = omit,
|
|
2068
|
+
command_id: str | Omit = omit,
|
|
2069
|
+
custom_file_name: str | Omit = omit,
|
|
2070
|
+
max_length: int | Omit = omit,
|
|
2071
|
+
play_beep: bool | Omit = omit,
|
|
2072
|
+
recording_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
2073
|
+
timeout_secs: int | Omit = omit,
|
|
2074
|
+
transcription: bool | Omit = omit,
|
|
2075
|
+
transcription_engine: str | Omit = omit,
|
|
2106
2076
|
transcription_language: Literal[
|
|
2107
2077
|
"af-ZA",
|
|
2108
2078
|
"am-ET",
|
|
@@ -2250,27 +2220,25 @@ class ActionsResource(SyncAPIResource):
|
|
|
2250
2220
|
"zh-TW",
|
|
2251
2221
|
"zu-ZA",
|
|
2252
2222
|
]
|
|
2253
|
-
|
|
|
2254
|
-
transcription_max_speaker_count: int |
|
|
2255
|
-
transcription_min_speaker_count: int |
|
|
2256
|
-
transcription_profanity_filter: bool |
|
|
2257
|
-
transcription_speaker_diarization: bool |
|
|
2258
|
-
trim: Literal["trim-silence"] |
|
|
2223
|
+
| Omit = omit,
|
|
2224
|
+
transcription_max_speaker_count: int | Omit = omit,
|
|
2225
|
+
transcription_min_speaker_count: int | Omit = omit,
|
|
2226
|
+
transcription_profanity_filter: bool | Omit = omit,
|
|
2227
|
+
transcription_speaker_diarization: bool | Omit = omit,
|
|
2228
|
+
trim: Literal["trim-silence"] | Omit = omit,
|
|
2259
2229
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2260
2230
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2261
2231
|
extra_headers: Headers | None = None,
|
|
2262
2232
|
extra_query: Query | None = None,
|
|
2263
2233
|
extra_body: Body | None = None,
|
|
2264
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2234
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2265
2235
|
) -> ActionStartRecordingResponse:
|
|
2266
2236
|
"""Start recording the call.
|
|
2267
2237
|
|
|
2268
2238
|
Recording will stop on call hang-up, or can be
|
|
2269
2239
|
initiated via the Stop Recording command.
|
|
2270
2240
|
|
|
2271
|
-
**Expected Webhooks
|
|
2272
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-record#callbacks)
|
|
2273
|
-
below):**
|
|
2241
|
+
**Expected Webhooks:**
|
|
2274
2242
|
|
|
2275
2243
|
- `call.recording.saved`
|
|
2276
2244
|
- `call.recording.transcription.saved`
|
|
@@ -2369,19 +2337,19 @@ class ActionsResource(SyncAPIResource):
|
|
|
2369
2337
|
self,
|
|
2370
2338
|
call_control_id: str,
|
|
2371
2339
|
*,
|
|
2372
|
-
client_state: str |
|
|
2373
|
-
connector_name: str |
|
|
2374
|
-
include_metadata_custom_headers: Literal[True, False] |
|
|
2375
|
-
secure: Literal[True, False] |
|
|
2376
|
-
session_timeout_secs: int |
|
|
2377
|
-
sip_transport: Literal["udp", "tcp", "tls"] |
|
|
2378
|
-
siprec_track: Literal["inbound_track", "outbound_track", "both_tracks"] |
|
|
2340
|
+
client_state: str | Omit = omit,
|
|
2341
|
+
connector_name: str | Omit = omit,
|
|
2342
|
+
include_metadata_custom_headers: Literal[True, False] | Omit = omit,
|
|
2343
|
+
secure: Literal[True, False] | Omit = omit,
|
|
2344
|
+
session_timeout_secs: int | Omit = omit,
|
|
2345
|
+
sip_transport: Literal["udp", "tcp", "tls"] | Omit = omit,
|
|
2346
|
+
siprec_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
2379
2347
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2380
2348
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2381
2349
|
extra_headers: Headers | None = None,
|
|
2382
2350
|
extra_query: Query | None = None,
|
|
2383
2351
|
extra_body: Body | None = None,
|
|
2384
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2352
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2385
2353
|
) -> ActionStartSiprecResponse:
|
|
2386
2354
|
"""
|
|
2387
2355
|
Start siprec session to configured in SIPREC connector SRS.
|
|
@@ -2447,22 +2415,23 @@ class ActionsResource(SyncAPIResource):
|
|
|
2447
2415
|
self,
|
|
2448
2416
|
call_control_id: str,
|
|
2449
2417
|
*,
|
|
2450
|
-
client_state: str |
|
|
2451
|
-
command_id: str |
|
|
2452
|
-
dialogflow_config: DialogflowConfigParam |
|
|
2453
|
-
enable_dialogflow: bool |
|
|
2454
|
-
stream_bidirectional_codec: StreamBidirectionalCodec |
|
|
2455
|
-
stream_bidirectional_mode: StreamBidirectionalMode |
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2418
|
+
client_state: str | Omit = omit,
|
|
2419
|
+
command_id: str | Omit = omit,
|
|
2420
|
+
dialogflow_config: DialogflowConfigParam | Omit = omit,
|
|
2421
|
+
enable_dialogflow: bool | Omit = omit,
|
|
2422
|
+
stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
|
|
2423
|
+
stream_bidirectional_mode: StreamBidirectionalMode | Omit = omit,
|
|
2424
|
+
stream_bidirectional_sampling_rate: Literal[8000, 16000, 22050, 24000, 48000] | Omit = omit,
|
|
2425
|
+
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs | Omit = omit,
|
|
2426
|
+
stream_codec: StreamCodec | Omit = omit,
|
|
2427
|
+
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
2428
|
+
stream_url: str | Omit = omit,
|
|
2460
2429
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2461
2430
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2462
2431
|
extra_headers: Headers | None = None,
|
|
2463
2432
|
extra_query: Query | None = None,
|
|
2464
2433
|
extra_body: Body | None = None,
|
|
2465
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2434
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2466
2435
|
) -> ActionStartStreamingResponse:
|
|
2467
2436
|
"""
|
|
2468
2437
|
Start streaming the media from a call to a specific WebSocket address or
|
|
@@ -2486,11 +2455,12 @@ class ActionsResource(SyncAPIResource):
|
|
|
2486
2455
|
|
|
2487
2456
|
stream_bidirectional_mode: Configures method of bidirectional streaming (mp3, rtp).
|
|
2488
2457
|
|
|
2458
|
+
stream_bidirectional_sampling_rate: Audio sampling rate.
|
|
2459
|
+
|
|
2489
2460
|
stream_bidirectional_target_legs: Specifies which call legs should receive the bidirectional stream audio.
|
|
2490
2461
|
|
|
2491
2462
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
2492
2463
|
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
2464
|
|
|
2495
2465
|
stream_track: Specifies which track should be streamed.
|
|
2496
2466
|
|
|
@@ -2516,6 +2486,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
2516
2486
|
"enable_dialogflow": enable_dialogflow,
|
|
2517
2487
|
"stream_bidirectional_codec": stream_bidirectional_codec,
|
|
2518
2488
|
"stream_bidirectional_mode": stream_bidirectional_mode,
|
|
2489
|
+
"stream_bidirectional_sampling_rate": stream_bidirectional_sampling_rate,
|
|
2519
2490
|
"stream_bidirectional_target_legs": stream_bidirectional_target_legs,
|
|
2520
2491
|
"stream_codec": stream_codec,
|
|
2521
2492
|
"stream_track": stream_track,
|
|
@@ -2533,26 +2504,24 @@ class ActionsResource(SyncAPIResource):
|
|
|
2533
2504
|
self,
|
|
2534
2505
|
call_control_id: str,
|
|
2535
2506
|
*,
|
|
2536
|
-
client_state: str |
|
|
2537
|
-
command_id: str |
|
|
2538
|
-
transcription_engine: Literal["A", "B"] |
|
|
2539
|
-
transcription_engine_config: action_start_transcription_params.TranscriptionEngineConfig |
|
|
2540
|
-
transcription_tracks: str |
|
|
2507
|
+
client_state: str | Omit = omit,
|
|
2508
|
+
command_id: str | Omit = omit,
|
|
2509
|
+
transcription_engine: Literal["Google", "Telnyx", "Deepgram", "A", "B"] | Omit = omit,
|
|
2510
|
+
transcription_engine_config: action_start_transcription_params.TranscriptionEngineConfig | Omit = omit,
|
|
2511
|
+
transcription_tracks: str | Omit = omit,
|
|
2541
2512
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2542
2513
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2543
2514
|
extra_headers: Headers | None = None,
|
|
2544
2515
|
extra_query: Query | None = None,
|
|
2545
2516
|
extra_body: Body | None = None,
|
|
2546
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2517
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2547
2518
|
) -> ActionStartTranscriptionResponse:
|
|
2548
2519
|
"""Start real-time transcription.
|
|
2549
2520
|
|
|
2550
2521
|
Transcription will stop on call hang-up, or can
|
|
2551
2522
|
be initiated via the Transcription stop command.
|
|
2552
2523
|
|
|
2553
|
-
**Expected Webhooks
|
|
2554
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-transcription#callbacks)
|
|
2555
|
-
below):**
|
|
2524
|
+
**Expected Webhooks:**
|
|
2556
2525
|
|
|
2557
2526
|
- `call.transcription`
|
|
2558
2527
|
|
|
@@ -2563,7 +2532,8 @@ class ActionsResource(SyncAPIResource):
|
|
|
2563
2532
|
command_id: Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
2564
2533
|
the same `command_id` for the same `call_control_id`.
|
|
2565
2534
|
|
|
2566
|
-
transcription_engine: Engine to use for speech recognition. `A` - `Google`, `B` -
|
|
2535
|
+
transcription_engine: Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
2536
|
+
`Telnyx` are supported for backward compatibility.
|
|
2567
2537
|
|
|
2568
2538
|
transcription_tracks: Indicates which leg of the call will be transcribed. Use `inbound` for the leg
|
|
2569
2539
|
that requested the transcription, `outbound` for the other leg, and `both` for
|
|
@@ -2601,14 +2571,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
2601
2571
|
self,
|
|
2602
2572
|
call_control_id: str,
|
|
2603
2573
|
*,
|
|
2604
|
-
client_state: str |
|
|
2605
|
-
command_id: str |
|
|
2574
|
+
client_state: str | Omit = omit,
|
|
2575
|
+
command_id: str | Omit = omit,
|
|
2606
2576
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2607
2577
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2608
2578
|
extra_headers: Headers | None = None,
|
|
2609
2579
|
extra_query: Query | None = None,
|
|
2610
2580
|
extra_body: Body | None = None,
|
|
2611
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2581
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2612
2582
|
) -> ActionStopAIAssistantResponse:
|
|
2613
2583
|
"""
|
|
2614
2584
|
Stop an AI assistant on the call.
|
|
@@ -2649,22 +2619,20 @@ class ActionsResource(SyncAPIResource):
|
|
|
2649
2619
|
self,
|
|
2650
2620
|
call_control_id: str,
|
|
2651
2621
|
*,
|
|
2652
|
-
client_state: str |
|
|
2653
|
-
command_id: str |
|
|
2654
|
-
stream_type: Literal["raw", "decrypted"] |
|
|
2622
|
+
client_state: str | Omit = omit,
|
|
2623
|
+
command_id: str | Omit = omit,
|
|
2624
|
+
stream_type: Literal["raw", "decrypted"] | Omit = omit,
|
|
2655
2625
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2656
2626
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2657
2627
|
extra_headers: Headers | None = None,
|
|
2658
2628
|
extra_query: Query | None = None,
|
|
2659
2629
|
extra_body: Body | None = None,
|
|
2660
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2630
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2661
2631
|
) -> ActionStopForkingResponse:
|
|
2662
2632
|
"""
|
|
2663
2633
|
Stop forking a call.
|
|
2664
2634
|
|
|
2665
|
-
**Expected Webhooks
|
|
2666
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-fork#callbacks)
|
|
2667
|
-
below):**
|
|
2635
|
+
**Expected Webhooks:**
|
|
2668
2636
|
|
|
2669
2637
|
- `call.fork.stopped`
|
|
2670
2638
|
|
|
@@ -2708,21 +2676,19 @@ class ActionsResource(SyncAPIResource):
|
|
|
2708
2676
|
self,
|
|
2709
2677
|
call_control_id: str,
|
|
2710
2678
|
*,
|
|
2711
|
-
client_state: str |
|
|
2712
|
-
command_id: str |
|
|
2679
|
+
client_state: str | Omit = omit,
|
|
2680
|
+
command_id: str | Omit = omit,
|
|
2713
2681
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2714
2682
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2715
2683
|
extra_headers: Headers | None = None,
|
|
2716
2684
|
extra_query: Query | None = None,
|
|
2717
2685
|
extra_body: Body | None = None,
|
|
2718
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2686
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2719
2687
|
) -> ActionStopGatherResponse:
|
|
2720
2688
|
"""
|
|
2721
2689
|
Stop current gather.
|
|
2722
2690
|
|
|
2723
|
-
**Expected Webhooks
|
|
2724
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-gather#callbacks)
|
|
2725
|
-
below):**
|
|
2691
|
+
**Expected Webhooks:**
|
|
2726
2692
|
|
|
2727
2693
|
- `call.gather.ended`
|
|
2728
2694
|
|
|
@@ -2762,14 +2728,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
2762
2728
|
self,
|
|
2763
2729
|
call_control_id: str,
|
|
2764
2730
|
*,
|
|
2765
|
-
client_state: str |
|
|
2766
|
-
command_id: str |
|
|
2731
|
+
client_state: str | Omit = omit,
|
|
2732
|
+
command_id: str | Omit = omit,
|
|
2767
2733
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2768
2734
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2769
2735
|
extra_headers: Headers | None = None,
|
|
2770
2736
|
extra_query: Query | None = None,
|
|
2771
2737
|
extra_body: Body | None = None,
|
|
2772
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2738
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2773
2739
|
) -> ActionStopNoiseSuppressionResponse:
|
|
2774
2740
|
"""
|
|
2775
2741
|
Noise Suppression Stop (BETA)
|
|
@@ -2810,23 +2776,21 @@ class ActionsResource(SyncAPIResource):
|
|
|
2810
2776
|
self,
|
|
2811
2777
|
call_control_id: str,
|
|
2812
2778
|
*,
|
|
2813
|
-
client_state: str |
|
|
2814
|
-
command_id: str |
|
|
2815
|
-
overlay: bool |
|
|
2816
|
-
stop: str |
|
|
2779
|
+
client_state: str | Omit = omit,
|
|
2780
|
+
command_id: str | Omit = omit,
|
|
2781
|
+
overlay: bool | Omit = omit,
|
|
2782
|
+
stop: str | Omit = omit,
|
|
2817
2783
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2818
2784
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2819
2785
|
extra_headers: Headers | None = None,
|
|
2820
2786
|
extra_query: Query | None = None,
|
|
2821
2787
|
extra_body: Body | None = None,
|
|
2822
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2788
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2823
2789
|
) -> ActionStopPlaybackResponse:
|
|
2824
2790
|
"""
|
|
2825
2791
|
Stop audio being played on the call.
|
|
2826
2792
|
|
|
2827
|
-
**Expected Webhooks
|
|
2828
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-playback#callbacks)
|
|
2829
|
-
below):**
|
|
2793
|
+
**Expected Webhooks:**
|
|
2830
2794
|
|
|
2831
2795
|
- `call.playback.ended` or `call.speak.ended`
|
|
2832
2796
|
|
|
@@ -2873,22 +2837,20 @@ class ActionsResource(SyncAPIResource):
|
|
|
2873
2837
|
self,
|
|
2874
2838
|
call_control_id: str,
|
|
2875
2839
|
*,
|
|
2876
|
-
client_state: str |
|
|
2877
|
-
command_id: str |
|
|
2878
|
-
recording_id: str |
|
|
2840
|
+
client_state: str | Omit = omit,
|
|
2841
|
+
command_id: str | Omit = omit,
|
|
2842
|
+
recording_id: str | Omit = omit,
|
|
2879
2843
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2880
2844
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2881
2845
|
extra_headers: Headers | None = None,
|
|
2882
2846
|
extra_query: Query | None = None,
|
|
2883
2847
|
extra_body: Body | None = None,
|
|
2884
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2848
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2885
2849
|
) -> ActionStopRecordingResponse:
|
|
2886
2850
|
"""
|
|
2887
2851
|
Stop recording the call.
|
|
2888
2852
|
|
|
2889
|
-
**Expected Webhooks
|
|
2890
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-recording#callbacks)
|
|
2891
|
-
below):**
|
|
2853
|
+
**Expected Webhooks:**
|
|
2892
2854
|
|
|
2893
2855
|
- `call.recording.saved`
|
|
2894
2856
|
|
|
@@ -2931,14 +2893,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
2931
2893
|
self,
|
|
2932
2894
|
call_control_id: str,
|
|
2933
2895
|
*,
|
|
2934
|
-
client_state: str |
|
|
2935
|
-
command_id: str |
|
|
2896
|
+
client_state: str | Omit = omit,
|
|
2897
|
+
command_id: str | Omit = omit,
|
|
2936
2898
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2937
2899
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2938
2900
|
extra_headers: Headers | None = None,
|
|
2939
2901
|
extra_query: Query | None = None,
|
|
2940
2902
|
extra_body: Body | None = None,
|
|
2941
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2903
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2942
2904
|
) -> ActionStopSiprecResponse:
|
|
2943
2905
|
"""
|
|
2944
2906
|
Stop SIPREC session.
|
|
@@ -2983,22 +2945,20 @@ class ActionsResource(SyncAPIResource):
|
|
|
2983
2945
|
self,
|
|
2984
2946
|
call_control_id: str,
|
|
2985
2947
|
*,
|
|
2986
|
-
client_state: str |
|
|
2987
|
-
command_id: str |
|
|
2988
|
-
stream_id: str |
|
|
2948
|
+
client_state: str | Omit = omit,
|
|
2949
|
+
command_id: str | Omit = omit,
|
|
2950
|
+
stream_id: str | Omit = omit,
|
|
2989
2951
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2990
2952
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2991
2953
|
extra_headers: Headers | None = None,
|
|
2992
2954
|
extra_query: Query | None = None,
|
|
2993
2955
|
extra_body: Body | None = None,
|
|
2994
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
2956
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2995
2957
|
) -> ActionStopStreamingResponse:
|
|
2996
2958
|
"""
|
|
2997
2959
|
Stop streaming a call to a WebSocket.
|
|
2998
2960
|
|
|
2999
|
-
**Expected Webhooks
|
|
3000
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-streaming#callbacks)
|
|
3001
|
-
below):**
|
|
2961
|
+
**Expected Webhooks:**
|
|
3002
2962
|
|
|
3003
2963
|
- `streaming.stopped`
|
|
3004
2964
|
|
|
@@ -3042,14 +3002,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
3042
3002
|
self,
|
|
3043
3003
|
call_control_id: str,
|
|
3044
3004
|
*,
|
|
3045
|
-
client_state: str |
|
|
3046
|
-
command_id: str |
|
|
3005
|
+
client_state: str | Omit = omit,
|
|
3006
|
+
command_id: str | Omit = omit,
|
|
3047
3007
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3048
3008
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3049
3009
|
extra_headers: Headers | None = None,
|
|
3050
3010
|
extra_query: Query | None = None,
|
|
3051
3011
|
extra_body: Body | None = None,
|
|
3052
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3012
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3053
3013
|
) -> ActionStopTranscriptionResponse:
|
|
3054
3014
|
"""
|
|
3055
3015
|
Stop real-time transcription.
|
|
@@ -3096,7 +3056,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
3096
3056
|
extra_headers: Headers | None = None,
|
|
3097
3057
|
extra_query: Query | None = None,
|
|
3098
3058
|
extra_body: Body | None = None,
|
|
3099
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3059
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3100
3060
|
) -> ActionSwitchSupervisorRoleResponse:
|
|
3101
3061
|
"""Switch the supervisor role for a bridged call.
|
|
3102
3062
|
|
|
@@ -3134,36 +3094,43 @@ class ActionsResource(SyncAPIResource):
|
|
|
3134
3094
|
answering_machine_detection: Literal[
|
|
3135
3095
|
"premium", "detect", "detect_beep", "detect_words", "greeting_end", "disabled"
|
|
3136
3096
|
]
|
|
3137
|
-
|
|
|
3138
|
-
answering_machine_detection_config: action_transfer_params.AnsweringMachineDetectionConfig
|
|
3139
|
-
|
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3097
|
+
| Omit = omit,
|
|
3098
|
+
answering_machine_detection_config: action_transfer_params.AnsweringMachineDetectionConfig | Omit = omit,
|
|
3099
|
+
audio_url: str | Omit = omit,
|
|
3100
|
+
client_state: str | Omit = omit,
|
|
3101
|
+
command_id: str | Omit = omit,
|
|
3102
|
+
custom_headers: Iterable[CustomSipHeaderParam] | Omit = omit,
|
|
3103
|
+
early_media: bool | Omit = omit,
|
|
3104
|
+
from_: str | Omit = omit,
|
|
3105
|
+
from_display_name: str | Omit = omit,
|
|
3106
|
+
media_encryption: Literal["disabled", "SRTP", "DTLS"] | Omit = omit,
|
|
3107
|
+
media_name: str | Omit = omit,
|
|
3108
|
+
mute_dtmf: Literal["none", "both", "self", "opposite"] | Omit = omit,
|
|
3109
|
+
park_after_unbridge: str | Omit = omit,
|
|
3110
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
3111
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
3112
|
+
record_custom_file_name: str | Omit = omit,
|
|
3113
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
3114
|
+
record_max_length: int | Omit = omit,
|
|
3115
|
+
record_timeout_secs: int | Omit = omit,
|
|
3116
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
3117
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
3118
|
+
sip_auth_password: str | Omit = omit,
|
|
3119
|
+
sip_auth_username: str | Omit = omit,
|
|
3120
|
+
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
3121
|
+
sip_transport_protocol: Literal["UDP", "TCP", "TLS"] | Omit = omit,
|
|
3122
|
+
sound_modifications: SoundModificationsParam | Omit = omit,
|
|
3123
|
+
target_leg_client_state: str | Omit = omit,
|
|
3124
|
+
time_limit_secs: int | Omit = omit,
|
|
3125
|
+
timeout_secs: int | Omit = omit,
|
|
3126
|
+
webhook_url: str | Omit = omit,
|
|
3127
|
+
webhook_url_method: Literal["POST", "GET"] | Omit = omit,
|
|
3161
3128
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3162
3129
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3163
3130
|
extra_headers: Headers | None = None,
|
|
3164
3131
|
extra_query: Query | None = None,
|
|
3165
3132
|
extra_body: Body | None = None,
|
|
3166
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3133
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3167
3134
|
) -> ActionTransferResponse:
|
|
3168
3135
|
"""Transfer a call to a new destination.
|
|
3169
3136
|
|
|
@@ -3173,9 +3140,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
3173
3140
|
may be issued additional commands, potentially transfering the call to an
|
|
3174
3141
|
alternate destination.
|
|
3175
3142
|
|
|
3176
|
-
**Expected Webhooks
|
|
3177
|
-
[callback schema](https://developers.telnyx.com/api/call-control/transfer-call#callbacks)
|
|
3178
|
-
below):**
|
|
3143
|
+
**Expected Webhooks:**
|
|
3179
3144
|
|
|
3180
3145
|
- `call.initiated`
|
|
3181
3146
|
- `call.bridged` to Leg B
|
|
@@ -3240,6 +3205,33 @@ class ActionsResource(SyncAPIResource):
|
|
|
3240
3205
|
or is transferred). If supplied with the value `self`, the current leg will be
|
|
3241
3206
|
parked after unbridge. If not set, the default behavior is to hang up the leg.
|
|
3242
3207
|
|
|
3208
|
+
record: Start recording automatically after an event. Disabled by default.
|
|
3209
|
+
|
|
3210
|
+
record_channels: Defines which channel should be recorded ('single' or 'dual') when `record` is
|
|
3211
|
+
specified.
|
|
3212
|
+
|
|
3213
|
+
record_custom_file_name: The custom recording file name to be used instead of the default `call_leg_id`.
|
|
3214
|
+
Telnyx will still add a Unix timestamp suffix.
|
|
3215
|
+
|
|
3216
|
+
record_format: Defines the format of the recording ('wav' or 'mp3') when `record` is specified.
|
|
3217
|
+
|
|
3218
|
+
record_max_length: Defines the maximum length for the recording in seconds when `record` is
|
|
3219
|
+
specified. The minimum value is 0. The maximum value is 43200. The default value
|
|
3220
|
+
is 0 (infinite).
|
|
3221
|
+
|
|
3222
|
+
record_timeout_secs: The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
3223
|
+
silence is detected when `record` is specified. The timer only starts when the
|
|
3224
|
+
speech is detected. Please note that call transcription is used to detect
|
|
3225
|
+
silence and the related charge will be applied. The minimum value is 0. The
|
|
3226
|
+
default value is 0 (infinite).
|
|
3227
|
+
|
|
3228
|
+
record_track: The audio track to be recorded. Can be either `both`, `inbound` or `outbound`.
|
|
3229
|
+
If only single track is specified (`inbound`, `outbound`), `channels`
|
|
3230
|
+
configuration is ignored and it will be recorded as mono (single channel).
|
|
3231
|
+
|
|
3232
|
+
record_trim: When set to `trim-silence`, silence will be removed from the beginning and end
|
|
3233
|
+
of the recording.
|
|
3234
|
+
|
|
3243
3235
|
sip_auth_password: SIP Authentication password used for SIP challenges.
|
|
3244
3236
|
|
|
3245
3237
|
sip_auth_username: SIP Authentication username used for SIP challenges.
|
|
@@ -3300,6 +3292,14 @@ class ActionsResource(SyncAPIResource):
|
|
|
3300
3292
|
"media_name": media_name,
|
|
3301
3293
|
"mute_dtmf": mute_dtmf,
|
|
3302
3294
|
"park_after_unbridge": park_after_unbridge,
|
|
3295
|
+
"record": record,
|
|
3296
|
+
"record_channels": record_channels,
|
|
3297
|
+
"record_custom_file_name": record_custom_file_name,
|
|
3298
|
+
"record_format": record_format,
|
|
3299
|
+
"record_max_length": record_max_length,
|
|
3300
|
+
"record_timeout_secs": record_timeout_secs,
|
|
3301
|
+
"record_track": record_track,
|
|
3302
|
+
"record_trim": record_trim,
|
|
3303
3303
|
"sip_auth_password": sip_auth_password,
|
|
3304
3304
|
"sip_auth_username": sip_auth_username,
|
|
3305
3305
|
"sip_headers": sip_headers,
|
|
@@ -3329,7 +3329,7 @@ class ActionsResource(SyncAPIResource):
|
|
|
3329
3329
|
extra_headers: Headers | None = None,
|
|
3330
3330
|
extra_query: Query | None = None,
|
|
3331
3331
|
extra_body: Body | None = None,
|
|
3332
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3332
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3333
3333
|
) -> ActionUpdateClientStateResponse:
|
|
3334
3334
|
"""
|
|
3335
3335
|
Updates client state
|
|
@@ -3384,47 +3384,45 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3384
3384
|
self,
|
|
3385
3385
|
call_control_id: str,
|
|
3386
3386
|
*,
|
|
3387
|
-
billing_group_id: str |
|
|
3388
|
-
client_state: str |
|
|
3389
|
-
command_id: str |
|
|
3390
|
-
custom_headers: Iterable[CustomSipHeaderParam] |
|
|
3391
|
-
preferred_codecs: Literal["G722,PCMU,PCMA,G729,OPUS,VP8,H264"] |
|
|
3392
|
-
record: Literal["record-from-answer"] |
|
|
3393
|
-
record_channels: Literal["single", "dual"] |
|
|
3394
|
-
record_custom_file_name: str |
|
|
3395
|
-
record_format: Literal["wav", "mp3"] |
|
|
3396
|
-
record_max_length: int |
|
|
3397
|
-
record_timeout_secs: int |
|
|
3398
|
-
record_track: Literal["both", "inbound", "outbound"] |
|
|
3399
|
-
record_trim: Literal["trim-silence"] |
|
|
3400
|
-
send_silence_when_idle: bool |
|
|
3401
|
-
sip_headers: Iterable[SipHeaderParam] |
|
|
3402
|
-
sound_modifications: SoundModificationsParam |
|
|
3403
|
-
stream_bidirectional_codec: StreamBidirectionalCodec |
|
|
3404
|
-
stream_bidirectional_mode: StreamBidirectionalMode |
|
|
3405
|
-
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs |
|
|
3406
|
-
stream_codec: StreamCodec |
|
|
3407
|
-
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] |
|
|
3408
|
-
stream_url: str |
|
|
3409
|
-
transcription: bool |
|
|
3410
|
-
transcription_config: TranscriptionStartRequestParam |
|
|
3411
|
-
webhook_url: str |
|
|
3412
|
-
webhook_url_method: Literal["POST", "GET"] |
|
|
3387
|
+
billing_group_id: str | Omit = omit,
|
|
3388
|
+
client_state: str | Omit = omit,
|
|
3389
|
+
command_id: str | Omit = omit,
|
|
3390
|
+
custom_headers: Iterable[CustomSipHeaderParam] | Omit = omit,
|
|
3391
|
+
preferred_codecs: Literal["G722,PCMU,PCMA,G729,OPUS,VP8,H264"] | Omit = omit,
|
|
3392
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
3393
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
3394
|
+
record_custom_file_name: str | Omit = omit,
|
|
3395
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
3396
|
+
record_max_length: int | Omit = omit,
|
|
3397
|
+
record_timeout_secs: int | Omit = omit,
|
|
3398
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
3399
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
3400
|
+
send_silence_when_idle: bool | Omit = omit,
|
|
3401
|
+
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
3402
|
+
sound_modifications: SoundModificationsParam | Omit = omit,
|
|
3403
|
+
stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
|
|
3404
|
+
stream_bidirectional_mode: StreamBidirectionalMode | Omit = omit,
|
|
3405
|
+
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs | Omit = omit,
|
|
3406
|
+
stream_codec: StreamCodec | Omit = omit,
|
|
3407
|
+
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
3408
|
+
stream_url: str | Omit = omit,
|
|
3409
|
+
transcription: bool | Omit = omit,
|
|
3410
|
+
transcription_config: TranscriptionStartRequestParam | Omit = omit,
|
|
3411
|
+
webhook_url: str | Omit = omit,
|
|
3412
|
+
webhook_url_method: Literal["POST", "GET"] | Omit = omit,
|
|
3413
3413
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3414
3414
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3415
3415
|
extra_headers: Headers | None = None,
|
|
3416
3416
|
extra_query: Query | None = None,
|
|
3417
3417
|
extra_body: Body | None = None,
|
|
3418
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3418
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3419
3419
|
) -> ActionAnswerResponse:
|
|
3420
3420
|
"""Answer an incoming call.
|
|
3421
3421
|
|
|
3422
3422
|
You must issue this command before executing subsequent
|
|
3423
3423
|
commands on an incoming call.
|
|
3424
3424
|
|
|
3425
|
-
**Expected Webhooks
|
|
3426
|
-
[callback schema](https://developers.telnyx.com/api/call-control/answer-call#callbacks)
|
|
3427
|
-
below):**
|
|
3425
|
+
**Expected Webhooks:**
|
|
3428
3426
|
|
|
3429
3427
|
- `call.answered`
|
|
3430
3428
|
- `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
@@ -3491,7 +3489,6 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3491
3489
|
|
|
3492
3490
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
3493
3491
|
when transcoding is not possible, the codec from the call will be used.
|
|
3494
|
-
Currently, transcoding is only supported between PCMU and PCMA codecs.
|
|
3495
3492
|
|
|
3496
3493
|
stream_track: Specifies which track should be streamed.
|
|
3497
3494
|
|
|
@@ -3558,20 +3555,20 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3558
3555
|
path_call_control_id: str,
|
|
3559
3556
|
*,
|
|
3560
3557
|
body_call_control_id: str,
|
|
3561
|
-
client_state: str |
|
|
3562
|
-
command_id: str |
|
|
3563
|
-
mute_dtmf: Literal["none", "both", "self", "opposite"] |
|
|
3564
|
-
park_after_unbridge: str |
|
|
3565
|
-
play_ringtone: bool |
|
|
3566
|
-
queue: str |
|
|
3567
|
-
record: Literal["record-from-answer"] |
|
|
3568
|
-
record_channels: Literal["single", "dual"] |
|
|
3569
|
-
record_custom_file_name: str |
|
|
3570
|
-
record_format: Literal["wav", "mp3"] |
|
|
3571
|
-
record_max_length: int |
|
|
3572
|
-
record_timeout_secs: int |
|
|
3573
|
-
record_track: Literal["both", "inbound", "outbound"] |
|
|
3574
|
-
record_trim: Literal["trim-silence"] |
|
|
3558
|
+
client_state: str | Omit = omit,
|
|
3559
|
+
command_id: str | Omit = omit,
|
|
3560
|
+
mute_dtmf: Literal["none", "both", "self", "opposite"] | Omit = omit,
|
|
3561
|
+
park_after_unbridge: str | Omit = omit,
|
|
3562
|
+
play_ringtone: bool | Omit = omit,
|
|
3563
|
+
queue: str | Omit = omit,
|
|
3564
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
3565
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
3566
|
+
record_custom_file_name: str | Omit = omit,
|
|
3567
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
3568
|
+
record_max_length: int | Omit = omit,
|
|
3569
|
+
record_timeout_secs: int | Omit = omit,
|
|
3570
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
3571
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
3575
3572
|
ringtone: Literal[
|
|
3576
3573
|
"at",
|
|
3577
3574
|
"au",
|
|
@@ -3614,22 +3611,20 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3614
3611
|
"ve",
|
|
3615
3612
|
"za",
|
|
3616
3613
|
]
|
|
3617
|
-
|
|
|
3618
|
-
video_room_context: str |
|
|
3619
|
-
video_room_id: str |
|
|
3614
|
+
| Omit = omit,
|
|
3615
|
+
video_room_context: str | Omit = omit,
|
|
3616
|
+
video_room_id: str | Omit = omit,
|
|
3620
3617
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3621
3618
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3622
3619
|
extra_headers: Headers | None = None,
|
|
3623
3620
|
extra_query: Query | None = None,
|
|
3624
3621
|
extra_body: Body | None = None,
|
|
3625
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3622
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3626
3623
|
) -> ActionBridgeResponse:
|
|
3627
3624
|
"""
|
|
3628
3625
|
Bridge two call control calls.
|
|
3629
3626
|
|
|
3630
|
-
**Expected Webhooks
|
|
3631
|
-
[callback schema](https://developers.telnyx.com/api/call-control/bridge-call#callbacks)
|
|
3632
|
-
below):**
|
|
3627
|
+
**Expected Webhooks:**
|
|
3633
3628
|
|
|
3634
3629
|
- `call.bridged` for Leg A
|
|
3635
3630
|
- `call.bridged` for Leg B
|
|
@@ -3746,16 +3741,16 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3746
3741
|
call_control_id: str,
|
|
3747
3742
|
*,
|
|
3748
3743
|
queue_name: str,
|
|
3749
|
-
client_state: str |
|
|
3750
|
-
command_id: str |
|
|
3751
|
-
max_size: int |
|
|
3752
|
-
max_wait_time_secs: int |
|
|
3744
|
+
client_state: str | Omit = omit,
|
|
3745
|
+
command_id: str | Omit = omit,
|
|
3746
|
+
max_size: int | Omit = omit,
|
|
3747
|
+
max_wait_time_secs: int | Omit = omit,
|
|
3753
3748
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3754
3749
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3755
3750
|
extra_headers: Headers | None = None,
|
|
3756
3751
|
extra_query: Query | None = None,
|
|
3757
3752
|
extra_body: Body | None = None,
|
|
3758
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3753
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3759
3754
|
) -> ActionEnqueueResponse:
|
|
3760
3755
|
"""
|
|
3761
3756
|
Put the call in a queue.
|
|
@@ -3807,22 +3802,22 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3807
3802
|
self,
|
|
3808
3803
|
call_control_id: str,
|
|
3809
3804
|
*,
|
|
3810
|
-
client_state: str |
|
|
3811
|
-
command_id: str |
|
|
3812
|
-
gather_id: str |
|
|
3813
|
-
initial_timeout_millis: int |
|
|
3814
|
-
inter_digit_timeout_millis: int |
|
|
3815
|
-
maximum_digits: int |
|
|
3816
|
-
minimum_digits: int |
|
|
3817
|
-
terminating_digit: str |
|
|
3818
|
-
timeout_millis: int |
|
|
3819
|
-
valid_digits: str |
|
|
3805
|
+
client_state: str | Omit = omit,
|
|
3806
|
+
command_id: str | Omit = omit,
|
|
3807
|
+
gather_id: str | Omit = omit,
|
|
3808
|
+
initial_timeout_millis: int | Omit = omit,
|
|
3809
|
+
inter_digit_timeout_millis: int | Omit = omit,
|
|
3810
|
+
maximum_digits: int | Omit = omit,
|
|
3811
|
+
minimum_digits: int | Omit = omit,
|
|
3812
|
+
terminating_digit: str | Omit = omit,
|
|
3813
|
+
timeout_millis: int | Omit = omit,
|
|
3814
|
+
valid_digits: str | Omit = omit,
|
|
3820
3815
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3821
3816
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3822
3817
|
extra_headers: Headers | None = None,
|
|
3823
3818
|
extra_query: Query | None = None,
|
|
3824
3819
|
extra_body: Body | None = None,
|
|
3825
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3820
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3826
3821
|
) -> ActionGatherResponse:
|
|
3827
3822
|
"""
|
|
3828
3823
|
Gather DTMF signals to build interactive menus.
|
|
@@ -3830,9 +3825,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3830
3825
|
You can pass a list of valid digits. The `Answer` command must be issued before
|
|
3831
3826
|
the `gather` command.
|
|
3832
3827
|
|
|
3833
|
-
**Expected Webhooks
|
|
3834
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-call#callbacks)
|
|
3835
|
-
below):**
|
|
3828
|
+
**Expected Webhooks:**
|
|
3836
3829
|
|
|
3837
3830
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
3838
3831
|
- `call.gather.ended`
|
|
@@ -3901,25 +3894,25 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3901
3894
|
call_control_id: str,
|
|
3902
3895
|
*,
|
|
3903
3896
|
parameters: object,
|
|
3904
|
-
assistant: AssistantParam |
|
|
3905
|
-
client_state: str |
|
|
3906
|
-
command_id: str |
|
|
3907
|
-
greeting: str |
|
|
3908
|
-
interruption_settings: InterruptionSettingsParam |
|
|
3909
|
-
language: GoogleTranscriptionLanguage |
|
|
3910
|
-
message_history: Iterable[action_gather_using_ai_params.MessageHistory] |
|
|
3911
|
-
send_message_history_updates: bool |
|
|
3912
|
-
send_partial_results: bool |
|
|
3913
|
-
transcription: TranscriptionConfigParam |
|
|
3914
|
-
user_response_timeout_ms: int |
|
|
3915
|
-
voice: str |
|
|
3916
|
-
voice_settings: action_gather_using_ai_params.VoiceSettings |
|
|
3897
|
+
assistant: AssistantParam | Omit = omit,
|
|
3898
|
+
client_state: str | Omit = omit,
|
|
3899
|
+
command_id: str | Omit = omit,
|
|
3900
|
+
greeting: str | Omit = omit,
|
|
3901
|
+
interruption_settings: InterruptionSettingsParam | Omit = omit,
|
|
3902
|
+
language: GoogleTranscriptionLanguage | Omit = omit,
|
|
3903
|
+
message_history: Iterable[action_gather_using_ai_params.MessageHistory] | Omit = omit,
|
|
3904
|
+
send_message_history_updates: bool | Omit = omit,
|
|
3905
|
+
send_partial_results: bool | Omit = omit,
|
|
3906
|
+
transcription: TranscriptionConfigParam | Omit = omit,
|
|
3907
|
+
user_response_timeout_ms: int | Omit = omit,
|
|
3908
|
+
voice: str | Omit = omit,
|
|
3909
|
+
voice_settings: action_gather_using_ai_params.VoiceSettings | Omit = omit,
|
|
3917
3910
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
3918
3911
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
3919
3912
|
extra_headers: Headers | None = None,
|
|
3920
3913
|
extra_query: Query | None = None,
|
|
3921
3914
|
extra_body: Body | None = None,
|
|
3922
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
3915
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
3923
3916
|
) -> ActionGatherUsingAIResponse:
|
|
3924
3917
|
"""
|
|
3925
3918
|
Gather parameters defined in the request payload using a voice assistant.
|
|
@@ -3927,9 +3920,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3927
3920
|
You can pass parameters described as a JSON Schema object and the voice
|
|
3928
3921
|
assistant will attempt to gather these informations.
|
|
3929
3922
|
|
|
3930
|
-
**Expected Webhooks
|
|
3931
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-gather-using-ai#callbacks)
|
|
3932
|
-
below):**
|
|
3923
|
+
**Expected Webhooks:**
|
|
3933
3924
|
|
|
3934
3925
|
- `call.ai_gather.ended`
|
|
3935
3926
|
- `call.conversation.ended`
|
|
@@ -3964,16 +3955,13 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
3964
3955
|
information to the voice assistant.
|
|
3965
3956
|
|
|
3966
3957
|
send_message_history_updates: Default is `false`. If set to `true`, the voice assistant will send updates to
|
|
3967
|
-
the message history via the `call.ai_gather.message_history_updated`
|
|
3968
|
-
|
|
3969
|
-
in real time as the message history is updated.
|
|
3958
|
+
the message history via the `call.ai_gather.message_history_updated` callback in
|
|
3959
|
+
real time as the message history is updated.
|
|
3970
3960
|
|
|
3971
3961
|
send_partial_results: Default is `false`. If set to `true`, the voice assistant will send partial
|
|
3972
|
-
results via the `call.ai_gather.partial_results`
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
assistant will only send the final result via the `call.ai_gather.ended`
|
|
3976
|
-
callback.
|
|
3962
|
+
results via the `call.ai_gather.partial_results` callback in real time as
|
|
3963
|
+
individual fields are gathered. If set to `false`, the voice assistant will only
|
|
3964
|
+
send the final result via the `call.ai_gather.ended` callback.
|
|
3977
3965
|
|
|
3978
3966
|
transcription: The settings associated with speech to text for the voice assistant. This is
|
|
3979
3967
|
only relevant if the assistant uses a text-to-text language model. Any assistant
|
|
@@ -4049,25 +4037,25 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4049
4037
|
self,
|
|
4050
4038
|
call_control_id: str,
|
|
4051
4039
|
*,
|
|
4052
|
-
audio_url: str |
|
|
4053
|
-
client_state: str |
|
|
4054
|
-
command_id: str |
|
|
4055
|
-
inter_digit_timeout_millis: int |
|
|
4056
|
-
invalid_audio_url: str |
|
|
4057
|
-
invalid_media_name: str |
|
|
4058
|
-
maximum_digits: int |
|
|
4059
|
-
maximum_tries: int |
|
|
4060
|
-
media_name: str |
|
|
4061
|
-
minimum_digits: int |
|
|
4062
|
-
terminating_digit: str |
|
|
4063
|
-
timeout_millis: int |
|
|
4064
|
-
valid_digits: str |
|
|
4040
|
+
audio_url: str | Omit = omit,
|
|
4041
|
+
client_state: str | Omit = omit,
|
|
4042
|
+
command_id: str | Omit = omit,
|
|
4043
|
+
inter_digit_timeout_millis: int | Omit = omit,
|
|
4044
|
+
invalid_audio_url: str | Omit = omit,
|
|
4045
|
+
invalid_media_name: str | Omit = omit,
|
|
4046
|
+
maximum_digits: int | Omit = omit,
|
|
4047
|
+
maximum_tries: int | Omit = omit,
|
|
4048
|
+
media_name: str | Omit = omit,
|
|
4049
|
+
minimum_digits: int | Omit = omit,
|
|
4050
|
+
terminating_digit: str | Omit = omit,
|
|
4051
|
+
timeout_millis: int | Omit = omit,
|
|
4052
|
+
valid_digits: str | Omit = omit,
|
|
4065
4053
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4066
4054
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4067
4055
|
extra_headers: Headers | None = None,
|
|
4068
4056
|
extra_query: Query | None = None,
|
|
4069
4057
|
extra_body: Body | None = None,
|
|
4070
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4058
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4071
4059
|
) -> ActionGatherUsingAudioResponse:
|
|
4072
4060
|
"""
|
|
4073
4061
|
Play an audio file on the call until the required DTMF signals are gathered to
|
|
@@ -4078,9 +4066,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4078
4066
|
interrupted when a DTMF signal is received. The
|
|
4079
4067
|
`Answer command must be issued before the `gather_using_audio` command.
|
|
4080
4068
|
|
|
4081
|
-
**Expected Webhooks
|
|
4082
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-audio#callbacks)
|
|
4083
|
-
below):**
|
|
4069
|
+
**Expected Webhooks:**
|
|
4084
4070
|
|
|
4085
4071
|
- `call.playback.started`
|
|
4086
4072
|
- `call.playback.ended`
|
|
@@ -4173,10 +4159,10 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4173
4159
|
*,
|
|
4174
4160
|
payload: str,
|
|
4175
4161
|
voice: str,
|
|
4176
|
-
client_state: str |
|
|
4177
|
-
command_id: str |
|
|
4178
|
-
inter_digit_timeout_millis: int |
|
|
4179
|
-
invalid_payload: str |
|
|
4162
|
+
client_state: str | Omit = omit,
|
|
4163
|
+
command_id: str | Omit = omit,
|
|
4164
|
+
inter_digit_timeout_millis: int | Omit = omit,
|
|
4165
|
+
invalid_payload: str | Omit = omit,
|
|
4180
4166
|
language: Literal[
|
|
4181
4167
|
"arb",
|
|
4182
4168
|
"cmn-CN",
|
|
@@ -4208,22 +4194,22 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4208
4194
|
"sv-SE",
|
|
4209
4195
|
"tr-TR",
|
|
4210
4196
|
]
|
|
4211
|
-
|
|
|
4212
|
-
maximum_digits: int |
|
|
4213
|
-
maximum_tries: int |
|
|
4214
|
-
minimum_digits: int |
|
|
4215
|
-
payload_type: Literal["text", "ssml"] |
|
|
4216
|
-
service_level: Literal["basic", "premium"] |
|
|
4217
|
-
terminating_digit: str |
|
|
4218
|
-
timeout_millis: int |
|
|
4219
|
-
valid_digits: str |
|
|
4220
|
-
voice_settings: action_gather_using_speak_params.VoiceSettings |
|
|
4197
|
+
| Omit = omit,
|
|
4198
|
+
maximum_digits: int | Omit = omit,
|
|
4199
|
+
maximum_tries: int | Omit = omit,
|
|
4200
|
+
minimum_digits: int | Omit = omit,
|
|
4201
|
+
payload_type: Literal["text", "ssml"] | Omit = omit,
|
|
4202
|
+
service_level: Literal["basic", "premium"] | Omit = omit,
|
|
4203
|
+
terminating_digit: str | Omit = omit,
|
|
4204
|
+
timeout_millis: int | Omit = omit,
|
|
4205
|
+
valid_digits: str | Omit = omit,
|
|
4206
|
+
voice_settings: action_gather_using_speak_params.VoiceSettings | Omit = omit,
|
|
4221
4207
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4222
4208
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4223
4209
|
extra_headers: Headers | None = None,
|
|
4224
4210
|
extra_query: Query | None = None,
|
|
4225
4211
|
extra_body: Body | None = None,
|
|
4226
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4212
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4227
4213
|
) -> ActionGatherUsingSpeakResponse:
|
|
4228
4214
|
"""
|
|
4229
4215
|
Convert text to speech and play it on the call until the required DTMF signals
|
|
@@ -4234,9 +4220,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4234
4220
|
a DTMF signal is received. The `Answer` command must be issued before the
|
|
4235
4221
|
`gather_using_speak` command.
|
|
4236
4222
|
|
|
4237
|
-
**Expected Webhooks
|
|
4238
|
-
[callback schema](https://developers.telnyx.com/api/call-control/gather-using-speak#callbacks)
|
|
4239
|
-
below):**
|
|
4223
|
+
**Expected Webhooks:**
|
|
4240
4224
|
|
|
4241
4225
|
- `call.dtmf.received` (you may receive many of these webhooks)
|
|
4242
4226
|
- `call.gather.ended`
|
|
@@ -4355,21 +4339,19 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4355
4339
|
self,
|
|
4356
4340
|
call_control_id: str,
|
|
4357
4341
|
*,
|
|
4358
|
-
client_state: str |
|
|
4359
|
-
command_id: str |
|
|
4342
|
+
client_state: str | Omit = omit,
|
|
4343
|
+
command_id: str | Omit = omit,
|
|
4360
4344
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4361
4345
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4362
4346
|
extra_headers: Headers | None = None,
|
|
4363
4347
|
extra_query: Query | None = None,
|
|
4364
4348
|
extra_body: Body | None = None,
|
|
4365
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4349
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4366
4350
|
) -> ActionHangupResponse:
|
|
4367
4351
|
"""
|
|
4368
4352
|
Hang up the call.
|
|
4369
4353
|
|
|
4370
|
-
**Expected Webhooks
|
|
4371
|
-
[callback schema](https://developers.telnyx.com/api/call-control/hangup-call#callbacks)
|
|
4372
|
-
below):**
|
|
4354
|
+
**Expected Webhooks:**
|
|
4373
4355
|
|
|
4374
4356
|
- `call.hangup`
|
|
4375
4357
|
- `call.recording.saved`
|
|
@@ -4410,14 +4392,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4410
4392
|
self,
|
|
4411
4393
|
call_control_id: str,
|
|
4412
4394
|
*,
|
|
4413
|
-
client_state: str |
|
|
4414
|
-
command_id: str |
|
|
4395
|
+
client_state: str | Omit = omit,
|
|
4396
|
+
command_id: str | Omit = omit,
|
|
4415
4397
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4416
4398
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4417
4399
|
extra_headers: Headers | None = None,
|
|
4418
4400
|
extra_query: Query | None = None,
|
|
4419
4401
|
extra_body: Body | None = None,
|
|
4420
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4402
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4421
4403
|
) -> ActionLeaveQueueResponse:
|
|
4422
4404
|
"""
|
|
4423
4405
|
Removes the call from a queue.
|
|
@@ -4458,15 +4440,15 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4458
4440
|
self,
|
|
4459
4441
|
call_control_id: str,
|
|
4460
4442
|
*,
|
|
4461
|
-
client_state: str |
|
|
4462
|
-
command_id: str |
|
|
4463
|
-
recording_id: str |
|
|
4443
|
+
client_state: str | Omit = omit,
|
|
4444
|
+
command_id: str | Omit = omit,
|
|
4445
|
+
recording_id: str | Omit = omit,
|
|
4464
4446
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4465
4447
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4466
4448
|
extra_headers: Headers | None = None,
|
|
4467
4449
|
extra_query: Query | None = None,
|
|
4468
4450
|
extra_body: Body | None = None,
|
|
4469
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4451
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4470
4452
|
) -> ActionPauseRecordingResponse:
|
|
4471
4453
|
"""Pause recording the call.
|
|
4472
4454
|
|
|
@@ -4516,27 +4498,25 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4516
4498
|
call_control_id: str,
|
|
4517
4499
|
*,
|
|
4518
4500
|
sip_address: str,
|
|
4519
|
-
client_state: str |
|
|
4520
|
-
command_id: str |
|
|
4521
|
-
custom_headers: Iterable[CustomSipHeaderParam] |
|
|
4522
|
-
sip_auth_password: str |
|
|
4523
|
-
sip_auth_username: str |
|
|
4524
|
-
sip_headers: Iterable[SipHeaderParam] |
|
|
4501
|
+
client_state: str | Omit = omit,
|
|
4502
|
+
command_id: str | Omit = omit,
|
|
4503
|
+
custom_headers: Iterable[CustomSipHeaderParam] | Omit = omit,
|
|
4504
|
+
sip_auth_password: str | Omit = omit,
|
|
4505
|
+
sip_auth_username: str | Omit = omit,
|
|
4506
|
+
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
4525
4507
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4526
4508
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4527
4509
|
extra_headers: Headers | None = None,
|
|
4528
4510
|
extra_query: Query | None = None,
|
|
4529
4511
|
extra_body: Body | None = None,
|
|
4530
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4512
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4531
4513
|
) -> ActionReferResponse:
|
|
4532
4514
|
"""Initiate a SIP Refer on a Call Control call.
|
|
4533
4515
|
|
|
4534
4516
|
You can initiate a SIP Refer at any
|
|
4535
4517
|
point in the duration of a call.
|
|
4536
4518
|
|
|
4537
|
-
**Expected Webhooks
|
|
4538
|
-
[callback schema](https://developers.telnyx.com/api/call-control/refer-call#callbacks)
|
|
4539
|
-
below):**
|
|
4519
|
+
**Expected Webhooks:**
|
|
4540
4520
|
|
|
4541
4521
|
- `call.refer.started`
|
|
4542
4522
|
- `call.refer.completed`
|
|
@@ -4596,21 +4576,19 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4596
4576
|
call_control_id: str,
|
|
4597
4577
|
*,
|
|
4598
4578
|
cause: Literal["CALL_REJECTED", "USER_BUSY"],
|
|
4599
|
-
client_state: str |
|
|
4600
|
-
command_id: str |
|
|
4579
|
+
client_state: str | Omit = omit,
|
|
4580
|
+
command_id: str | Omit = omit,
|
|
4601
4581
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4602
4582
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4603
4583
|
extra_headers: Headers | None = None,
|
|
4604
4584
|
extra_query: Query | None = None,
|
|
4605
4585
|
extra_body: Body | None = None,
|
|
4606
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4586
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4607
4587
|
) -> ActionRejectResponse:
|
|
4608
4588
|
"""
|
|
4609
4589
|
Reject an incoming call.
|
|
4610
4590
|
|
|
4611
|
-
**Expected Webhooks
|
|
4612
|
-
[callback schema](https://developers.telnyx.com/api/call-control/reject-call#callbacks)
|
|
4613
|
-
below):**
|
|
4591
|
+
**Expected Webhooks:**
|
|
4614
4592
|
|
|
4615
4593
|
- `call.hangup`
|
|
4616
4594
|
|
|
@@ -4653,15 +4631,15 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4653
4631
|
self,
|
|
4654
4632
|
call_control_id: str,
|
|
4655
4633
|
*,
|
|
4656
|
-
client_state: str |
|
|
4657
|
-
command_id: str |
|
|
4658
|
-
recording_id: str |
|
|
4634
|
+
client_state: str | Omit = omit,
|
|
4635
|
+
command_id: str | Omit = omit,
|
|
4636
|
+
recording_id: str | Omit = omit,
|
|
4659
4637
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4660
4638
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4661
4639
|
extra_headers: Headers | None = None,
|
|
4662
4640
|
extra_query: Query | None = None,
|
|
4663
4641
|
extra_body: Body | None = None,
|
|
4664
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4642
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4665
4643
|
) -> ActionResumeRecordingResponse:
|
|
4666
4644
|
"""
|
|
4667
4645
|
Resume recording the call.
|
|
@@ -4710,15 +4688,15 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4710
4688
|
call_control_id: str,
|
|
4711
4689
|
*,
|
|
4712
4690
|
digits: str,
|
|
4713
|
-
client_state: str |
|
|
4714
|
-
command_id: str |
|
|
4715
|
-
duration_millis: int |
|
|
4691
|
+
client_state: str | Omit = omit,
|
|
4692
|
+
command_id: str | Omit = omit,
|
|
4693
|
+
duration_millis: int | Omit = omit,
|
|
4716
4694
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4717
4695
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4718
4696
|
extra_headers: Headers | None = None,
|
|
4719
4697
|
extra_query: Query | None = None,
|
|
4720
4698
|
extra_body: Body | None = None,
|
|
4721
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4699
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4722
4700
|
) -> ActionSendDtmfResponse:
|
|
4723
4701
|
"""Sends DTMF tones from this leg.
|
|
4724
4702
|
|
|
@@ -4775,14 +4753,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4775
4753
|
*,
|
|
4776
4754
|
body: str,
|
|
4777
4755
|
content_type: str,
|
|
4778
|
-
client_state: str |
|
|
4779
|
-
command_id: str |
|
|
4756
|
+
client_state: str | Omit = omit,
|
|
4757
|
+
command_id: str | Omit = omit,
|
|
4780
4758
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4781
4759
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4782
4760
|
extra_headers: Headers | None = None,
|
|
4783
4761
|
extra_query: Query | None = None,
|
|
4784
4762
|
extra_body: Body | None = None,
|
|
4785
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4763
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4786
4764
|
) -> ActionSendSipInfoResponse:
|
|
4787
4765
|
"""
|
|
4788
4766
|
Sends SIP info from this leg.
|
|
@@ -4836,8 +4814,8 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4836
4814
|
*,
|
|
4837
4815
|
payload: str,
|
|
4838
4816
|
voice: str,
|
|
4839
|
-
client_state: str |
|
|
4840
|
-
command_id: str |
|
|
4817
|
+
client_state: str | Omit = omit,
|
|
4818
|
+
command_id: str | Omit = omit,
|
|
4841
4819
|
language: Literal[
|
|
4842
4820
|
"arb",
|
|
4843
4821
|
"cmn-CN",
|
|
@@ -4869,17 +4847,17 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4869
4847
|
"sv-SE",
|
|
4870
4848
|
"tr-TR",
|
|
4871
4849
|
]
|
|
4872
|
-
|
|
|
4873
|
-
payload_type: Literal["text", "ssml"] |
|
|
4874
|
-
service_level: Literal["basic", "premium"] |
|
|
4875
|
-
stop: str |
|
|
4876
|
-
voice_settings: action_speak_params.VoiceSettings |
|
|
4850
|
+
| Omit = omit,
|
|
4851
|
+
payload_type: Literal["text", "ssml"] | Omit = omit,
|
|
4852
|
+
service_level: Literal["basic", "premium"] | Omit = omit,
|
|
4853
|
+
stop: str | Omit = omit,
|
|
4854
|
+
voice_settings: action_speak_params.VoiceSettings | Omit = omit,
|
|
4877
4855
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4878
4856
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4879
4857
|
extra_headers: Headers | None = None,
|
|
4880
4858
|
extra_query: Query | None = None,
|
|
4881
4859
|
extra_body: Body | None = None,
|
|
4882
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4860
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
4883
4861
|
) -> ActionSpeakResponse:
|
|
4884
4862
|
"""Convert text to speech and play it back on the call.
|
|
4885
4863
|
|
|
@@ -4887,9 +4865,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4887
4865
|
commands are issued consecutively, the audio files will be placed in a queue
|
|
4888
4866
|
awaiting playback.
|
|
4889
4867
|
|
|
4890
|
-
**Expected Webhooks
|
|
4891
|
-
[callback schema](https://developers.telnyx.com/api/call-control/speak-call#callbacks)
|
|
4892
|
-
below):**
|
|
4868
|
+
**Expected Webhooks:**
|
|
4893
4869
|
|
|
4894
4870
|
- `call.speak.started`
|
|
4895
4871
|
- `call.speak.ended`
|
|
@@ -4984,27 +4960,25 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
4984
4960
|
self,
|
|
4985
4961
|
call_control_id: str,
|
|
4986
4962
|
*,
|
|
4987
|
-
assistant: action_start_ai_assistant_params.Assistant |
|
|
4988
|
-
client_state: str |
|
|
4989
|
-
command_id: str |
|
|
4990
|
-
greeting: str |
|
|
4991
|
-
interruption_settings: InterruptionSettingsParam |
|
|
4992
|
-
transcription: TranscriptionConfigParam |
|
|
4993
|
-
voice: str |
|
|
4994
|
-
voice_settings: action_start_ai_assistant_params.VoiceSettings |
|
|
4963
|
+
assistant: action_start_ai_assistant_params.Assistant | Omit = omit,
|
|
4964
|
+
client_state: str | Omit = omit,
|
|
4965
|
+
command_id: str | Omit = omit,
|
|
4966
|
+
greeting: str | Omit = omit,
|
|
4967
|
+
interruption_settings: InterruptionSettingsParam | Omit = omit,
|
|
4968
|
+
transcription: TranscriptionConfigParam | Omit = omit,
|
|
4969
|
+
voice: str | Omit = omit,
|
|
4970
|
+
voice_settings: action_start_ai_assistant_params.VoiceSettings | Omit = omit,
|
|
4995
4971
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
4996
4972
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
4997
4973
|
extra_headers: Headers | None = None,
|
|
4998
4974
|
extra_query: Query | None = None,
|
|
4999
4975
|
extra_body: Body | None = None,
|
|
5000
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
4976
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5001
4977
|
) -> ActionStartAIAssistantResponse:
|
|
5002
4978
|
"""
|
|
5003
4979
|
Start an AI assistant on the call.
|
|
5004
4980
|
|
|
5005
|
-
**Expected Webhooks
|
|
5006
|
-
[callback schema](https://developers.telnyx.com/api/call-control/call-start-ai-assistant#callbacks)
|
|
5007
|
-
below):**
|
|
4981
|
+
**Expected Webhooks:**
|
|
5008
4982
|
|
|
5009
4983
|
- `call.conversation.ended`
|
|
5010
4984
|
- `call.conversation_insights.generated`
|
|
@@ -5089,17 +5063,17 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5089
5063
|
self,
|
|
5090
5064
|
call_control_id: str,
|
|
5091
5065
|
*,
|
|
5092
|
-
client_state: str |
|
|
5093
|
-
command_id: str |
|
|
5094
|
-
rx: str |
|
|
5095
|
-
stream_type: Literal["decrypted"] |
|
|
5096
|
-
tx: str |
|
|
5066
|
+
client_state: str | Omit = omit,
|
|
5067
|
+
command_id: str | Omit = omit,
|
|
5068
|
+
rx: str | Omit = omit,
|
|
5069
|
+
stream_type: Literal["decrypted"] | Omit = omit,
|
|
5070
|
+
tx: str | Omit = omit,
|
|
5097
5071
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5098
5072
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5099
5073
|
extra_headers: Headers | None = None,
|
|
5100
5074
|
extra_query: Query | None = None,
|
|
5101
5075
|
extra_body: Body | None = None,
|
|
5102
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5076
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5103
5077
|
) -> ActionStartForkingResponse:
|
|
5104
5078
|
"""
|
|
5105
5079
|
Call forking allows you to stream the media from a call to a specific target in
|
|
@@ -5108,9 +5082,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5108
5082
|
audio responses. Requests must specify either the `target` attribute or the `rx`
|
|
5109
5083
|
and `tx` attributes.
|
|
5110
5084
|
|
|
5111
|
-
**Expected Webhooks
|
|
5112
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-fork#callbacks)
|
|
5113
|
-
below):**
|
|
5085
|
+
**Expected Webhooks:**
|
|
5114
5086
|
|
|
5115
5087
|
- `call.fork.started`
|
|
5116
5088
|
- `call.fork.stopped`
|
|
@@ -5164,16 +5136,16 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5164
5136
|
self,
|
|
5165
5137
|
call_control_id: str,
|
|
5166
5138
|
*,
|
|
5167
|
-
client_state: str |
|
|
5168
|
-
command_id: str |
|
|
5169
|
-
direction: Literal["inbound", "outbound", "both"] |
|
|
5170
|
-
noise_suppression_engine: Literal["A", "B"] |
|
|
5139
|
+
client_state: str | Omit = omit,
|
|
5140
|
+
command_id: str | Omit = omit,
|
|
5141
|
+
direction: Literal["inbound", "outbound", "both"] | Omit = omit,
|
|
5142
|
+
noise_suppression_engine: Literal["A", "B"] | Omit = omit,
|
|
5171
5143
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5172
5144
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5173
5145
|
extra_headers: Headers | None = None,
|
|
5174
5146
|
extra_query: Query | None = None,
|
|
5175
5147
|
extra_body: Body | None = None,
|
|
5176
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5148
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5177
5149
|
) -> ActionStartNoiseSuppressionResponse:
|
|
5178
5150
|
"""
|
|
5179
5151
|
Noise Suppression Start (BETA)
|
|
@@ -5221,23 +5193,23 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5221
5193
|
self,
|
|
5222
5194
|
call_control_id: str,
|
|
5223
5195
|
*,
|
|
5224
|
-
audio_type: Literal["mp3", "wav"] |
|
|
5225
|
-
audio_url: str |
|
|
5226
|
-
cache_audio: bool |
|
|
5227
|
-
client_state: str |
|
|
5228
|
-
command_id: str |
|
|
5229
|
-
loop: LoopcountParam |
|
|
5230
|
-
media_name: str |
|
|
5231
|
-
overlay: bool |
|
|
5232
|
-
playback_content: str |
|
|
5233
|
-
stop: str |
|
|
5234
|
-
target_legs: str |
|
|
5196
|
+
audio_type: Literal["mp3", "wav"] | Omit = omit,
|
|
5197
|
+
audio_url: str | Omit = omit,
|
|
5198
|
+
cache_audio: bool | Omit = omit,
|
|
5199
|
+
client_state: str | Omit = omit,
|
|
5200
|
+
command_id: str | Omit = omit,
|
|
5201
|
+
loop: LoopcountParam | Omit = omit,
|
|
5202
|
+
media_name: str | Omit = omit,
|
|
5203
|
+
overlay: bool | Omit = omit,
|
|
5204
|
+
playback_content: str | Omit = omit,
|
|
5205
|
+
stop: str | Omit = omit,
|
|
5206
|
+
target_legs: str | Omit = omit,
|
|
5235
5207
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5236
5208
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5237
5209
|
extra_headers: Headers | None = None,
|
|
5238
5210
|
extra_query: Query | None = None,
|
|
5239
5211
|
extra_body: Body | None = None,
|
|
5240
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5212
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5241
5213
|
) -> ActionStartPlaybackResponse:
|
|
5242
5214
|
"""Play an audio file on the call.
|
|
5243
5215
|
|
|
@@ -5250,9 +5222,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5250
5222
|
- A customer cannot Play Audio with `overlay=true` unless there is a Play Audio
|
|
5251
5223
|
with `overlay=false` actively playing.
|
|
5252
5224
|
|
|
5253
|
-
**Expected Webhooks
|
|
5254
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-playback#callbacks)
|
|
5255
|
-
below):**
|
|
5225
|
+
**Expected Webhooks:**
|
|
5256
5226
|
|
|
5257
5227
|
- `call.playback.started`
|
|
5258
5228
|
- `call.playback.ended`
|
|
@@ -5337,15 +5307,15 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5337
5307
|
*,
|
|
5338
5308
|
channels: Literal["single", "dual"],
|
|
5339
5309
|
format: Literal["wav", "mp3"],
|
|
5340
|
-
client_state: str |
|
|
5341
|
-
command_id: str |
|
|
5342
|
-
custom_file_name: str |
|
|
5343
|
-
max_length: int |
|
|
5344
|
-
play_beep: bool |
|
|
5345
|
-
recording_track: Literal["both", "inbound", "outbound"] |
|
|
5346
|
-
timeout_secs: int |
|
|
5347
|
-
transcription: bool |
|
|
5348
|
-
transcription_engine: str |
|
|
5310
|
+
client_state: str | Omit = omit,
|
|
5311
|
+
command_id: str | Omit = omit,
|
|
5312
|
+
custom_file_name: str | Omit = omit,
|
|
5313
|
+
max_length: int | Omit = omit,
|
|
5314
|
+
play_beep: bool | Omit = omit,
|
|
5315
|
+
recording_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
5316
|
+
timeout_secs: int | Omit = omit,
|
|
5317
|
+
transcription: bool | Omit = omit,
|
|
5318
|
+
transcription_engine: str | Omit = omit,
|
|
5349
5319
|
transcription_language: Literal[
|
|
5350
5320
|
"af-ZA",
|
|
5351
5321
|
"am-ET",
|
|
@@ -5493,27 +5463,25 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5493
5463
|
"zh-TW",
|
|
5494
5464
|
"zu-ZA",
|
|
5495
5465
|
]
|
|
5496
|
-
|
|
|
5497
|
-
transcription_max_speaker_count: int |
|
|
5498
|
-
transcription_min_speaker_count: int |
|
|
5499
|
-
transcription_profanity_filter: bool |
|
|
5500
|
-
transcription_speaker_diarization: bool |
|
|
5501
|
-
trim: Literal["trim-silence"] |
|
|
5466
|
+
| Omit = omit,
|
|
5467
|
+
transcription_max_speaker_count: int | Omit = omit,
|
|
5468
|
+
transcription_min_speaker_count: int | Omit = omit,
|
|
5469
|
+
transcription_profanity_filter: bool | Omit = omit,
|
|
5470
|
+
transcription_speaker_diarization: bool | Omit = omit,
|
|
5471
|
+
trim: Literal["trim-silence"] | Omit = omit,
|
|
5502
5472
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5503
5473
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5504
5474
|
extra_headers: Headers | None = None,
|
|
5505
5475
|
extra_query: Query | None = None,
|
|
5506
5476
|
extra_body: Body | None = None,
|
|
5507
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5477
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5508
5478
|
) -> ActionStartRecordingResponse:
|
|
5509
5479
|
"""Start recording the call.
|
|
5510
5480
|
|
|
5511
5481
|
Recording will stop on call hang-up, or can be
|
|
5512
5482
|
initiated via the Stop Recording command.
|
|
5513
5483
|
|
|
5514
|
-
**Expected Webhooks
|
|
5515
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-record#callbacks)
|
|
5516
|
-
below):**
|
|
5484
|
+
**Expected Webhooks:**
|
|
5517
5485
|
|
|
5518
5486
|
- `call.recording.saved`
|
|
5519
5487
|
- `call.recording.transcription.saved`
|
|
@@ -5612,19 +5580,19 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5612
5580
|
self,
|
|
5613
5581
|
call_control_id: str,
|
|
5614
5582
|
*,
|
|
5615
|
-
client_state: str |
|
|
5616
|
-
connector_name: str |
|
|
5617
|
-
include_metadata_custom_headers: Literal[True, False] |
|
|
5618
|
-
secure: Literal[True, False] |
|
|
5619
|
-
session_timeout_secs: int |
|
|
5620
|
-
sip_transport: Literal["udp", "tcp", "tls"] |
|
|
5621
|
-
siprec_track: Literal["inbound_track", "outbound_track", "both_tracks"] |
|
|
5583
|
+
client_state: str | Omit = omit,
|
|
5584
|
+
connector_name: str | Omit = omit,
|
|
5585
|
+
include_metadata_custom_headers: Literal[True, False] | Omit = omit,
|
|
5586
|
+
secure: Literal[True, False] | Omit = omit,
|
|
5587
|
+
session_timeout_secs: int | Omit = omit,
|
|
5588
|
+
sip_transport: Literal["udp", "tcp", "tls"] | Omit = omit,
|
|
5589
|
+
siprec_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
5622
5590
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5623
5591
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5624
5592
|
extra_headers: Headers | None = None,
|
|
5625
5593
|
extra_query: Query | None = None,
|
|
5626
5594
|
extra_body: Body | None = None,
|
|
5627
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5595
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5628
5596
|
) -> ActionStartSiprecResponse:
|
|
5629
5597
|
"""
|
|
5630
5598
|
Start siprec session to configured in SIPREC connector SRS.
|
|
@@ -5690,22 +5658,23 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5690
5658
|
self,
|
|
5691
5659
|
call_control_id: str,
|
|
5692
5660
|
*,
|
|
5693
|
-
client_state: str |
|
|
5694
|
-
command_id: str |
|
|
5695
|
-
dialogflow_config: DialogflowConfigParam |
|
|
5696
|
-
enable_dialogflow: bool |
|
|
5697
|
-
stream_bidirectional_codec: StreamBidirectionalCodec |
|
|
5698
|
-
stream_bidirectional_mode: StreamBidirectionalMode |
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5661
|
+
client_state: str | Omit = omit,
|
|
5662
|
+
command_id: str | Omit = omit,
|
|
5663
|
+
dialogflow_config: DialogflowConfigParam | Omit = omit,
|
|
5664
|
+
enable_dialogflow: bool | Omit = omit,
|
|
5665
|
+
stream_bidirectional_codec: StreamBidirectionalCodec | Omit = omit,
|
|
5666
|
+
stream_bidirectional_mode: StreamBidirectionalMode | Omit = omit,
|
|
5667
|
+
stream_bidirectional_sampling_rate: Literal[8000, 16000, 22050, 24000, 48000] | Omit = omit,
|
|
5668
|
+
stream_bidirectional_target_legs: StreamBidirectionalTargetLegs | Omit = omit,
|
|
5669
|
+
stream_codec: StreamCodec | Omit = omit,
|
|
5670
|
+
stream_track: Literal["inbound_track", "outbound_track", "both_tracks"] | Omit = omit,
|
|
5671
|
+
stream_url: str | Omit = omit,
|
|
5703
5672
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5704
5673
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5705
5674
|
extra_headers: Headers | None = None,
|
|
5706
5675
|
extra_query: Query | None = None,
|
|
5707
5676
|
extra_body: Body | None = None,
|
|
5708
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5677
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5709
5678
|
) -> ActionStartStreamingResponse:
|
|
5710
5679
|
"""
|
|
5711
5680
|
Start streaming the media from a call to a specific WebSocket address or
|
|
@@ -5729,11 +5698,12 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5729
5698
|
|
|
5730
5699
|
stream_bidirectional_mode: Configures method of bidirectional streaming (mp3, rtp).
|
|
5731
5700
|
|
|
5701
|
+
stream_bidirectional_sampling_rate: Audio sampling rate.
|
|
5702
|
+
|
|
5732
5703
|
stream_bidirectional_target_legs: Specifies which call legs should receive the bidirectional stream audio.
|
|
5733
5704
|
|
|
5734
5705
|
stream_codec: Specifies the codec to be used for the streamed audio. When set to 'default' or
|
|
5735
5706
|
when transcoding is not possible, the codec from the call will be used.
|
|
5736
|
-
Currently, transcoding is only supported between PCMU and PCMA codecs.
|
|
5737
5707
|
|
|
5738
5708
|
stream_track: Specifies which track should be streamed.
|
|
5739
5709
|
|
|
@@ -5759,6 +5729,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5759
5729
|
"enable_dialogflow": enable_dialogflow,
|
|
5760
5730
|
"stream_bidirectional_codec": stream_bidirectional_codec,
|
|
5761
5731
|
"stream_bidirectional_mode": stream_bidirectional_mode,
|
|
5732
|
+
"stream_bidirectional_sampling_rate": stream_bidirectional_sampling_rate,
|
|
5762
5733
|
"stream_bidirectional_target_legs": stream_bidirectional_target_legs,
|
|
5763
5734
|
"stream_codec": stream_codec,
|
|
5764
5735
|
"stream_track": stream_track,
|
|
@@ -5776,26 +5747,24 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5776
5747
|
self,
|
|
5777
5748
|
call_control_id: str,
|
|
5778
5749
|
*,
|
|
5779
|
-
client_state: str |
|
|
5780
|
-
command_id: str |
|
|
5781
|
-
transcription_engine: Literal["A", "B"] |
|
|
5782
|
-
transcription_engine_config: action_start_transcription_params.TranscriptionEngineConfig |
|
|
5783
|
-
transcription_tracks: str |
|
|
5750
|
+
client_state: str | Omit = omit,
|
|
5751
|
+
command_id: str | Omit = omit,
|
|
5752
|
+
transcription_engine: Literal["Google", "Telnyx", "Deepgram", "A", "B"] | Omit = omit,
|
|
5753
|
+
transcription_engine_config: action_start_transcription_params.TranscriptionEngineConfig | Omit = omit,
|
|
5754
|
+
transcription_tracks: str | Omit = omit,
|
|
5784
5755
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5785
5756
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5786
5757
|
extra_headers: Headers | None = None,
|
|
5787
5758
|
extra_query: Query | None = None,
|
|
5788
5759
|
extra_body: Body | None = None,
|
|
5789
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5760
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5790
5761
|
) -> ActionStartTranscriptionResponse:
|
|
5791
5762
|
"""Start real-time transcription.
|
|
5792
5763
|
|
|
5793
5764
|
Transcription will stop on call hang-up, or can
|
|
5794
5765
|
be initiated via the Transcription stop command.
|
|
5795
5766
|
|
|
5796
|
-
**Expected Webhooks
|
|
5797
|
-
[callback schema](https://developers.telnyx.com/api/call-control/start-call-transcription#callbacks)
|
|
5798
|
-
below):**
|
|
5767
|
+
**Expected Webhooks:**
|
|
5799
5768
|
|
|
5800
5769
|
- `call.transcription`
|
|
5801
5770
|
|
|
@@ -5806,7 +5775,8 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5806
5775
|
command_id: Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
5807
5776
|
the same `command_id` for the same `call_control_id`.
|
|
5808
5777
|
|
|
5809
|
-
transcription_engine: Engine to use for speech recognition. `A` - `Google`, `B` -
|
|
5778
|
+
transcription_engine: Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
5779
|
+
`Telnyx` are supported for backward compatibility.
|
|
5810
5780
|
|
|
5811
5781
|
transcription_tracks: Indicates which leg of the call will be transcribed. Use `inbound` for the leg
|
|
5812
5782
|
that requested the transcription, `outbound` for the other leg, and `both` for
|
|
@@ -5844,14 +5814,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5844
5814
|
self,
|
|
5845
5815
|
call_control_id: str,
|
|
5846
5816
|
*,
|
|
5847
|
-
client_state: str |
|
|
5848
|
-
command_id: str |
|
|
5817
|
+
client_state: str | Omit = omit,
|
|
5818
|
+
command_id: str | Omit = omit,
|
|
5849
5819
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5850
5820
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5851
5821
|
extra_headers: Headers | None = None,
|
|
5852
5822
|
extra_query: Query | None = None,
|
|
5853
5823
|
extra_body: Body | None = None,
|
|
5854
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5824
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5855
5825
|
) -> ActionStopAIAssistantResponse:
|
|
5856
5826
|
"""
|
|
5857
5827
|
Stop an AI assistant on the call.
|
|
@@ -5892,22 +5862,20 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5892
5862
|
self,
|
|
5893
5863
|
call_control_id: str,
|
|
5894
5864
|
*,
|
|
5895
|
-
client_state: str |
|
|
5896
|
-
command_id: str |
|
|
5897
|
-
stream_type: Literal["raw", "decrypted"] |
|
|
5865
|
+
client_state: str | Omit = omit,
|
|
5866
|
+
command_id: str | Omit = omit,
|
|
5867
|
+
stream_type: Literal["raw", "decrypted"] | Omit = omit,
|
|
5898
5868
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5899
5869
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5900
5870
|
extra_headers: Headers | None = None,
|
|
5901
5871
|
extra_query: Query | None = None,
|
|
5902
5872
|
extra_body: Body | None = None,
|
|
5903
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5873
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5904
5874
|
) -> ActionStopForkingResponse:
|
|
5905
5875
|
"""
|
|
5906
5876
|
Stop forking a call.
|
|
5907
5877
|
|
|
5908
|
-
**Expected Webhooks
|
|
5909
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-fork#callbacks)
|
|
5910
|
-
below):**
|
|
5878
|
+
**Expected Webhooks:**
|
|
5911
5879
|
|
|
5912
5880
|
- `call.fork.stopped`
|
|
5913
5881
|
|
|
@@ -5951,21 +5919,19 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
5951
5919
|
self,
|
|
5952
5920
|
call_control_id: str,
|
|
5953
5921
|
*,
|
|
5954
|
-
client_state: str |
|
|
5955
|
-
command_id: str |
|
|
5922
|
+
client_state: str | Omit = omit,
|
|
5923
|
+
command_id: str | Omit = omit,
|
|
5956
5924
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5957
5925
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5958
5926
|
extra_headers: Headers | None = None,
|
|
5959
5927
|
extra_query: Query | None = None,
|
|
5960
5928
|
extra_body: Body | None = None,
|
|
5961
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5929
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
5962
5930
|
) -> ActionStopGatherResponse:
|
|
5963
5931
|
"""
|
|
5964
5932
|
Stop current gather.
|
|
5965
5933
|
|
|
5966
|
-
**Expected Webhooks
|
|
5967
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-gather#callbacks)
|
|
5968
|
-
below):**
|
|
5934
|
+
**Expected Webhooks:**
|
|
5969
5935
|
|
|
5970
5936
|
- `call.gather.ended`
|
|
5971
5937
|
|
|
@@ -6005,14 +5971,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6005
5971
|
self,
|
|
6006
5972
|
call_control_id: str,
|
|
6007
5973
|
*,
|
|
6008
|
-
client_state: str |
|
|
6009
|
-
command_id: str |
|
|
5974
|
+
client_state: str | Omit = omit,
|
|
5975
|
+
command_id: str | Omit = omit,
|
|
6010
5976
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6011
5977
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6012
5978
|
extra_headers: Headers | None = None,
|
|
6013
5979
|
extra_query: Query | None = None,
|
|
6014
5980
|
extra_body: Body | None = None,
|
|
6015
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
5981
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6016
5982
|
) -> ActionStopNoiseSuppressionResponse:
|
|
6017
5983
|
"""
|
|
6018
5984
|
Noise Suppression Stop (BETA)
|
|
@@ -6053,23 +6019,21 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6053
6019
|
self,
|
|
6054
6020
|
call_control_id: str,
|
|
6055
6021
|
*,
|
|
6056
|
-
client_state: str |
|
|
6057
|
-
command_id: str |
|
|
6058
|
-
overlay: bool |
|
|
6059
|
-
stop: str |
|
|
6022
|
+
client_state: str | Omit = omit,
|
|
6023
|
+
command_id: str | Omit = omit,
|
|
6024
|
+
overlay: bool | Omit = omit,
|
|
6025
|
+
stop: str | Omit = omit,
|
|
6060
6026
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6061
6027
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6062
6028
|
extra_headers: Headers | None = None,
|
|
6063
6029
|
extra_query: Query | None = None,
|
|
6064
6030
|
extra_body: Body | None = None,
|
|
6065
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6031
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6066
6032
|
) -> ActionStopPlaybackResponse:
|
|
6067
6033
|
"""
|
|
6068
6034
|
Stop audio being played on the call.
|
|
6069
6035
|
|
|
6070
|
-
**Expected Webhooks
|
|
6071
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-playback#callbacks)
|
|
6072
|
-
below):**
|
|
6036
|
+
**Expected Webhooks:**
|
|
6073
6037
|
|
|
6074
6038
|
- `call.playback.ended` or `call.speak.ended`
|
|
6075
6039
|
|
|
@@ -6116,22 +6080,20 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6116
6080
|
self,
|
|
6117
6081
|
call_control_id: str,
|
|
6118
6082
|
*,
|
|
6119
|
-
client_state: str |
|
|
6120
|
-
command_id: str |
|
|
6121
|
-
recording_id: str |
|
|
6083
|
+
client_state: str | Omit = omit,
|
|
6084
|
+
command_id: str | Omit = omit,
|
|
6085
|
+
recording_id: str | Omit = omit,
|
|
6122
6086
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6123
6087
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6124
6088
|
extra_headers: Headers | None = None,
|
|
6125
6089
|
extra_query: Query | None = None,
|
|
6126
6090
|
extra_body: Body | None = None,
|
|
6127
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6091
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6128
6092
|
) -> ActionStopRecordingResponse:
|
|
6129
6093
|
"""
|
|
6130
6094
|
Stop recording the call.
|
|
6131
6095
|
|
|
6132
|
-
**Expected Webhooks
|
|
6133
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-recording#callbacks)
|
|
6134
|
-
below):**
|
|
6096
|
+
**Expected Webhooks:**
|
|
6135
6097
|
|
|
6136
6098
|
- `call.recording.saved`
|
|
6137
6099
|
|
|
@@ -6174,14 +6136,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6174
6136
|
self,
|
|
6175
6137
|
call_control_id: str,
|
|
6176
6138
|
*,
|
|
6177
|
-
client_state: str |
|
|
6178
|
-
command_id: str |
|
|
6139
|
+
client_state: str | Omit = omit,
|
|
6140
|
+
command_id: str | Omit = omit,
|
|
6179
6141
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6180
6142
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6181
6143
|
extra_headers: Headers | None = None,
|
|
6182
6144
|
extra_query: Query | None = None,
|
|
6183
6145
|
extra_body: Body | None = None,
|
|
6184
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6146
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6185
6147
|
) -> ActionStopSiprecResponse:
|
|
6186
6148
|
"""
|
|
6187
6149
|
Stop SIPREC session.
|
|
@@ -6226,22 +6188,20 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6226
6188
|
self,
|
|
6227
6189
|
call_control_id: str,
|
|
6228
6190
|
*,
|
|
6229
|
-
client_state: str |
|
|
6230
|
-
command_id: str |
|
|
6231
|
-
stream_id: str |
|
|
6191
|
+
client_state: str | Omit = omit,
|
|
6192
|
+
command_id: str | Omit = omit,
|
|
6193
|
+
stream_id: str | Omit = omit,
|
|
6232
6194
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6233
6195
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6234
6196
|
extra_headers: Headers | None = None,
|
|
6235
6197
|
extra_query: Query | None = None,
|
|
6236
6198
|
extra_body: Body | None = None,
|
|
6237
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6199
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6238
6200
|
) -> ActionStopStreamingResponse:
|
|
6239
6201
|
"""
|
|
6240
6202
|
Stop streaming a call to a WebSocket.
|
|
6241
6203
|
|
|
6242
|
-
**Expected Webhooks
|
|
6243
|
-
[callback schema](https://developers.telnyx.com/api/call-control/stop-call-streaming#callbacks)
|
|
6244
|
-
below):**
|
|
6204
|
+
**Expected Webhooks:**
|
|
6245
6205
|
|
|
6246
6206
|
- `streaming.stopped`
|
|
6247
6207
|
|
|
@@ -6285,14 +6245,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6285
6245
|
self,
|
|
6286
6246
|
call_control_id: str,
|
|
6287
6247
|
*,
|
|
6288
|
-
client_state: str |
|
|
6289
|
-
command_id: str |
|
|
6248
|
+
client_state: str | Omit = omit,
|
|
6249
|
+
command_id: str | Omit = omit,
|
|
6290
6250
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6291
6251
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6292
6252
|
extra_headers: Headers | None = None,
|
|
6293
6253
|
extra_query: Query | None = None,
|
|
6294
6254
|
extra_body: Body | None = None,
|
|
6295
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6255
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6296
6256
|
) -> ActionStopTranscriptionResponse:
|
|
6297
6257
|
"""
|
|
6298
6258
|
Stop real-time transcription.
|
|
@@ -6339,7 +6299,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6339
6299
|
extra_headers: Headers | None = None,
|
|
6340
6300
|
extra_query: Query | None = None,
|
|
6341
6301
|
extra_body: Body | None = None,
|
|
6342
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6302
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6343
6303
|
) -> ActionSwitchSupervisorRoleResponse:
|
|
6344
6304
|
"""Switch the supervisor role for a bridged call.
|
|
6345
6305
|
|
|
@@ -6379,36 +6339,43 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6379
6339
|
answering_machine_detection: Literal[
|
|
6380
6340
|
"premium", "detect", "detect_beep", "detect_words", "greeting_end", "disabled"
|
|
6381
6341
|
]
|
|
6382
|
-
|
|
|
6383
|
-
answering_machine_detection_config: action_transfer_params.AnsweringMachineDetectionConfig
|
|
6384
|
-
|
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6342
|
+
| Omit = omit,
|
|
6343
|
+
answering_machine_detection_config: action_transfer_params.AnsweringMachineDetectionConfig | Omit = omit,
|
|
6344
|
+
audio_url: str | Omit = omit,
|
|
6345
|
+
client_state: str | Omit = omit,
|
|
6346
|
+
command_id: str | Omit = omit,
|
|
6347
|
+
custom_headers: Iterable[CustomSipHeaderParam] | Omit = omit,
|
|
6348
|
+
early_media: bool | Omit = omit,
|
|
6349
|
+
from_: str | Omit = omit,
|
|
6350
|
+
from_display_name: str | Omit = omit,
|
|
6351
|
+
media_encryption: Literal["disabled", "SRTP", "DTLS"] | Omit = omit,
|
|
6352
|
+
media_name: str | Omit = omit,
|
|
6353
|
+
mute_dtmf: Literal["none", "both", "self", "opposite"] | Omit = omit,
|
|
6354
|
+
park_after_unbridge: str | Omit = omit,
|
|
6355
|
+
record: Literal["record-from-answer"] | Omit = omit,
|
|
6356
|
+
record_channels: Literal["single", "dual"] | Omit = omit,
|
|
6357
|
+
record_custom_file_name: str | Omit = omit,
|
|
6358
|
+
record_format: Literal["wav", "mp3"] | Omit = omit,
|
|
6359
|
+
record_max_length: int | Omit = omit,
|
|
6360
|
+
record_timeout_secs: int | Omit = omit,
|
|
6361
|
+
record_track: Literal["both", "inbound", "outbound"] | Omit = omit,
|
|
6362
|
+
record_trim: Literal["trim-silence"] | Omit = omit,
|
|
6363
|
+
sip_auth_password: str | Omit = omit,
|
|
6364
|
+
sip_auth_username: str | Omit = omit,
|
|
6365
|
+
sip_headers: Iterable[SipHeaderParam] | Omit = omit,
|
|
6366
|
+
sip_transport_protocol: Literal["UDP", "TCP", "TLS"] | Omit = omit,
|
|
6367
|
+
sound_modifications: SoundModificationsParam | Omit = omit,
|
|
6368
|
+
target_leg_client_state: str | Omit = omit,
|
|
6369
|
+
time_limit_secs: int | Omit = omit,
|
|
6370
|
+
timeout_secs: int | Omit = omit,
|
|
6371
|
+
webhook_url: str | Omit = omit,
|
|
6372
|
+
webhook_url_method: Literal["POST", "GET"] | Omit = omit,
|
|
6406
6373
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
6407
6374
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
6408
6375
|
extra_headers: Headers | None = None,
|
|
6409
6376
|
extra_query: Query | None = None,
|
|
6410
6377
|
extra_body: Body | None = None,
|
|
6411
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6378
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6412
6379
|
) -> ActionTransferResponse:
|
|
6413
6380
|
"""Transfer a call to a new destination.
|
|
6414
6381
|
|
|
@@ -6418,9 +6385,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6418
6385
|
may be issued additional commands, potentially transfering the call to an
|
|
6419
6386
|
alternate destination.
|
|
6420
6387
|
|
|
6421
|
-
**Expected Webhooks
|
|
6422
|
-
[callback schema](https://developers.telnyx.com/api/call-control/transfer-call#callbacks)
|
|
6423
|
-
below):**
|
|
6388
|
+
**Expected Webhooks:**
|
|
6424
6389
|
|
|
6425
6390
|
- `call.initiated`
|
|
6426
6391
|
- `call.bridged` to Leg B
|
|
@@ -6485,6 +6450,33 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6485
6450
|
or is transferred). If supplied with the value `self`, the current leg will be
|
|
6486
6451
|
parked after unbridge. If not set, the default behavior is to hang up the leg.
|
|
6487
6452
|
|
|
6453
|
+
record: Start recording automatically after an event. Disabled by default.
|
|
6454
|
+
|
|
6455
|
+
record_channels: Defines which channel should be recorded ('single' or 'dual') when `record` is
|
|
6456
|
+
specified.
|
|
6457
|
+
|
|
6458
|
+
record_custom_file_name: The custom recording file name to be used instead of the default `call_leg_id`.
|
|
6459
|
+
Telnyx will still add a Unix timestamp suffix.
|
|
6460
|
+
|
|
6461
|
+
record_format: Defines the format of the recording ('wav' or 'mp3') when `record` is specified.
|
|
6462
|
+
|
|
6463
|
+
record_max_length: Defines the maximum length for the recording in seconds when `record` is
|
|
6464
|
+
specified. The minimum value is 0. The maximum value is 43200. The default value
|
|
6465
|
+
is 0 (infinite).
|
|
6466
|
+
|
|
6467
|
+
record_timeout_secs: The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
6468
|
+
silence is detected when `record` is specified. The timer only starts when the
|
|
6469
|
+
speech is detected. Please note that call transcription is used to detect
|
|
6470
|
+
silence and the related charge will be applied. The minimum value is 0. The
|
|
6471
|
+
default value is 0 (infinite).
|
|
6472
|
+
|
|
6473
|
+
record_track: The audio track to be recorded. Can be either `both`, `inbound` or `outbound`.
|
|
6474
|
+
If only single track is specified (`inbound`, `outbound`), `channels`
|
|
6475
|
+
configuration is ignored and it will be recorded as mono (single channel).
|
|
6476
|
+
|
|
6477
|
+
record_trim: When set to `trim-silence`, silence will be removed from the beginning and end
|
|
6478
|
+
of the recording.
|
|
6479
|
+
|
|
6488
6480
|
sip_auth_password: SIP Authentication password used for SIP challenges.
|
|
6489
6481
|
|
|
6490
6482
|
sip_auth_username: SIP Authentication username used for SIP challenges.
|
|
@@ -6545,6 +6537,14 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6545
6537
|
"media_name": media_name,
|
|
6546
6538
|
"mute_dtmf": mute_dtmf,
|
|
6547
6539
|
"park_after_unbridge": park_after_unbridge,
|
|
6540
|
+
"record": record,
|
|
6541
|
+
"record_channels": record_channels,
|
|
6542
|
+
"record_custom_file_name": record_custom_file_name,
|
|
6543
|
+
"record_format": record_format,
|
|
6544
|
+
"record_max_length": record_max_length,
|
|
6545
|
+
"record_timeout_secs": record_timeout_secs,
|
|
6546
|
+
"record_track": record_track,
|
|
6547
|
+
"record_trim": record_trim,
|
|
6548
6548
|
"sip_auth_password": sip_auth_password,
|
|
6549
6549
|
"sip_auth_username": sip_auth_username,
|
|
6550
6550
|
"sip_headers": sip_headers,
|
|
@@ -6574,7 +6574,7 @@ class AsyncActionsResource(AsyncAPIResource):
|
|
|
6574
6574
|
extra_headers: Headers | None = None,
|
|
6575
6575
|
extra_query: Query | None = None,
|
|
6576
6576
|
extra_body: Body | None = None,
|
|
6577
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
6577
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
6578
6578
|
) -> ActionUpdateClientStateResponse:
|
|
6579
6579
|
"""
|
|
6580
6580
|
Updates client state
|