Class: Twilio::TwiML::Stop

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

Overview

<Stop> 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| ... } ⇒ Stop

Returns a new instance of Stop.

Yields:

  • (_self)

Yield Parameters:



337
338
339
340
341
342
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 337

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

  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:



368
369
370
371
372
373
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 368

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:



353
354
355
356
357
358
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 353

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