Class: Telnyx::Models::Calls::ActionAnswerParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/calls/action_answer_params.rb

Overview

Defined Under Namespace

Modules: PreferredCodecs, Record, RecordChannels, RecordFormat, RecordTrack, RecordTrim, StreamTrack, WebhookURLMethod, WebhookURLsMethod Classes: DeepfakeDetection, WebhookRetriesPolicy

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(retries_ms: nil) ⇒ Object

Some parameter documentations has been truncated, see WebhookRetriesPolicy for more details.

Parameters:

  • retries_ms (Array<Integer>) (defaults to: nil)

    Array of delays in milliseconds between retry attempts. Total sum cannot exceed



# File 'lib/telnyx/models/calls/action_answer_params.rb', line 321

Instance Attribute Details

#assistantTelnyx::Models::CallAssistantRequest?

AI Assistant configuration. All fields except ‘id` are optional — the assistant’s stored configuration will be used as fallback for any omitted fields.



22
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 22

optional :assistant, -> { Telnyx::CallAssistantRequest }

#billing_group_idString?

Use this field to set the Billing Group ID for the call. Must be a valid and existing Billing Group ID.

Returns:

  • (String, nil)


29
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 29

optional :billing_group_id, String

#call_control_idString

Returns:

  • (String)


14
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 14

required :call_control_id, String

#client_stateString?

Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.

Returns:

  • (String, nil)


36
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 36

optional :client_state, String

#command_idString?

Use this field to avoid duplicate commands. Telnyx will ignore any command with the same ‘command_id` for the same `call_control_id`.

Returns:

  • (String, nil)


43
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 43

optional :command_id, String

#custom_headersArray<Telnyx::Models::CustomSipHeader>?

Custom headers to be added to the SIP INVITE response.

Returns:



49
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 49

optional :custom_headers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::CustomSipHeader] }

#deepfake_detectionTelnyx::Models::Calls::ActionAnswerParams::DeepfakeDetection?

Enables deepfake detection on the call. When enabled, audio from the remote party is streamed to a detection service that analyzes whether the voice is AI-generated. Results are delivered via the ‘call.deepfake_detection.result` webhook.



58
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 58

optional :deepfake_detection, -> { Telnyx::Calls::ActionAnswerParams::DeepfakeDetection }

#preferred_codecsSymbol, ...

The list of comma-separated codecs in a preferred order for the forked media to be received.



65
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 65

optional :preferred_codecs, enum: -> { Telnyx::Calls::ActionAnswerParams::PreferredCodecs }

#recordSymbol, ...

Start recording automatically after an event. Disabled by default.



71
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 71

optional :record, enum: -> { Telnyx::Calls::ActionAnswerParams::Record }

#record_channelsSymbol, ...

Defines which channel should be recorded (‘single’ or ‘dual’) when ‘record` is specified.



78
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 78

optional :record_channels, enum: -> { Telnyx::Calls::ActionAnswerParams::RecordChannels }

#record_custom_file_nameString?

The custom recording file name to be used instead of the default ‘call_leg_id`. Telnyx will still add a Unix timestamp suffix.

Returns:

  • (String, nil)


85
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 85

optional :record_custom_file_name, String

#record_formatSymbol, ...

Defines the format of the recording (‘wav’ or ‘mp3’) when ‘record` is specified.



91
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 91

optional :record_format, enum: -> { Telnyx::Calls::ActionAnswerParams::RecordFormat }

#record_max_lengthInteger?

Defines the maximum length for the recording in seconds when ‘record` is specified. The minimum value is 0. The maximum value is 43200. The default value is 0 (infinite).

Returns:

  • (Integer, nil)


99
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 99

optional :record_max_length, Integer

#record_timeout_secsInteger?

The number of seconds that Telnyx will wait for the recording to be stopped if silence is detected when ‘record` is specified. The timer only starts when the speech is detected. Please note that call transcription is used to detect silence and the related charge will be applied. The minimum value is 0. The default value is 0 (infinite).

Returns:

  • (Integer, nil)


109
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 109

optional :record_timeout_secs, Integer

#record_trackSymbol, ...

The audio track to be recorded. Can be either ‘both`, `inbound` or `outbound`. If only single track is specified (`inbound`, `outbound`), `channels` configuration is ignored and it will be recorded as mono (single channel).



117
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 117

optional :record_track, enum: -> { Telnyx::Calls::ActionAnswerParams::RecordTrack }

#record_trimSymbol, ...

When set to ‘trim-silence`, silence will be removed from the beginning and end of the recording.



124
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 124

optional :record_trim, enum: -> { Telnyx::Calls::ActionAnswerParams::RecordTrim }

#send_silence_when_idleBoolean?

Generate silence RTP packets when no transmission available.

Returns:

  • (Boolean, nil)


130
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 130

optional :send_silence_when_idle, Telnyx::Internal::Type::Boolean

#sip_headersArray<Telnyx::Models::SipHeader>?

SIP headers to be added to the SIP INVITE response. Currently only User-to-User header is supported.

Returns:



137
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 137

optional :sip_headers, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::SipHeader] }

#sound_modificationsTelnyx::Models::SoundModifications?

Use this field to modify sound effects, for example adjust the pitch.



143
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 143

optional :sound_modifications, -> { Telnyx::SoundModifications }

#stream_bidirectional_codecSymbol, ...

Indicates codec for bidirectional streaming RTP payloads. Used only with stream_bidirectional_mode=rtp. Case sensitive.



150
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 150

optional :stream_bidirectional_codec, enum: -> { Telnyx::StreamBidirectionalCodec }

#stream_bidirectional_modeSymbol, ...

Configures method of bidirectional streaming (mp3, rtp).

Returns:



156
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 156

optional :stream_bidirectional_mode, enum: -> { Telnyx::StreamBidirectionalMode }

#stream_bidirectional_target_legsSymbol, ...

Specifies which call legs should receive the bidirectional stream audio.



162
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 162

optional :stream_bidirectional_target_legs, enum: -> { Telnyx::StreamBidirectionalTargetLegs }

#stream_codecSymbol, ...

Specifies the codec to be used for the streamed audio. When set to ‘default’ or when transcoding is not possible, the codec from the call will be used.

Returns:



169
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 169

optional :stream_codec, enum: -> { Telnyx::StreamCodec }

#stream_trackSymbol, ...

Specifies which track should be streamed.



175
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 175

optional :stream_track, enum: -> { Telnyx::Calls::ActionAnswerParams::StreamTrack }

#stream_urlString?

The destination WebSocket address where the stream is going to be delivered.

Returns:

  • (String, nil)


181
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 181

optional :stream_url, String

#transcriptionBoolean?

Enable transcription upon call answer. The default value is false.

Returns:

  • (Boolean, nil)


187
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 187

optional :transcription, Telnyx::Internal::Type::Boolean

#transcription_configTelnyx::Models::Calls::TranscriptionStartRequest?



192
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 192

optional :transcription_config, -> { Telnyx::Calls::TranscriptionStartRequest }

#webhook_retries_policiesHash{Symbol=>Telnyx::Models::Calls::ActionAnswerParams::WebhookRetriesPolicy}?

A map of event types to retry policies. Each retry policy contains an array of ‘retries_ms` specifying the delays between retry attempts in milliseconds. Maximum 5 retries, total delay cannot exceed 60 seconds.



200
201
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 200

optional :webhook_retries_policies,
-> { Telnyx::Internal::Type::HashOf[Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy] }

#webhook_urlString?

Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call.

Returns:

  • (String, nil)


208
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 208

optional :webhook_url, String

#webhook_url_methodSymbol, ...

HTTP request type used for ‘webhook_url`.



214
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 214

optional :webhook_url_method, enum: -> { Telnyx::Calls::ActionAnswerParams::WebhookURLMethod }

#webhook_urlsHash{Symbol=>String}?

A map of event types to webhook URLs. When an event of the specified type occurs, the webhook URL associated with that event type will be called instead of ‘webhook_url`. Events not mapped here will use the default `webhook_url`.

Returns:

  • (Hash{Symbol=>String}, nil)


222
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 222

optional :webhook_urls, Telnyx::Internal::Type::HashOf[String]

#webhook_urls_methodSymbol, ...

HTTP request method to invoke ‘webhook_urls`.



228
# File 'lib/telnyx/models/calls/action_answer_params.rb', line 228

optional :webhook_urls_method, enum: -> { Telnyx::Calls::ActionAnswerParams::WebhookURLsMethod }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/calls/action_answer_params.rb', line 344