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:


935
936
937
938
939
940
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 935

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

#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:


951
952
953
954
955
956
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 951

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


982
983
984
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 982

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

keyword_args

additional attributes


997
998
999
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 997

def number(phone_number, send_digits: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, byoc: 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, **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


1009
1010
1011
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1009

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


1017
1018
1019
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1017

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

keyword_args

additional attributes


1032
1033
1034
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1032

def sip(sip_url, username: nil, password: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: 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, **keyword_args))
end