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:


420
421
422
423
424
425
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 420

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, **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

keyword_args

additional attributes

Yields:


449
450
451
452
453
454
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 449

def siprec(name: nil, connector_name: nil, track: nil, **keyword_args)
  siprec = Siprec.new(name: name, connector_name: connector_name, track: track, **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:


436
437
438
439
440
441
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 436

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