Class: Telnyx::Models::Calls::ActionStartPlaybackParams

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

Overview

See Also:

  • Telnyx::Resources::Calls::Actions#start_playback

Defined Under Namespace

Modules: AudioType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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(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: {}) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::Calls::ActionStartPlaybackParams for more details.

Parameters:

  • call_control_id (String)
  • audio_type (Symbol, Telnyx::Models::Calls::ActionStartPlaybackParams::AudioType) (defaults to: nil)

    Specifies the type of audio provided in audio_url or playback_content.

  • audio_url (String) (defaults to: nil)

    The URL of a file to be played back on the call. The URL can point to either a W

  • cache_audio (Boolean) (defaults to: nil)

    Caches the audio file. Useful when playing the same audio file multiple times du

  • client_state (String) (defaults to: nil)

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

  • command_id (String) (defaults to: nil)

    Use this field to avoid duplicate commands. Telnyx will ignore any command with

  • loop_ (String, Integer) (defaults to: nil)

    The number of times the audio file should be played. If supplied, the value must

  • media_name (String) (defaults to: nil)

    The media_name of a file to be played back on the call. The media_name must poin

  • overlay (Boolean) (defaults to: nil)

    When enabled, audio will be mixed on top of any other audio that is actively bei

  • playback_content (String) (defaults to: nil)

    Allows a user to provide base64 encoded mp3 or wav. Note: when using this parame

  • stop (String) (defaults to: nil)

    When specified, it stops the current audio being played. Specify current to st

  • target_legs (String) (defaults to: nil)

    Specifies the leg or legs on which audio will be played. If supplied, the value

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


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

Instance Attribute Details

#audio_typeSymbol, ...

Specifies the type of audio provided in audio_url or playback_content.



20
# File 'lib/telnyx/models/calls/action_start_playback_params.rb', line 20

optional :audio_type, enum: -> { Telnyx::Calls::ActionStartPlaybackParams::AudioType }

#audio_urlString?

The URL of a file to be played back on 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)


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

optional :audio_url, String

#cache_audioBoolean?

Caches the audio file. Useful when playing the same audio file multiple times during the call.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


35
# File 'lib/telnyx/models/calls/action_start_playback_params.rb', line 35

optional :cache_audio, Telnyx::Internal::Type::Boolean

#call_control_idString

Parameters:

  • value (String)

Returns:

  • (String)


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


42
# File 'lib/telnyx/models/calls/action_start_playback_params.rb', line 42

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)


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

optional :command_id, String

#loop_String, ...

The number of times the audio file should be played. If supplied, the value must be an integer between 1 and 100, or the special string infinity for an endless loop.

Returns:

  • (String, Integer, nil)


57
# File 'lib/telnyx/models/calls/action_start_playback_params.rb', line 57

optional :loop_, union: -> { Telnyx::Calls::Loopcount }, api_name: :loop

#media_nameString?

The media_name of a file to be played back on 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)


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

optional :media_name, String

#overlayBoolean?

When enabled, audio will be mixed on top of any other audio that is actively being played back. Note that overlay: true will only work if there is another audio file already being played on the call.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

optional :overlay, Telnyx::Internal::Type::Boolean

#playback_contentString?

Allows a user to provide base64 encoded mp3 or wav. Note: when using this parameter, media_url and media_name in the playback_started and playback_ended webhooks will be empty

Parameters:

  • (String)

Returns:

  • (String, nil)


81
# File 'lib/telnyx/models/calls/action_start_playback_params.rb', line 81

optional :playback_content, String

#stopString?

When specified, it stops the current audio being played. Specify current to stop the current audio being played, and to play the next file in the queue. Specify all to stop the current audio file being played and to also clear all audio files from the queue.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :stop, String

#target_legsString?

Specifies the leg or legs on which audio will be played. If supplied, the value must be either self, opposite or both.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :target_legs, String

Instance Method Details

#to_hash{

Returns:

  • ({)


91
# File 'sig/telnyx/models/calls/action_start_playback_params.rbs', line 91

def to_hash: -> {