Changes between Version 1 and Version 2 of WikiStart


Ignore:
Timestamp:
2013-08-09 08:17:34 (11 years ago)
Author:
solivas
Comment:

Initial wiki page describing how to use the plugin's functions.

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v1 v2  
    1 = Welcome to Trac 0.12.3 = 
     1= Twilio.com API Interface = 
    22 
    3 Trac is a '''minimalistic''' approach to '''web-based''' management of 
    4 '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. 
    5  
    6 All aspects of Trac have been designed with the single goal to  
    7 '''help developers write great software''' while '''staying out of the way''' 
    8 and imposing as little as possible on a team's established process and 
    9 culture. 
    10  
    11 As all Wiki pages, this page is editable, this means that you can 
    12 modify the contents of this page simply by using your 
    13 web-browser. Simply click on the "Edit this page" link at the bottom 
    14 of the page. WikiFormatting will give you a detailed description of 
    15 available Wiki formatting commands. 
    16  
    17 "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created 
    18 a new Trac environment, containing a default set of wiki pages and some sample 
    19 data. This newly created environment also contains  
    20 [wiki:TracGuide documentation] to help you get started with your project. 
    21  
    22 You can use [wiki:TracAdmin trac-admin] to configure 
    23 [http://trac.edgewall.org/ Trac] to better fit your project, especially in 
    24 regard to ''components'', ''versions'' and ''milestones''.  
     3Original code posted: http://forum.micasaverde.com/index.php/topic,15499.msg117950.html#msg117950 
    254 
    265 
    27 TracGuide is a good place to start. 
     6== How to use == 
    287 
    29 Enjoy! [[BR]] 
    30 ''The Trac Team'' 
     8This plugin, what I called the Twilio.com API Plugin, will allow to you have your Vera call and say text, or send SMS messages using the Twilio.com Call and SMS APIs.  You will have to register for an account at www.twilio.com in order to use this plugin. 
    319 
    32 == Starting Points == 
     10These are mandatory items that you need to configure before you can use the plugin:[[BR]] 
     11[[BR]] 
     12'''Account SID''' - Your Twilio.com account SID[[BR]] 
     13'''Auth Token''' - Your Twilio.com account Authenrication Token[[BR]] 
     14'''Caller ID''' - Phone number authorized to make calls[[BR]] 
     15[[BR]] 
     16These two items are optional (unless using the !CustomVoiceCall function):[[BR]] 
     17[[BR]] 
     18'''Custom MSG URL''' - URL that points to a custom TwiML creator[[BR]] 
     19'''Custom MSG Var Name''' - Custom Message variable passed in URL[[BR]] 
    3320 
    34  * TracGuide --  Built-in Documentation 
    35  * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project 
    36  * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions 
    37  * TracSupport --  Trac Support 
    3821 
    39 For a complete list of local wiki pages, see TitleIndex. 
     22There are three functions that you can use: 
     23 
     24'''!InitiateVoiceCall'''[[BR]] 
     25'''SendSMSMessage'''[[BR]] 
     26'''!CustomVoiceCall'''[[BR]] 
     27 
     28The Twilio.com API's use what they have dubbed TwiML, which is an XML DTD that the API understands for passing it commands. 
     29 
     30 
     31---- 
     32 
     33 
     34'''!InitiateVoiceCall''' will use the free twimlets.com/message TwiML generator to have Twilio's API speak the message you pass to the function. 
     35 
     36''(Note:  we will assume our plugin has an ID of 66 in the following examples.  Make sure you replace the 66 in the code below with the actual ID number of the plugin on your system)'' 
     37 
     38Example:[[BR]] 
     39 
     40{{{ 
     41luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "!InitiateVoiceCall",{ !PhoneNumber= "555-555-1212", Message="Greetings from your Vera Home Automation System"}, 66) 
     42}}} 
     43 
     44 
     45'''!PhoneNumber''' = number of recipient 
     46 
     47'''SendSMSMessage''' will send an SMS using Twilio's API: 
     48 
     49 
     50Example:[[BR]] 
     51 
     52{{{ 
     53luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "SendSMSMessage",{ PhoneNumber= "555-555-1212", Message="Greetings from your Vera Home Automation System"}, 66) 
     54}}} 
     55 
     56 
     57'''!PhoneNumber''' = number of recipient 
     58 
     59'''!CustomVoiceCall''' will initiate a voice call, using the URL you specified in the Custom MSG URL by itself or with the Custom MSG Var Name config items. 
     60 
     61Example:[[BR]] 
     62 
     63{{{ 
     64luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "!CustomVoiceCall",{ !PhoneNumber= "555-555-1212", Message="Hi there", !MsgFlag=2}, 66) 
     65}}} 
     66 
     67 
     68'''!PhoneNumber''' = number of recipient 
     69'''!MsgFlag''' = 1 to only use custom URL, 2 to use custom URL and message variable name 
     70