Class: Telnyx::Models::Calls::ActionTransferParams

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

Overview

See Also:

  • Telnyx::Resources::Calls::Actions#transfer

Defined Under Namespace

Modules: AnsweringMachineDetection, MediaEncryption, MuteDtmf, Privacy, Record, RecordChannels, RecordFormat, RecordTrack, RecordTrim, SipRegion, SipTransportProtocol, WebhookURLMethod, WebhookURLsMethod Classes: AnsweringMachineDetectionConfig, WebhookRetriesPolicy

Constant Summary collapse

Telnyx =

Returns:

  • (:SoundModifications)

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_transfer_params.rb', line 349

Instance Attribute Details

#answering_machine_detectionSymbol, ...

Enables Answering Machine 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.



40
41
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 40

optional :answering_machine_detection,
enum: -> { Telnyx::Calls::ActionTransferParams::AnsweringMachineDetection }

#answering_machine_detection_configTelnyx::Models::Calls::ActionTransferParams::AnsweringMachineDetectionConfig?

Optional configuration parameters to modify 'answering_machine_detection' performance. Only total_analysis_time_millis and greeting_duration_millis parameters are applicable when premium is selected as answering_machine_detection.



50
51
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 50

optional :answering_machine_detection_config,
-> { Telnyx::Calls::ActionTransferParams::AnsweringMachineDetectionConfig }

#audio_urlString?

The URL of a file to be played back when the transfer destination answers before bridging the call. The URL can point to either a WAV or MP3 file. media_name and audio_url cannot be used together in one request.

Parameters:

  • (String)

Returns:

  • (String, nil)


59
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 59

optional :audio_url, String

#call_control_idString

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/telnyx/models/calls/action_transfer_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.

Parameters:

  • (String)

Returns:

  • (String, nil)


66
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 66

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


73
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 73

optional :command_id, String

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

Custom headers to be added to the SIP INVITE.

Returns:



79
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 79

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

#diversionString?

The number the inbound call being transferred was originally received on, in +E164 format. Supplying it lets an unverified non-Telnyx from be used as the caller id, provided that number is still on an active inbound call to this diversion number for your account. The diversion number itself must be one you own or have verified.

Parameters:

  • (String)

Returns:

  • (String, nil)


89
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 89

optional :diversion, String

#early_mediaBoolean?

If set to false, early media will not be passed to the originating leg.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


95
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 95

optional :early_media, 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. This attribute will default to the to number of the original call if omitted.

Parameters:

  • (String)

Returns:

  • (String, nil)


103
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 103

optional :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.

Parameters:

  • (String)

Returns:

  • (String, nil)


113
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 113

optional :from_display_name, String

#media_encryptionSymbol, ...

Defines whether media should be encrypted on the new call leg. For SIP URI destinations, media encryption can also be requested per endpoint with the secure URI parameter: ;secure=true or ;secure=srtp enables SRTP, and ;secure=dtls enables DTLS. This parameter, when set to SRTP or DTLS, takes precedence over the per-endpoint secure value.



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

optional :media_encryption, enum: -> { Telnyx::Calls::ActionTransferParams::MediaEncryption }

#media_nameString?

The media_name of a file to be played back when the transfer destination answers before bridging the call. 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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :media_name, String

#mute_dtmfSymbol, ...

When enabled, DTMF tones are not passed to the call participant. The webhooks containing the DTMF information will be sent.



139
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 139

optional :mute_dtmf, enum: -> { Telnyx::Calls::ActionTransferParams::MuteDtmf }

#park_after_unbridgeString?

Specifies behavior after the bridge ends (i.e. the opposite leg either hangs up or is transferred). 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.

Parameters:

  • (String)

Returns:

  • (String, nil)


147
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 147

optional :park_after_unbridge, String

#preferred_codecsString?

The list of comma-separated codecs in order of preference to be used during the call. The codecs supported are G722, PCMU, PCMA, G729, OPUS, VP8, H264, AMR-WB.

Parameters:

  • (String)

Returns:

  • (String, nil)


155
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 155

optional :preferred_codecs, String

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



163
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 163

optional :privacy, enum: -> { Telnyx::Calls::ActionTransferParams::Privacy }

#recordSymbol, ...

Start recording automatically after an event. Disabled by default.



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

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

#record_channelsSymbol, ...

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



176
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 176

optional :record_channels, enum: -> { Telnyx::Calls::ActionTransferParams::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.

Parameters:

  • (String)

Returns:

  • (String, nil)


183
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 183

optional :record_custom_file_name, String

#record_formatSymbol, ...

Defines the format of the recording ('wav' or 'mp3') when record is specified.



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

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


197
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 197

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


207
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 207

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



215
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 215

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

#record_trimSymbol, ...

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



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

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

#route_to_mobileBoolean?

When set to true, routes the call directly to the mobile device associated with the destination Telnyx Mobile number, bypassing Inbound Calls Interception configured in the Telnyx Portal under Mobile Numbers → select the number → Voice → Call Interception. Use this when transferring an intercepted call to the mobile device to prevent the call from being intercepted again. Defaults to false.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


233
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 233

optional :route_to_mobile, Telnyx::Internal::Type::Boolean

#send_digits_on_answerString?

DTMF digits to send automatically after the transfer destination answers. Useful for reaching an extension behind an IVR (e.g. "200" to dial extension 200 once the called party picks up). Allowed characters: 0-9, A-D, w (0.5s pause), W (1s pause), *, #. Maximum 64 characters. When omitted, no automatic DTMF is sent. May also be supplied inline by appending ,<digits> to to (e.g. to=+18004247767,200); if both forms are present, this explicit field takes precedence.

Parameters:

  • (String)

Returns:

  • (String, nil)


245
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 245

optional :send_digits_on_answer, String

#sip_auth_passwordString?

SIP Authentication password used for SIP challenges.

Parameters:

  • (String)

Returns:

  • (String, nil)


251
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 251

optional :sip_auth_password, String

#sip_auth_usernameString?

SIP Authentication username used for SIP challenges.

Parameters:

  • (String)

Returns:

  • (String, nil)


257
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 257

optional :sip_auth_username, String

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

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

Returns:



264
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 264

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

#sip_regionSymbol, ...

Defines the SIP region to be used for the call.



270
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 270

optional :sip_region, enum: -> { Telnyx::Calls::ActionTransferParams::SipRegion }

#sip_transport_protocolSymbol, ...

Defines SIP transport protocol to be used on the call.



276
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 276

optional :sip_transport_protocol, enum: -> { Telnyx::Calls::ActionTransferParams::SipTransportProtocol }

#sound_modificationsTelnyx::Models::SoundModifications?

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



282
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 282

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

#target_leg_client_stateString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


289
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 289

optional :target_leg_client_state, String

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


310
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 310

optional :timeout_secs, Integer

#toString

The DID or SIP URI to dial out to. For SIP URI destinations, append ;secure=true or ;secure=srtp to enable SRTP media encryption for that endpoint, or ;secure=dtls to enable DTLS media encryption for that endpoint. If media_encryption is set to SRTP or DTLS, it takes precedence over any per-endpoint secure URI parameter. You may also append a comma followed by DTMF digits (e.g. +18004247767,200) to play those digits as DTMF once the transfer destination answers — equivalent to setting send_digits_on_answer separately. If both are present, the explicit send_digits_on_answer parameter takes precedence.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 28

required :to, String

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



318
319
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 318

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

#webhook_urlString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :webhook_url, String

#webhook_url_methodSymbol, ...

HTTP request type used for webhook_url.



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

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

#webhook_urlsHash{Symbol=>Array<String>}?

A map of event types to arrays of webhook URLs. When an event of the specified type occurs, the webhook URLs 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=>Array<String>}, nil)


341
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 341

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

#webhook_urls_methodSymbol, ...

HTTP request method to invoke webhook_urls.



347
# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 347

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/calls/action_transfer_params.rb', line 456

Instance Method Details

#to_hash{

Returns:

  • ({)


303
# File 'sig/telnyx/models/calls/action_transfer_params.rbs', line 303

def to_hash: -> {