Class: Twilio::TwiML::Dial

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

Overview

<Dial> 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(number: nil, **keyword_args) {|_self| ... } ⇒ Dial

Returns a new instance of Dial.

Yields:

  • (_self)

Yield Parameters:



1632
1633
1634
1635
1636
1637
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1632

def initialize(number: nil, **keyword_args)
  super(**keyword_args)
  @name = 'Dial'
  @value = number unless number.nil?
  yield(self) if block_given?
end

Instance Method Details

#application(application_sid: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, customer_id: nil, copy_parent_to: nil, **keyword_args) {|application| ... } ⇒ Object

Create a new <Application> element

application_sid

Application sid

url

TwiML URL

method

TwiML URL Method

status_callback_event

Events to trigger status callback

status_callback

Status Callback URL

status_callback_method

Status Callback URL Method

customer_id

Identity of the customer calling application

copy_parent_to

Copy parent call To field to called application side, otherwise use the application sid as To field

keyword_args

additional attributes

Yields:



1758
1759
1760
1761
1762
1763
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1758

def application(application_sid: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, customer_id: nil, copy_parent_to: nil, **keyword_args)
  application = Application.new(application_sid: application_sid, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, customer_id: customer_id, copy_parent_to: copy_parent_to, **keyword_args)

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

#client(identity: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|client| ... } ⇒ Object

Create a new <Client> element

identity

Client identity

url

Client URL

method

Client URL Method

status_callback_event

Events to trigger status callback

status_callback

Status Callback URL

status_callback_method

Status Callback URL Method

keyword_args

additional attributes

Yields:



1648
1649
1650
1651
1652
1653
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1648

def client(identity: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
  client = Client.new(identity: identity, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)

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

#conference(name, muted: nil, beep: nil, start_conference_on_enter: nil, end_conference_on_exit: nil, wait_url: nil, wait_method: nil, max_participants: nil, record: nil, region: nil, coach: nil, trim: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, event_callback_url: nil, jitter_buffer_size: nil, participant_label: nil, **keyword_args) ⇒ Object

Create a new <Conference> element

name

Conference name

muted

Join the conference muted

beep

Play beep when joining

start_conference_on_enter

Start the conference on enter

end_conference_on_exit

End the conferenceon exit

wait_url

Wait URL

wait_method

Wait URL method

max_participants

Maximum number of participants

record

Record the conference

region

Conference region

coach

Call coach

trim

Trim the conference recording

status_callback_event

Events to call status callback URL

status_callback

Status callback URL

status_callback_method

Status callback URL method

recording_status_callback

Recording status callback URL

recording_status_callback_method

Recording status callback URL method

recording_status_callback_event

Recording status callback events

event_callback_url

Event callback URL

jitter_buffer_size

Size of jitter buffer for participant

participant_label

A label for participant

keyword_args

additional attributes



1679
1680
1681
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1679

def conference(name, muted: nil, beep: nil, start_conference_on_enter: nil, end_conference_on_exit: nil, wait_url: nil, wait_method: nil, max_participants: nil, record: nil, region: nil, coach: nil, trim: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, event_callback_url: nil, jitter_buffer_size: nil, participant_label: nil, **keyword_args)
  append(Conference.new(name, muted: muted, beep: beep, start_conference_on_enter: start_conference_on_enter, end_conference_on_exit: end_conference_on_exit, wait_url: wait_url, wait_method: wait_method, max_participants: max_participants, record: record, region: region, coach: coach, trim: trim, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, event_callback_url: event_callback_url, jitter_buffer_size: jitter_buffer_size, participant_label: participant_label, **keyword_args))
end

#number(phone_number, send_digits: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, byoc: nil, machine_detection: nil, amd_status_callback_method: nil, amd_status_callback: nil, machine_detection_timeout: nil, machine_detection_speech_threshold: nil, machine_detection_speech_end_threshold: nil, machine_detection_silence_timeout: nil, **keyword_args) ⇒ Object

Create a new <Number> element

phone_number

Phone Number to dial

send_digits

DTMF tones to play when the call is answered

url

TwiML URL

method

TwiML URL method

status_callback_event

Events to call status callback

status_callback

Status callback URL

status_callback_method

Status callback URL method

byoc

BYOC trunk SID (Beta)

machine_detection

Enable machine detection or end of greeting detection

amd_status_callback_method

HTTP Method to use with amd_status_callback

amd_status_callback

The URL we should call to send amd status information to your application

machine_detection_timeout

Number of seconds to wait for machine detection

machine_detection_speech_threshold

Number of milliseconds for measuring stick for the length of the speech activity

machine_detection_speech_end_threshold

Number of milliseconds of silence after speech activity

machine_detection_silence_timeout

Number of milliseconds of initial silence

keyword_args

additional attributes



1701
1702
1703
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1701

def number(phone_number, send_digits: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, byoc: nil, machine_detection: nil, amd_status_callback_method: nil, amd_status_callback: nil, machine_detection_timeout: nil, machine_detection_speech_threshold: nil, machine_detection_speech_end_threshold: nil, machine_detection_silence_timeout: nil, **keyword_args)
  append(Number.new(phone_number, send_digits: send_digits, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, byoc: byoc, machine_detection: machine_detection, amd_status_callback_method: amd_status_callback_method, amd_status_callback: amd_status_callback, machine_detection_timeout: machine_detection_timeout, machine_detection_speech_threshold: machine_detection_speech_threshold, machine_detection_speech_end_threshold: machine_detection_speech_end_threshold, machine_detection_silence_timeout: machine_detection_silence_timeout, **keyword_args))
end

#queue(name, url: nil, method: nil, reservation_sid: nil, post_work_activity_sid: nil, **keyword_args) ⇒ Object

Create a new <Queue> element

name

Queue name

url

Action URL

method

Action URL method

reservation_sid

TaskRouter Reservation SID

post_work_activity_sid

TaskRouter Activity SID

keyword_args

additional attributes



1713
1714
1715
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1713

def queue(name, url: nil, method: nil, reservation_sid: nil, post_work_activity_sid: nil, **keyword_args)
  append(Queue.new(name, url: url, method: method, reservation_sid: reservation_sid, post_work_activity_sid: post_work_activity_sid, **keyword_args))
end

#sim(sim_sid, **keyword_args) ⇒ Object

Create a new <Sim> element

sim_sid

SIM SID

keyword_args

additional attributes



1721
1722
1723
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1721

def sim(sim_sid, **keyword_args)
  append(Sim.new(sim_sid, **keyword_args))
end

#sip(sip_url, username: nil, password: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, machine_detection: nil, amd_status_callback_method: nil, amd_status_callback: nil, machine_detection_timeout: nil, machine_detection_speech_threshold: nil, machine_detection_speech_end_threshold: nil, machine_detection_silence_timeout: nil, **keyword_args) ⇒ Object

Create a new <Sip> element

sip_url

SIP URL

username

SIP Username

password

SIP Password

url

Action URL

method

Action URL method

status_callback_event

Status callback events

status_callback

Status callback URL

status_callback_method

Status callback URL method

machine_detection

Enable machine detection or end of greeting detection

amd_status_callback_method

HTTP Method to use with amd_status_callback

amd_status_callback

The URL we should call to send amd status information to your application

machine_detection_timeout

Number of seconds to wait for machine detection

machine_detection_speech_threshold

Number of milliseconds for measuring stick for the length of the speech activity

machine_detection_speech_end_threshold

Number of milliseconds of silence after speech activity

machine_detection_silence_timeout

Number of milliseconds of initial silence

keyword_args

additional attributes



1743
1744
1745
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1743

def sip(sip_url, username: nil, password: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, machine_detection: nil, amd_status_callback_method: nil, amd_status_callback: nil, machine_detection_timeout: nil, machine_detection_speech_threshold: nil, machine_detection_speech_end_threshold: nil, machine_detection_silence_timeout: nil, **keyword_args)
  append(Sip.new(sip_url, username: username, password: password, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, machine_detection: machine_detection, amd_status_callback_method: amd_status_callback_method, amd_status_callback: amd_status_callback, machine_detection_timeout: machine_detection_timeout, machine_detection_speech_threshold: machine_detection_speech_threshold, machine_detection_speech_end_threshold: machine_detection_speech_end_threshold, machine_detection_silence_timeout: machine_detection_silence_timeout, **keyword_args))
end