Class: Twilio::TwiML::Start

Inherits:
TwiML
  • Object
show all
Defined in:
lib/twilio-ruby/twiml/voice_response.rb

Overview

<Start> TwiML Verb

Instance Attribute Summary

Attributes inherited from TwiML

#name

Instance Method Summary collapse

Methods inherited from TwiML

#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml

Constructor Details

#initialize(**keyword_args) {|_self| ... } ⇒ Start

Returns a new instance of Start.

Yields:

  • (_self)

Yield Parameters:



495
496
497
498
499
500
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 495

def initialize(**keyword_args)
  super(**keyword_args)
  @name = 'Start'

  yield(self) if block_given?
end

Instance Method Details

#siprec(name: nil, connector_name: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|siprec| ... } ⇒ Object

Create a new <Siprec> element

name

Friendly name given to SIPREC

connector_name

Unique name for Connector

track

Track to be streamed to remote service

status_callback

Status Callback URL

status_callback_method

Status Callback URL method

keyword_args

additional attributes

Yields:



526
527
528
529
530
531
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 526

def siprec(name: nil, connector_name: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
  siprec = Siprec.new(name: name, connector_name: connector_name, track: track, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)

  yield(siprec) if block_given?
  append(siprec)
end

#stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|stream| ... } ⇒ Object

Create a new <Stream> element

name

Friendly name given to the Stream

connector_name

Unique name for Stream Connector

url

URL of the remote service where the Stream is routed

track

Track to be streamed to remote service

status_callback

Status Callback URL

status_callback_method

Status Callback URL method

keyword_args

additional attributes

Yields:



511
512
513
514
515
516
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 511

def stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
  stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)

  yield(stream) if block_given?
  append(stream)
end

#transcription(name: nil, track: nil, status_callback_url: nil, status_callback_method: nil, inbound_track_label: nil, outbound_track_label: nil, partial_results: nil, language_code: nil, transcription_engine: nil, profanity_filter: nil, speech_model: nil, hints: nil, enable_automatic_punctuation: nil, intelligence_service: nil, **keyword_args) {|transcription| ... } ⇒ Object

Create a new <Transcription> element

name

Friendly name given to the Transcription

track

Track to be analyze by the provider

status_callback_url

Status Callback URL

status_callback_method

Status Callback URL method

inbound_track_label

Friendly name given to the Inbound Track

outbound_track_label

Friendly name given to the Outbound Track Label

partial_results

Indicates if partial results are going to be send to the customer

language_code

Language Code used by the transcription engine

transcription_engine

Transcription Engine to be used

profanity_filter

Enable Profanity Filter

speech_model

Speech Model used by the transcription engine

hints

Hints to be provided to the transcription engine

enable_automatic_punctuation

Enable Automatic Punctuation

intelligence_service

The SID or the unique name of the Intelligence Service to be used

keyword_args

additional attributes

Yields:



550
551
552
553
554
555
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 550

def transcription(name: nil, track: nil, status_callback_url: nil, status_callback_method: nil, inbound_track_label: nil, outbound_track_label: nil, partial_results: nil, language_code: nil, transcription_engine: nil, profanity_filter: nil, speech_model: nil, hints: nil, enable_automatic_punctuation: nil, intelligence_service: nil, **keyword_args)
  transcription = Transcription.new(name: name, track: track, status_callback_url: status_callback_url, status_callback_method: status_callback_method, inbound_track_label: inbound_track_label, outbound_track_label: outbound_track_label, partial_results: partial_results, language_code: language_code, transcription_engine: transcription_engine, profanity_filter: profanity_filter, speech_model: speech_model, hints: hints, enable_automatic_punctuation: enable_automatic_punctuation, intelligence_service: intelligence_service, **keyword_args)

  yield(transcription) if block_given?
  append(transcription)
end