callNumber

Top  Previous  Next

This function will call a regular phone (or cellphone) with a voice message. The text spoken is provided in this message. At the end of the message the receiving call will get the option to hear the message again.

Definition

twilio.callNumber( to, from, message, callback )

 

Name

Type

Description

to

string

Phone number to call.

from

string

Phone to call from. Must be one of the numbers returned by phoneNumbers.

message

string

The message to speak.

callback

function

Callback to be called after operation completes.

Callback function signature

function ( status, err )

 

Name

Type

Description

status

boolean

status of the phone call send, true if sent succesfully and false if failed. Note that a true value does not mean the call was successful.

err

string

Error description if any.

Example

twilio.callNumber('8055049741', '8055049741', 'Your house is on fire', function ( status, err )

 print("Phone call sent: ", status, err )

end)

This will print

 

SMS Send: true

Related

Twilio

sendSMS

phoneNumbers

Availability

Lua

Actions