Scripting Twilio

Posted on
Tue Nov 15, 2016 2:08 pm
FlyingDiver offline
Posts: 2610
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Scripting Twilio

Sending SMS messages is scriptable:

Code: Select all
twilio = "com.flyingdiver.indigoplugin.twilio"
twilioPlugin = indigo.server.getPlugin(twilio)
if twilioPlugin.isEnabled():
   twilioPlugin.executeAction("sendSMS", deviceId=XXXXXXX,  props={'smsTo':'+12125550123', 'smsMessage':'Put something interesting here.'})


As is placing a voice call:

Code: Select all
twilio = "com.flyingdiver.indigoplugin.twilio"
twilioPlugin = indigo.server.getPlugin(twilio)
if twilioPlugin.isEnabled():
   twilioPlugin.executeAction("voiceCall", deviceId=XXXXXXX,  props={'smsTo':'+12125550123', 'bucket':'<hold music bucket>'})


<hold music bucket> can be any one of the following, or some other Twilio compatible S3 storage bucket.

    "com.twilio.music.ambient"
    "com.twilio.music.classical"
    "com.twilio.music.electronica"
    "com.twilio.music.guitars"
    "com.twilio.music.newage"
    "com.twilio.music.rock"
    "com.twilio.music.soft-rock"

This action uses the Twilio holdmusic Twimlet: https://www.twilio.com/labs/twimlets/holdmusic

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest