Class: Telnyx::Resources::Calls::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::Calls::Actions
- Defined in:
- lib/telnyx/resources/calls/actions.rb
Overview
Call Control command operations
Instance Method Summary collapse
-
#add_ai_assistant_messages(call_control_id, client_state: nil, command_id: nil, messages: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionAddAIAssistantMessagesResponse
Some parameter documentations has been truncated, see Models::Calls::ActionAddAIAssistantMessagesParams for more details.
-
#answer(call_control_id, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionAnswerResponse
Some parameter documentations has been truncated, see Models::Calls::ActionAnswerParams for more details.
-
#bridge(call_control_id_to_bridge, call_control_id_to_bridge_with:, client_state: nil, command_id: nil, hold_after_unbridge: nil, mute_dtmf: nil, park_after_unbridge: nil, play_ringtone: nil, prevent_double_bridge: nil, queue: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, ringtone: nil, video_room_context: nil, video_room_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionBridgeResponse
Some parameter documentations has been truncated, see Models::Calls::ActionBridgeParams for more details.
-
#enqueue(call_control_id, queue_name:, client_state: nil, command_id: nil, keep_after_hangup: nil, max_size: nil, max_wait_time_secs: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionEnqueueResponse
Some parameter documentations has been truncated, see Models::Calls::ActionEnqueueParams for more details.
-
#gather(call_control_id, client_state: nil, command_id: nil, gather_id: nil, initial_timeout_millis: nil, inter_digit_timeout_millis: nil, maximum_digits: nil, minimum_digits: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherParams for more details.
-
#gather_using_ai(call_control_id, parameters:, assistant: nil, client_state: nil, command_id: nil, gather_ended_speech: nil, greeting: nil, interruption_settings: nil, language: nil, message_history: nil, send_message_history_updates: nil, send_partial_results: nil, transcription: nil, user_response_timeout_ms: nil, voice: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherUsingAIResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherUsingAIParams for more details.
-
#gather_using_audio(call_control_id, audio_url: nil, client_state: nil, command_id: nil, inter_digit_timeout_millis: nil, invalid_audio_url: nil, invalid_media_name: nil, maximum_digits: nil, maximum_tries: nil, media_name: nil, minimum_digits: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherUsingAudioResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherUsingAudioParams for more details.
-
#gather_using_speak(call_control_id, payload:, voice:, client_state: nil, command_id: nil, inter_digit_timeout_millis: nil, invalid_payload: nil, language: nil, maximum_digits: nil, maximum_tries: nil, minimum_digits: nil, payload_type: nil, service_level: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherUsingSpeakResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherUsingSpeakParams for more details.
-
#hangup(call_control_id, client_state: nil, command_id: nil, custom_headers: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionHangupResponse
Some parameter documentations has been truncated, see Models::Calls::ActionHangupParams for more details.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#join_ai_assistant(call_control_id, conversation_id:, participant:, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionJoinAIAssistantResponse
Some parameter documentations has been truncated, see Models::Calls::ActionJoinAIAssistantParams for more details.
-
#leave_queue(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionLeaveQueueResponse
Some parameter documentations has been truncated, see Models::Calls::ActionLeaveQueueParams for more details.
-
#pause_recording(call_control_id, client_state: nil, command_id: nil, recording_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionPauseRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionPauseRecordingParams for more details.
-
#refer(call_control_id, sip_address:, client_state: nil, command_id: nil, custom_headers: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionReferResponse
Some parameter documentations has been truncated, see Models::Calls::ActionReferParams for more details.
-
#reject(call_control_id, cause:, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionRejectResponse
Some parameter documentations has been truncated, see Models::Calls::ActionRejectParams for more details.
-
#resume_recording(call_control_id, client_state: nil, command_id: nil, recording_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionResumeRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionResumeRecordingParams for more details.
-
#send_dtmf(call_control_id, digits:, client_state: nil, command_id: nil, duration_millis: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSendDtmfResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSendDtmfParams for more details.
-
#send_sip_info(call_control_id, body:, content_type:, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSendSipInfoResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSendSipInfoParams for more details.
-
#speak(call_control_id, payload:, voice:, client_state: nil, command_id: nil, language: nil, loop_: nil, payload_type: nil, service_level: nil, stop: nil, target_legs: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSpeakResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSpeakParams for more details.
-
#start_ai_assistant(call_control_id, assistant: nil, client_state: nil, command_id: nil, greeting: nil, interruption_settings: nil, message_history: nil, participants: nil, send_message_history_updates: nil, transcription: nil, voice: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartAIAssistantResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartAIAssistantParams for more details.
-
#start_forking(call_control_id, client_state: nil, command_id: nil, rx: nil, stream_type: nil, tx: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartForkingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartForkingParams for more details.
-
#start_noise_suppression(call_control_id, client_state: nil, command_id: nil, direction: nil, noise_suppression_engine: nil, noise_suppression_engine_config: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartNoiseSuppressionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartNoiseSuppressionParams for more details.
-
#start_playback(call_control_id, audio_type: nil, audio_url: nil, cache_audio: nil, client_state: nil, command_id: nil, loop_: nil, media_name: nil, overlay: nil, playback_content: nil, stop: nil, target_legs: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartPlaybackResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartPlaybackParams for more details.
-
#start_recording(call_control_id, channels:, format_:, client_state: nil, command_id: nil, custom_file_name: nil, max_length: nil, play_beep: nil, recording_track: nil, timeout_secs: nil, transcription: nil, transcription_engine: nil, transcription_language: nil, transcription_max_speaker_count: nil, transcription_min_speaker_count: nil, transcription_profanity_filter: nil, transcription_speaker_diarization: nil, trim: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartRecordingParams for more details.
-
#start_siprec(call_control_id, client_state: nil, connector_name: nil, include_metadata_custom_headers: nil, secure: nil, session_timeout_secs: nil, sip_transport: nil, siprec_track: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartSiprecResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartSiprecParams for more details.
-
#start_streaming(call_control_id, client_state: nil, command_id: nil, custom_parameters: nil, dialogflow_config: nil, enable_dialogflow: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartStreamingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartStreamingParams for more details.
-
#start_transcription(call_control_id, client_state: nil, command_id: nil, transcription_engine: nil, transcription_engine_config: nil, transcription_tracks: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartTranscriptionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartTranscriptionParams for more details.
-
#stop_ai_assistant(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopAIAssistantResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopAIAssistantParams for more details.
-
#stop_forking(call_control_id, client_state: nil, command_id: nil, stream_type: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopForkingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopForkingParams for more details.
-
#stop_gather(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopGatherResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopGatherParams for more details.
-
#stop_noise_suppression(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopNoiseSuppressionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopNoiseSuppressionParams for more details.
-
#stop_playback(call_control_id, client_state: nil, command_id: nil, overlay: nil, stop: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopPlaybackResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopPlaybackParams for more details.
-
#stop_recording(call_control_id, client_state: nil, command_id: nil, recording_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopRecordingParams for more details.
-
#stop_siprec(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopSiprecResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopSiprecParams for more details.
-
#stop_streaming(call_control_id, client_state: nil, command_id: nil, stream_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopStreamingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopStreamingParams for more details.
-
#stop_transcription(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopTranscriptionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopTranscriptionParams for more details.
-
#switch_supervisor_role(call_control_id, role:, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSwitchSupervisorRoleResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSwitchSupervisorRoleParams for more details.
-
#transfer(call_control_id, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, client_state: nil, command_id: nil, custom_headers: nil, early_media: nil, from: nil, from_display_name: nil, media_encryption: nil, media_name: nil, mute_dtmf: nil, park_after_unbridge: nil, preferred_codecs: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, target_leg_client_state: nil, time_limit_secs: nil, timeout_secs: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionTransferResponse
Some parameter documentations has been truncated, see Models::Calls::ActionTransferParams for more details.
-
#update_client_state(call_control_id, client_state:, request_options: {}) ⇒ Telnyx::Models::Calls::ActionUpdateClientStateResponse
Some parameter documentations has been truncated, see Models::Calls::ActionUpdateClientStateParams for more details.
Constructor Details
#initialize(client:) ⇒ Actions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Actions.
1744 1745 1746 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1744 def initialize(client:) @client = client end |
Instance Method Details
#add_ai_assistant_messages(call_control_id, client_state: nil, command_id: nil, messages: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionAddAIAssistantMessagesResponse
Some parameter documentations has been truncated, see Models::Calls::ActionAddAIAssistantMessagesParams for more details.
Add messages to the conversation started by an AI assistant on the call.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/telnyx/resources/calls/actions.rb', line 28 def (call_control_id, params = {}) parsed, = Telnyx::Calls::ActionAddAIAssistantMessagesParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/ai_assistant_add_messages", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionAddAIAssistantMessagesResponse, options: ) end |
#answer(call_control_id, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionAnswerResponse
Some parameter documentations has been truncated, see Models::Calls::ActionAnswerParams for more details.
Answer an incoming call. You must issue this command before executing subsequent commands on an incoming call.
**Expected Webhooks:**
-
‘call.answered`
-
‘streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url` was set
When the ‘record` parameter is set to `record-from-answer`, the response will include a `recording_id` field.
stream_
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/telnyx/resources/calls/actions.rb', line 124 def answer(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionAnswerParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/answer", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionAnswerResponse, options: ) end |
#bridge(call_control_id_to_bridge, call_control_id_to_bridge_with:, client_state: nil, command_id: nil, hold_after_unbridge: nil, mute_dtmf: nil, park_after_unbridge: nil, play_ringtone: nil, prevent_double_bridge: nil, queue: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, ringtone: nil, video_room_context: nil, video_room_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionBridgeResponse
Some parameter documentations has been truncated, see Models::Calls::ActionBridgeParams for more details.
Bridge two call control calls.
**Expected Webhooks:**
-
‘call.bridged` for Leg A
-
‘call.bridged` for Leg B
call_
195 196 197 198 199 200 201 202 203 204 |
# File 'lib/telnyx/resources/calls/actions.rb', line 195 def bridge(call_control_id_to_bridge, params) parsed, = Telnyx::Calls::ActionBridgeParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/bridge", call_control_id_to_bridge], body: parsed, model: Telnyx::Models::Calls::ActionBridgeResponse, options: ) end |
#enqueue(call_control_id, queue_name:, client_state: nil, command_id: nil, keep_after_hangup: nil, max_size: nil, max_wait_time_secs: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionEnqueueResponse
Some parameter documentations has been truncated, see Models::Calls::ActionEnqueueParams for more details.
Put the call in a queue.
232 233 234 235 236 237 238 239 240 241 |
# File 'lib/telnyx/resources/calls/actions.rb', line 232 def enqueue(call_control_id, params) parsed, = Telnyx::Calls::ActionEnqueueParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/enqueue", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionEnqueueResponse, options: ) end |
#gather(call_control_id, client_state: nil, command_id: nil, gather_id: nil, initial_timeout_millis: nil, inter_digit_timeout_millis: nil, maximum_digits: nil, minimum_digits: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherParams for more details.
Gather DTMF signals to build interactive menus.
You can pass a list of valid digits. The ‘Answer` command must be issued before the `gather` command.
**Expected Webhooks:**
-
‘call.dtmf.received` (you may receive many of these webhooks)
-
‘call.gather.ended`
285 286 287 288 289 290 291 292 293 294 |
# File 'lib/telnyx/resources/calls/actions.rb', line 285 def gather(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionGatherParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/gather", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionGatherResponse, options: ) end |
#gather_using_ai(call_control_id, parameters:, assistant: nil, client_state: nil, command_id: nil, gather_ended_speech: nil, greeting: nil, interruption_settings: nil, language: nil, message_history: nil, send_message_history_updates: nil, send_partial_results: nil, transcription: nil, user_response_timeout_ms: nil, voice: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherUsingAIResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherUsingAIParams for more details.
Gather parameters defined in the request payload using a voice assistant.
You can pass parameters described as a JSON Schema object and the voice assistant will attempt to gather these informations.
**Expected Webhooks:**
-
‘call.ai_gather.ended`
-
‘call.conversation.ended`
-
‘call.ai_gather.partial_results` (if `send_partial_results` is set to `true`)
-
‘call.ai_gather.message_history_updated` (if `send_message_history_updates` is set to `true`)
351 352 353 354 355 356 357 358 359 360 |
# File 'lib/telnyx/resources/calls/actions.rb', line 351 def gather_using_ai(call_control_id, params) parsed, = Telnyx::Calls::ActionGatherUsingAIParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/gather_using_ai", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionGatherUsingAIResponse, options: ) end |
#gather_using_audio(call_control_id, audio_url: nil, client_state: nil, command_id: nil, inter_digit_timeout_millis: nil, invalid_audio_url: nil, invalid_media_name: nil, maximum_digits: nil, maximum_tries: nil, media_name: nil, minimum_digits: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherUsingAudioResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherUsingAudioParams for more details.
Play an audio file on the call until the required DTMF signals are gathered to build interactive menus.
You can pass a list of valid digits along with an ‘invalid_audio_url’, which will be played back at the beginning of each prompt. Playback will be interrupted when a DTMF signal is received. The ‘Answer command must be issued before the `gather_using_audio` command.
**Expected Webhooks:**
-
‘call.playback.started`
-
‘call.playback.ended`
-
‘call.dtmf.received` (you may receive many of these webhooks)
-
‘call.gather.ended`
415 416 417 418 419 420 421 422 423 424 |
# File 'lib/telnyx/resources/calls/actions.rb', line 415 def gather_using_audio(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionGatherUsingAudioParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/gather_using_audio", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionGatherUsingAudioResponse, options: ) end |
#gather_using_speak(call_control_id, payload:, voice:, client_state: nil, command_id: nil, inter_digit_timeout_millis: nil, invalid_payload: nil, language: nil, maximum_digits: nil, maximum_tries: nil, minimum_digits: nil, payload_type: nil, service_level: nil, terminating_digit: nil, timeout_millis: nil, valid_digits: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionGatherUsingSpeakResponse
Some parameter documentations has been truncated, see Models::Calls::ActionGatherUsingSpeakParams for more details.
Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus.
You can pass a list of valid digits along with an ‘invalid_payload’, which will be played back at the beginning of each prompt. Speech will be interrupted when a DTMF signal is received. The ‘Answer` command must be issued before the `gather_using_speak` command.
**Expected Webhooks:**
-
‘call.dtmf.received` (you may receive many of these webhooks)
-
‘call.gather.ended`
‘valid_
484 485 486 487 488 489 490 491 492 493 |
# File 'lib/telnyx/resources/calls/actions.rb', line 484 def gather_using_speak(call_control_id, params) parsed, = Telnyx::Calls::ActionGatherUsingSpeakParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/gather_using_speak", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionGatherUsingSpeakResponse, options: ) end |
#hangup(call_control_id, client_state: nil, command_id: nil, custom_headers: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionHangupResponse
Some parameter documentations has been truncated, see Models::Calls::ActionHangupParams for more details.
Hang up the call.
**Expected Webhooks:**
-
‘call.hangup`
-
‘call.recording.saved`
520 521 522 523 524 525 526 527 528 529 |
# File 'lib/telnyx/resources/calls/actions.rb', line 520 def hangup(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionHangupParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/hangup", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionHangupResponse, options: ) end |
#join_ai_assistant(call_control_id, conversation_id:, participant:, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionJoinAIAssistantResponse
Some parameter documentations has been truncated, see Models::Calls::ActionJoinAIAssistantParams for more details.
Add a participant to an existing AI assistant conversation. Use this command to bring an additional call leg into a running AI conversation.
554 555 556 557 558 559 560 561 562 563 |
# File 'lib/telnyx/resources/calls/actions.rb', line 554 def join_ai_assistant(call_control_id, params) parsed, = Telnyx::Calls::ActionJoinAIAssistantParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/ai_assistant_join", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionJoinAIAssistantResponse, options: ) end |
#leave_queue(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionLeaveQueueResponse
Some parameter documentations has been truncated, see Models::Calls::ActionLeaveQueueParams for more details.
Removes the call from a queue.
583 584 585 586 587 588 589 590 591 592 |
# File 'lib/telnyx/resources/calls/actions.rb', line 583 def leave_queue(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionLeaveQueueParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/leave_queue", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionLeaveQueueResponse, options: ) end |
#pause_recording(call_control_id, client_state: nil, command_id: nil, recording_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionPauseRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionPauseRecordingParams for more details.
Pause recording the call. Recording can be resumed via Resume recording command.
**Expected Webhooks:**
There are no webhooks associated with this command.
618 619 620 621 622 623 624 625 626 627 |
# File 'lib/telnyx/resources/calls/actions.rb', line 618 def pause_recording(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionPauseRecordingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/record_pause", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionPauseRecordingResponse, options: ) end |
#refer(call_control_id, sip_address:, client_state: nil, command_id: nil, custom_headers: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionReferResponse
Some parameter documentations has been truncated, see Models::Calls::ActionReferParams for more details.
Initiate a SIP Refer on a Call Control call. You can initiate a SIP Refer at any point in the duration of a call.
**Expected Webhooks:**
-
‘call.refer.started`
-
‘call.refer.completed`
-
‘call.refer.failed`
664 665 666 667 668 669 670 671 672 673 |
# File 'lib/telnyx/resources/calls/actions.rb', line 664 def refer(call_control_id, params) parsed, = Telnyx::Calls::ActionReferParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/refer", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionReferResponse, options: ) end |
#reject(call_control_id, cause:, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionRejectResponse
Some parameter documentations has been truncated, see Models::Calls::ActionRejectParams for more details.
Reject an incoming call.
**Expected Webhooks:**
-
‘call.hangup`
699 700 701 702 703 704 705 706 707 708 |
# File 'lib/telnyx/resources/calls/actions.rb', line 699 def reject(call_control_id, params) parsed, = Telnyx::Calls::ActionRejectParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/reject", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionRejectResponse, options: ) end |
#resume_recording(call_control_id, client_state: nil, command_id: nil, recording_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionResumeRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionResumeRecordingParams for more details.
Resume recording the call.
**Expected Webhooks:**
There are no webhooks associated with this command.
734 735 736 737 738 739 740 741 742 743 |
# File 'lib/telnyx/resources/calls/actions.rb', line 734 def resume_recording(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionResumeRecordingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/record_resume", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionResumeRecordingResponse, options: ) end |
#send_dtmf(call_control_id, digits:, client_state: nil, command_id: nil, duration_millis: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSendDtmfResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSendDtmfParams for more details.
Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call.
**Expected Webhooks:**
There are no webhooks associated with this command.
us
773 774 775 776 777 778 779 780 781 782 |
# File 'lib/telnyx/resources/calls/actions.rb', line 773 def send_dtmf(call_control_id, params) parsed, = Telnyx::Calls::ActionSendDtmfParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/send_dtmf", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionSendDtmfResponse, options: ) end |
#send_sip_info(call_control_id, body:, content_type:, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSendSipInfoResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSendSipInfoParams for more details.
Sends SIP info from this leg.
**Expected Webhooks:**
-
‘call.sip_info.received` (to be received on the target call leg)
810 811 812 813 814 815 816 817 818 819 |
# File 'lib/telnyx/resources/calls/actions.rb', line 810 def send_sip_info(call_control_id, params) parsed, = Telnyx::Calls::ActionSendSipInfoParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/send_sip_info", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionSendSipInfoResponse, options: ) end |
#speak(call_control_id, payload:, voice:, client_state: nil, command_id: nil, language: nil, loop_: nil, payload_type: nil, service_level: nil, stop: nil, target_legs: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSpeakResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSpeakParams for more details.
Convert text to speech and play it back on the call. If multiple speak text commands are issued consecutively, the audio files will be placed in a queue awaiting playback.
**Expected Webhooks:**
-
‘call.speak.started`
-
‘call.speak.ended`
864 865 866 867 868 869 870 871 872 873 |
# File 'lib/telnyx/resources/calls/actions.rb', line 864 def speak(call_control_id, params) parsed, = Telnyx::Calls::ActionSpeakParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/speak", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionSpeakResponse, options: ) end |
#start_ai_assistant(call_control_id, assistant: nil, client_state: nil, command_id: nil, greeting: nil, interruption_settings: nil, message_history: nil, participants: nil, send_message_history_updates: nil, transcription: nil, voice: nil, voice_settings: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartAIAssistantResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartAIAssistantParams for more details.
Start an AI assistant on the call.
**Expected Webhooks:**
-
‘call.conversation.ended`
-
‘call.conversation_insights.generated`
916 917 918 919 920 921 922 923 924 925 |
# File 'lib/telnyx/resources/calls/actions.rb', line 916 def start_ai_assistant(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartAIAssistantParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/ai_assistant_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartAIAssistantResponse, options: ) end |
#start_forking(call_control_id, client_state: nil, command_id: nil, rx: nil, stream_type: nil, tx: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartForkingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartForkingParams for more details.
Call forking allows you to stream the media from a call to a specific target in realtime. This stream can be used to enable realtime audio analysis to support a variety of use cases, including fraud detection, or the creation of AI-generated audio responses. Requests must specify either the ‘target` attribute or the `rx` and `tx` attributes.
**Expected Webhooks:**
-
‘call.fork.started`
-
‘call.fork.stopped`
960 961 962 963 964 965 966 967 968 969 |
# File 'lib/telnyx/resources/calls/actions.rb', line 960 def start_forking(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartForkingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/fork_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartForkingResponse, options: ) end |
#start_noise_suppression(call_control_id, client_state: nil, command_id: nil, direction: nil, noise_suppression_engine: nil, noise_suppression_engine_config: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartNoiseSuppressionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartNoiseSuppressionParams for more details.
Noise Suppression Start (BETA)
995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/telnyx/resources/calls/actions.rb', line 995 def start_noise_suppression(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartNoiseSuppressionParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/suppression_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartNoiseSuppressionResponse, options: ) end |
#start_playback(call_control_id, audio_type: nil, audio_url: nil, cache_audio: nil, client_state: nil, command_id: nil, loop_: nil, media_name: nil, overlay: nil, playback_content: nil, stop: nil, target_legs: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartPlaybackResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartPlaybackParams for more details.
Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback.
Notes:
-
When ‘overlay` is enabled, `target_legs` is limited to `self`.
-
A customer cannot Play Audio with ‘overlay=true` unless there is a Play Audio with `overlay=false` actively playing.
**Expected Webhooks:**
-
‘call.playback.started`
-
‘call.playback.ended`
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1054 def start_playback(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartPlaybackParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/playback_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartPlaybackResponse, options: ) end |
#start_recording(call_control_id, channels:, format_:, client_state: nil, command_id: nil, custom_file_name: nil, max_length: nil, play_beep: nil, recording_track: nil, timeout_secs: nil, transcription: nil, transcription_engine: nil, transcription_language: nil, transcription_max_speaker_count: nil, transcription_min_speaker_count: nil, transcription_profanity_filter: nil, transcription_speaker_diarization: nil, trim: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartRecordingParams for more details.
Start recording the call. Recording will stop on call hang-up, or can be initiated via the Stop Recording command.
**Expected Webhooks:**
-
‘call.recording.saved`
-
‘call.recording.transcription.saved`
-
‘call.recording.error`
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1120 def start_recording(call_control_id, params) parsed, = Telnyx::Calls::ActionStartRecordingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/record_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartRecordingResponse, options: ) end |
#start_siprec(call_control_id, client_state: nil, connector_name: nil, include_metadata_custom_headers: nil, secure: nil, session_timeout_secs: nil, sip_transport: nil, siprec_track: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartSiprecResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartSiprecParams for more details.
Start siprec session to configured in SIPREC connector SRS.
**Expected Webhooks:**
-
‘siprec.started`
-
‘siprec.stopped`
-
‘siprec.failed`
1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1165 def start_siprec(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartSiprecParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/siprec_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartSiprecResponse, options: ) end |
#start_streaming(call_control_id, client_state: nil, command_id: nil, custom_parameters: nil, dialogflow_config: nil, enable_dialogflow: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartStreamingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartStreamingParams for more details.
Start streaming the media from a call to a specific WebSocket address or Dialogflow connection in near-realtime. Audio will be delivered as base64-encoded RTP payload (raw audio), wrapped in JSON payloads.
Please find more details about media streaming messages specification under the [link](developers.telnyx.com/docs/voice/programmable-voice/media-streaming).
stream_
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1222 def start_streaming(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartStreamingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/streaming_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartStreamingResponse, options: ) end |
#start_transcription(call_control_id, client_state: nil, command_id: nil, transcription_engine: nil, transcription_engine_config: nil, transcription_tracks: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStartTranscriptionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStartTranscriptionParams for more details.
Start real-time transcription. Transcription will stop on call hang-up, or can be initiated via the Transcription stop command.
**Expected Webhooks:**
-
‘call.transcription`
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1262 def start_transcription(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStartTranscriptionParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/transcription_start", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStartTranscriptionResponse, options: ) end |
#stop_ai_assistant(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopAIAssistantResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopAIAssistantParams for more details.
Stop an AI assistant on the call.
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1291 def stop_ai_assistant(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopAIAssistantParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/ai_assistant_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopAIAssistantResponse, options: ) end |
#stop_forking(call_control_id, client_state: nil, command_id: nil, stream_type: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopForkingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopForkingParams for more details.
Stop forking a call.
**Expected Webhooks:**
-
‘call.fork.stopped`
1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1326 def stop_forking(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopForkingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/fork_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopForkingResponse, options: ) end |
#stop_gather(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopGatherResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopGatherParams for more details.
Stop current gather.
**Expected Webhooks:**
-
‘call.gather.ended`
1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1359 def stop_gather(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopGatherParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/gather_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopGatherResponse, options: ) end |
#stop_noise_suppression(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopNoiseSuppressionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopNoiseSuppressionParams for more details.
Noise Suppression Stop (BETA)
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1388 def stop_noise_suppression(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopNoiseSuppressionParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/suppression_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopNoiseSuppressionResponse, options: ) end |
#stop_playback(call_control_id, client_state: nil, command_id: nil, overlay: nil, stop: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopPlaybackResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopPlaybackParams for more details.
Stop audio being played on the call.
**Expected Webhooks:**
-
‘call.playback.ended` or `call.speak.ended`
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1425 def stop_playback(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopPlaybackParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/playback_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopPlaybackResponse, options: ) end |
#stop_recording(call_control_id, client_state: nil, command_id: nil, recording_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopRecordingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopRecordingParams for more details.
Stop recording the call.
**Expected Webhooks:**
-
‘call.recording.saved`
1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1460 def stop_recording(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopRecordingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/record_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopRecordingResponse, options: ) end |
#stop_siprec(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopSiprecResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopSiprecParams for more details.
Stop SIPREC session.
**Expected Webhooks:**
-
‘siprec.stopped`
1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1493 def stop_siprec(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopSiprecParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/siprec_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopSiprecResponse, options: ) end |
#stop_streaming(call_control_id, client_state: nil, command_id: nil, stream_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopStreamingResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopStreamingParams for more details.
Stop streaming a call to a WebSocket.
**Expected Webhooks:**
-
‘streaming.stopped`
1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1528 def stop_streaming(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopStreamingParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/streaming_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopStreamingResponse, options: ) end |
#stop_transcription(call_control_id, client_state: nil, command_id: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionStopTranscriptionResponse
Some parameter documentations has been truncated, see Models::Calls::ActionStopTranscriptionParams for more details.
Stop real-time transcription.
1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1557 def stop_transcription(call_control_id, params = {}) parsed, = Telnyx::Calls::ActionStopTranscriptionParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/transcription_stop", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionStopTranscriptionResponse, options: ) end |
#switch_supervisor_role(call_control_id, role:, request_options: {}) ⇒ Telnyx::Models::Calls::ActionSwitchSupervisorRoleResponse
Some parameter documentations has been truncated, see Models::Calls::ActionSwitchSupervisorRoleParams for more details.
Switch the supervisor role for a bridged call. This allows switching between different supervisor modes during an active call
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1585 def switch_supervisor_role(call_control_id, params) parsed, = Telnyx::Calls::ActionSwitchSupervisorRoleParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/switch_supervisor_role", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionSwitchSupervisorRoleResponse, options: ) end |
#transfer(call_control_id, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, audio_url: nil, client_state: nil, command_id: nil, custom_headers: nil, early_media: nil, from: nil, from_display_name: nil, media_encryption: nil, media_name: nil, mute_dtmf: nil, park_after_unbridge: nil, preferred_codecs: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, target_leg_client_state: nil, time_limit_secs: nil, timeout_secs: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {}) ⇒ Telnyx::Models::Calls::ActionTransferResponse
Some parameter documentations has been truncated, see Models::Calls::ActionTransferParams for more details.
Transfer a call to a new destination. If the transfer is unsuccessful, a ‘call.hangup` webhook for the other call (Leg B) will be sent indicating that the transfer could not be completed. The original call will remain active and may be issued additional commands, potentially transfering the call to an alternate destination.
**Expected Webhooks:**
-
‘call.initiated`
-
‘call.bridged` to Leg B
-
‘call.answered` or `call.hangup`
-
‘call.machine.detection.ended` if `answering_machine_detection` was requested
-
‘call.machine.greeting.ended` if `answering_machine_detection` was requested to detect the end of machine greeting
-
‘call.machine.premium.detection.ended` if `answering_machine_detection=premium` was requested
-
‘call.machine.premium.greeting.ended` if `answering_machine_detection=premium` was requested and a beep was detected
1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1703 def transfer(call_control_id, params) parsed, = Telnyx::Calls::ActionTransferParams.dump_request(params) @client.request( method: :post, path: ["calls/%1$s/actions/transfer", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionTransferResponse, options: ) end |
#update_client_state(call_control_id, client_state:, request_options: {}) ⇒ Telnyx::Models::Calls::ActionUpdateClientStateResponse
Some parameter documentations has been truncated, see Models::Calls::ActionUpdateClientStateParams for more details.
Updates client state
1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 |
# File 'lib/telnyx/resources/calls/actions.rb', line 1730 def update_client_state(call_control_id, params) parsed, = Telnyx::Calls::ActionUpdateClientStateParams.dump_request(params) @client.request( method: :put, path: ["calls/%1$s/actions/client_state_update", call_control_id], body: parsed, model: Telnyx::Models::Calls::ActionUpdateClientStateResponse, options: ) end |