Class: Telnyx::Models::CallDialParams

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

Overview

Defined Under Namespace

Modules: AnsweringMachineDetection, MediaEncryption, Privacy, Record, RecordChannels, RecordFormat, RecordTrack, RecordTrim, SipRegion, SipTransportProtocol, StreamTrack, SupervisorRole, To, WebhookURLMethod, WebhookURLsMethod Classes: AnsweringMachineDetectionConfig, ConferenceConfig, 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/call_dial_params.rb', line 451

Instance Attribute Details

#answering_machine_detectionSymbol, ...

Enables Answering Machine Detection. Telnyx offers Premium and Standard detections. With Premium detection, when a call is answered, Telnyx runs real-time detection and sends a ‘call.machine.premium.detection.ended` webhook with one of the following results: `human_residence`, `human_business`, `machine`, `silence` or `fax_detected`. If we detect a beep, we also send a `call.machine.premium.greeting.ended` webhook with the result of `beep_detected`. If we detect a beep before `call.machine.premium.detection.ended` we only send `call.machine.premium.greeting.ended`, and if we detect a beep after `call.machine.premium.detection.ended`, we send both webhooks. With Standard detection, when a call is answered, Telnyx runs real-time detection to determine if it was picked up by a human or a machine and sends an `call.machine.detection.ended` webhook with the analysis result. If `greeting_end` or `detect_words` is used and a `machine` is detected, you will receive another `call.machine.greeting.ended` webhook when the answering machine greeting ends with a beep or silence. If `detect_beep` is used, you will only receive `call.machine.greeting.ended` if a beep is detected.



51
# File 'lib/telnyx/models/call_dial_params.rb', line 51

optional :answering_machine_detection, enum: -> { Telnyx::CallDialParams::AnsweringMachineDetection }

#answering_machine_detection_configTelnyx::Models::CallDialParams::AnsweringMachineDetectionConfig?

Optional configuration parameters to modify ‘answering_machine_detection’ performance.



58
59
# File 'lib/telnyx/models/call_dial_params.rb', line 58

optional :answering_machine_detection_config,
-> { Telnyx::CallDialParams::AnsweringMachineDetectionConfig }

#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.



67
# File 'lib/telnyx/models/call_dial_params.rb', line 67

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

#audio_urlString?

The URL of a file to be played back to the callee when the call is answered. The URL can point to either a WAV or MP3 file. media_name and audio_url cannot be used together in one request.

Returns:

  • (String, nil)


75
# File 'lib/telnyx/models/call_dial_params.rb', line 75

optional :audio_url, String

#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)


82
# File 'lib/telnyx/models/call_dial_params.rb', line 82

optional :billing_group_id, String

#bridge_intentBoolean?

Indicates the intent to bridge this call with the call specified in link_to. When bridge_intent is true, link_to becomes required and the from number will be overwritten by the from number from the linked call.

Returns:

  • (Boolean, nil)


90
# File 'lib/telnyx/models/call_dial_params.rb', line 90

optional :bridge_intent, Telnyx::Internal::Type::Boolean

#bridge_on_answerBoolean?

Whether to automatically bridge answered call to the call specified in link_to. When bridge_on_answer is true, link_to becomes required.

Returns:

  • (Boolean, nil)


97
# File 'lib/telnyx/models/call_dial_params.rb', line 97

optional :bridge_on_answer, Telnyx::Internal::Type::Boolean

#client_stateString?

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

Returns:

  • (String, nil)


104
# File 'lib/telnyx/models/call_dial_params.rb', line 104

optional :client_state, String

#command_idString?

Use this field to avoid duplicate commands. Telnyx will ignore others Dial commands with the same ‘command_id`.

Returns:

  • (String, nil)


111
# File 'lib/telnyx/models/call_dial_params.rb', line 111

optional :command_id, String

#conference_configTelnyx::Models::CallDialParams::ConferenceConfig?

Optional configuration parameters to dial new participant into a conference.



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

optional :conference_config, -> { Telnyx::CallDialParams::ConferenceConfig }

#connection_idString

The ID of the Call Control App (formerly ID of the connection) to be used when dialing the destination.

Returns:

  • (String)


15
# File 'lib/telnyx/models/call_dial_params.rb', line 15

required :connection_id, String

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

Custom headers to be added to the SIP INVITE.

Returns:



123
# File 'lib/telnyx/models/call_dial_params.rb', line 123

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

#deepfake_detectionTelnyx::Models::CallDialParams::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.



132
# File 'lib/telnyx/models/call_dial_params.rb', line 132

optional :deepfake_detection, -> { Telnyx::CallDialParams::DeepfakeDetection }

#dialogflow_configTelnyx::Models::DialogflowConfig?



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

optional :dialogflow_config, -> { Telnyx::DialogflowConfig }

#enable_dialogflowBoolean?

Enables Dialogflow for the current call. The default value is false.

Returns:

  • (Boolean, nil)


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

optional :enable_dialogflow, Telnyx::Internal::Type::Boolean

#fromString

The ‘from` number to be used as the caller id presented to the destination (`to` number). The number should be in +E164 format.

Returns:

  • (String)


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

required :from, String

#from_display_nameString?

The ‘from_display_name` string to be used as the caller id name (SIP From Display Name) presented to the destination (`to` number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If ommited, the display name will be the same as the number in the `from` field.

Returns:

  • (String, nil)


153
# File 'lib/telnyx/models/call_dial_params.rb', line 153

optional :from_display_name, String

Use another call’s control id for sharing the same call session id

Returns:

  • (String, nil)


159
# File 'lib/telnyx/models/call_dial_params.rb', line 159

optional :link_to, String

#media_encryptionSymbol, ...

Defines whether media should be encrypted on the call.



165
# File 'lib/telnyx/models/call_dial_params.rb', line 165

optional :media_encryption, enum: -> { Telnyx::CallDialParams::MediaEncryption }

#media_nameString?

The media_name of a file to be played back to the callee when the call is answered. The media_name must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. The file must either be a WAV or MP3 file.

Returns:

  • (String, nil)


174
# File 'lib/telnyx/models/call_dial_params.rb', line 174

optional :media_name, String

#park_after_unbridgeString?

If supplied with the value ‘self`, the current leg will be parked after unbridge. If not set, the default behavior is to hang up the leg. When park_after_unbridge is set, link_to becomes required.

Returns:

  • (String, nil)


182
# File 'lib/telnyx/models/call_dial_params.rb', line 182

optional :park_after_unbridge, String

#preferred_codecsString?

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

Returns:

  • (String, nil)


189
# File 'lib/telnyx/models/call_dial_params.rb', line 189

optional :preferred_codecs, String

#prevent_double_bridgeBoolean?

Prevents bridging and hangs up the call if the target is already bridged. Disabled by default.

Returns:

  • (Boolean, nil)


196
# File 'lib/telnyx/models/call_dial_params.rb', line 196

optional :prevent_double_bridge, Telnyx::Internal::Type::Boolean

#privacySymbol, ...

Indicates the privacy level to be used for the call. When set to ‘id`, caller ID information (name and number) will be hidden from the called party. When set to `none` or omitted, caller ID will be shown normally.

Returns:



204
# File 'lib/telnyx/models/call_dial_params.rb', line 204

optional :privacy, enum: -> { Telnyx::CallDialParams::Privacy }

#recordSymbol, ...

Start recording automatically after an event. Disabled by default.

Returns:



210
# File 'lib/telnyx/models/call_dial_params.rb', line 210

optional :record, enum: -> { Telnyx::CallDialParams::Record }

#record_channelsSymbol, ...

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



217
# File 'lib/telnyx/models/call_dial_params.rb', line 217

optional :record_channels, enum: -> { Telnyx::CallDialParams::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)


224
# File 'lib/telnyx/models/call_dial_params.rb', line 224

optional :record_custom_file_name, String

#record_formatSymbol, ...

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



230
# File 'lib/telnyx/models/call_dial_params.rb', line 230

optional :record_format, enum: -> { Telnyx::CallDialParams::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)


238
# File 'lib/telnyx/models/call_dial_params.rb', line 238

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)


248
# File 'lib/telnyx/models/call_dial_params.rb', line 248

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).



256
# File 'lib/telnyx/models/call_dial_params.rb', line 256

optional :record_track, enum: -> { Telnyx::CallDialParams::RecordTrack }

#record_trimSymbol, ...

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



263
# File 'lib/telnyx/models/call_dial_params.rb', line 263

optional :record_trim, enum: -> { Telnyx::CallDialParams::RecordTrim }

#send_silence_when_idleBoolean?

Generate silence RTP packets when no transmission available.

Returns:

  • (Boolean, nil)


269
# File 'lib/telnyx/models/call_dial_params.rb', line 269

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

#sip_auth_passwordString?

SIP Authentication password used for SIP challenges.

Returns:

  • (String, nil)


275
# File 'lib/telnyx/models/call_dial_params.rb', line 275

optional :sip_auth_password, String

#sip_auth_usernameString?

SIP Authentication username used for SIP challenges.

Returns:

  • (String, nil)


281
# File 'lib/telnyx/models/call_dial_params.rb', line 281

optional :sip_auth_username, String

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

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

Returns:



288
# File 'lib/telnyx/models/call_dial_params.rb', line 288

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

#sip_regionSymbol, ...

Defines the SIP region to be used for the call.



294
# File 'lib/telnyx/models/call_dial_params.rb', line 294

optional :sip_region, enum: -> { Telnyx::CallDialParams::SipRegion }

#sip_transport_protocolSymbol, ...

Defines SIP transport protocol to be used on the call.



300
# File 'lib/telnyx/models/call_dial_params.rb', line 300

optional :sip_transport_protocol, enum: -> { Telnyx::CallDialParams::SipTransportProtocol }

#sound_modificationsTelnyx::Models::SoundModifications?

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



306
# File 'lib/telnyx/models/call_dial_params.rb', line 306

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

#stream_auth_tokenString?

An authentication token to be sent as part of the WebSocket connection when using streaming. Maximum length is 4000 characters.

Returns:

  • (String, nil)


313
# File 'lib/telnyx/models/call_dial_params.rb', line 313

optional :stream_auth_token, String

#stream_bidirectional_codecSymbol, ...

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



320
# File 'lib/telnyx/models/call_dial_params.rb', line 320

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

#stream_bidirectional_modeSymbol, ...

Configures method of bidirectional streaming (mp3, rtp).

Returns:



326
# File 'lib/telnyx/models/call_dial_params.rb', line 326

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

#stream_bidirectional_sampling_rateInteger, ...

Audio sampling rate.



332
# File 'lib/telnyx/models/call_dial_params.rb', line 332

optional :stream_bidirectional_sampling_rate, enum: -> { Telnyx::StreamBidirectionalSamplingRate }

#stream_bidirectional_target_legsSymbol, ...

Specifies which call legs should receive the bidirectional stream audio.



338
# File 'lib/telnyx/models/call_dial_params.rb', line 338

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:



345
# File 'lib/telnyx/models/call_dial_params.rb', line 345

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

#stream_establish_before_call_originateBoolean?

Establish websocket connection before dialing the destination. This is useful for cases where the websocket connection takes a long time to establish.

Returns:

  • (Boolean, nil)


352
# File 'lib/telnyx/models/call_dial_params.rb', line 352

optional :stream_establish_before_call_originate, Telnyx::Internal::Type::Boolean

#stream_trackSymbol, ...

Specifies which track should be streamed.



358
# File 'lib/telnyx/models/call_dial_params.rb', line 358

optional :stream_track, enum: -> { Telnyx::CallDialParams::StreamTrack }

#stream_urlString?

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

Returns:

  • (String, nil)


364
# File 'lib/telnyx/models/call_dial_params.rb', line 364

optional :stream_url, String

#supervise_call_control_idString?

The call leg which will be supervised by the new call.

Returns:

  • (String, nil)


370
# File 'lib/telnyx/models/call_dial_params.rb', line 370

optional :supervise_call_control_id, String

#supervisor_roleSymbol, ...

The role of the supervisor call. ‘barge’ means that supervisor call hears and is being heard by both ends of the call (caller & callee). ‘whisper’ means that only supervised_call_control_id hears supervisor but supervisor can hear everything. ‘monitor’ means that nobody can hear supervisor call, but supervisor can hear everything on the call.



380
# File 'lib/telnyx/models/call_dial_params.rb', line 380

optional :supervisor_role, enum: -> { Telnyx::CallDialParams::SupervisorRole }

#time_limit_secsInteger?

Sets the maximum duration of a Call Control Leg in seconds. If the time limit is reached, the call will hangup and a ‘call.hangup` webhook with a `hangup_cause` of `time_limit` will be sent. For example, by setting a time limit of 120 seconds, a Call Leg will be automatically terminated two minutes after being answered. The default time limit is 14400 seconds or 4 hours and this is also the maximum allowed call length.

Returns:

  • (Integer, nil)


391
# File 'lib/telnyx/models/call_dial_params.rb', line 391

optional :time_limit_secs, Integer

#timeout_secsInteger?

The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being called. If the timeout is reached before an answer is received, the call will hangup and a ‘call.hangup` webhook with a `hangup_cause` of `timeout` will be sent. Minimum value is 5 seconds. Maximum value is 600 seconds.

Returns:

  • (Integer, nil)


401
# File 'lib/telnyx/models/call_dial_params.rb', line 401

optional :timeout_secs, Integer

#toString+

The DID or SIP URI to dial out to. Multiple DID or SIP URIs can be provided using an array of strings

Returns:

  • (String, Array<String>)


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

required :to, union: -> { Telnyx::CallDialParams::To }

#transcriptionBoolean?

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

Returns:

  • (Boolean, nil)


407
# File 'lib/telnyx/models/call_dial_params.rb', line 407

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

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



412
# File 'lib/telnyx/models/call_dial_params.rb', line 412

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

#webhook_retries_policiesHash{Symbol=>Telnyx::Models::CallDialParams::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.



420
421
# File 'lib/telnyx/models/call_dial_params.rb', line 420

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

#webhook_urlString?

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

Returns:

  • (String, nil)


428
# File 'lib/telnyx/models/call_dial_params.rb', line 428

optional :webhook_url, String

#webhook_url_methodSymbol, ...

HTTP request type used for ‘webhook_url`.



434
# File 'lib/telnyx/models/call_dial_params.rb', line 434

optional :webhook_url_method, enum: -> { Telnyx::CallDialParams::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 the default webhook URL. Events not mapped here will use the default webhook URL.

Returns:

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


443
# File 'lib/telnyx/models/call_dial_params.rb', line 443

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

#webhook_urls_methodSymbol, ...

HTTP request method to invoke ‘webhook_urls`.



449
# File 'lib/telnyx/models/call_dial_params.rb', line 449

optional :webhook_urls_method, enum: -> { Telnyx::CallDialParams::WebhookURLsMethod }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/call_dial_params.rb', line 621