├── .gitignore ├── docs ├── resources │ └── inherit.gif ├── TwilioLib │ ├── package-frame.html │ ├── classes │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── Utils.html │ │ ├── RESTClient.html │ │ ├── RESTResponse.html │ │ ├── RESTRequest.html │ │ └── TwiML.html │ ├── package-summary.html │ └── TwilioLib.html ├── overview-frame.html ├── stylesheet.css ├── allclasses-frame.html ├── index.html └── overview-summary.html ├── console ├── twiliologo-animated.gif ├── script.js ├── Panel.cfm ├── index.cfm └── ProcessRequest.cfm ├── TwilioSettings.cfm ├── CHANGELOG.txt ├── settings.xml ├── samples ├── Client.cfm ├── Validation.cfm ├── REST-BadHttpMethod.cfm ├── REST-BadParameter.cfm ├── TwiML-BadInput.cfm ├── REST-Buy-A-Number.cfm ├── REST.cfm └── TwiML.cfm ├── README.md ├── Application.cfc ├── styles.css ├── LICENSE.txt ├── lib ├── TwilioLib.cfc └── classes │ ├── Utils.cfc │ ├── RESTRequest.cfc │ ├── RESTResponse.cfc │ ├── RESTClient.cfc │ └── Capability.cfc └── index.cfm /.gitignore: -------------------------------------------------------------------------------- 1 | colddoc 2 | dist 3 | .DS_Store -------------------------------------------------------------------------------- /docs/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonfill/ColdFusion-Twilio-Library/HEAD/docs/resources/inherit.gif -------------------------------------------------------------------------------- /console/twiliologo-animated.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonfill/ColdFusion-Twilio-Library/HEAD/console/twiliologo-animated.gif -------------------------------------------------------------------------------- /TwilioSettings.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | ***************** 2 | CHANGE LOG 3 | ***************** 4 | 5 | ------------------------ 6 | Version 1.0 7 | ------------------------ 8 | * Initial release 9 | 10 | ------------------------ 11 | Version 1.0.1 12 | ------------------------ 13 | * Added licensing information -------------------------------------------------------------------------------- /settings.xml: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /samples/Client.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Your Token

16 | #token# -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | CFML Twilio Helper Library 3 | ========================= 4 | DESCRIPTION 5 | ----------- 6 | The Twilio REST SDK simplifies the process of makes calls to the Twilio REST. 7 | The Twilio REST API lets to you initiate outgoing calls, list previous call, 8 | and much more. See http://www.twilio.com/docs for more information. 9 | 10 | USAGE 11 | ----- 12 | * Unzip 13 | * Register for Twilio account 14 | * Modify TwilioSettings.cfm with your account information 15 | 16 | The samples and developer tools provided for exploring the library do require per application mappings to be enabled on the CFML server. 17 | 18 | LICENSE 19 | ------- 20 | The Twilio CFML Helper Library is distributed under the MIT License -------------------------------------------------------------------------------- /Application.cfc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 10px; 3 | padding: 0 0 20px; 4 | min-height: 100%; 5 | font-family: "Arial", "Helvetica", "Verdana", "sans-serif"; 6 | font-size: 10px; 7 | } 8 | table{font-size: 10px;} 9 | 10 | body.home, body.home table{font-size: 12px;} 11 | 12 | #workspace-tabs li .ui-icon-close { 13 | cursor: pointer; 14 | float: left; 15 | margin: 0.4em 0.2em 0 0; 16 | } 17 | #console{margin:0px auto; float:left; width:100%;} 18 | #options{width:19%; float:left;} 19 | #workspace{float:right; width:80%;} 20 | .clear{clear:both;} 21 | 22 | #options li{margin:0; padding:0;} 23 | #options ul{margin:0; padding:0;} 24 | 25 | .cfmlcode{border:2px dashed red; background-color:#e0e0e0; padding:5px;} 26 | input, select{width:300px;} 27 | 28 | .fail, .success{font-weight:bold;} 29 | .fail{color:red;} 30 | .success{color:green;} 31 | .communicating{text-align:center;} -------------------------------------------------------------------------------- /docs/TwilioLib/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | TwilioLib 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | TwilioLib 21 | 22 | 23 | 24 | 33 |
25 | Classes  26 | 27 | 28 |
29 | TwilioLib 30 | 31 | 32 |
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011 Jason Fill (@jasonfill) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 9 | following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 18 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /docs/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Overview 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 |
23 | CFML Twilio Library 1.0
26 | 27 | 28 | 29 | 46 | 47 |
All Classes 30 |

31 | 32 | Packages 33 |
34 | 35 | 36 | TwilioLib 37 |
38 | 39 | TwilioLib.classes 40 |
41 | 42 | 43 |
44 | 45 |

48 | 49 |

50 |   51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | 3 | /* Define colors, fonts and other style attributes here to override the defaults */ 4 | 5 | /* Page background color */ 6 | body { background-color: #FFFFFF } 7 | 8 | /* Headings */ 9 | h1 { font-size: 145% } 10 | 11 | /* Table colors */ 12 | .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ 13 | .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ 14 | .TableRowColor { background: #FFFFFF } /* White */ 15 | 16 | /* Font used in left-hand frame lists */ 17 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } 18 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } 19 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } 20 | 21 | /* Navigation bar fonts and colors */ 22 | .NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ 23 | .NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ 24 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} 25 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} 26 | 27 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} 28 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} 29 | 30 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | TwilioLib.classes 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | TwilioLib.classes 21 | 22 | 23 | 24 | 45 |
25 | Classes  26 | 27 | 28 |
29 | RESTClient 30 | 31 |
32 | RESTRequest 33 | 34 |
35 | RESTResponse 36 | 37 |
38 | TwiML 39 | 40 |
41 | Utils 42 | 43 | 44 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | All Classes 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | All Classes 18 | 19 |
20 | 21 | 22 | 23 | 45 | 46 |
24 | 25 | RESTClient 26 |
27 | 28 | RESTRequest 29 |
30 | 31 | RESTResponse 32 |
33 | 34 | TwiML 35 |
36 | 37 | TwilioLib 38 |
39 | 40 | Utils 41 |
42 | 43 |
44 |
47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /samples/Validation.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | #twilio.newResponse().Say("The request from Twilio was confirmed to have come from Twilio.").getResponse()# 24 | 25 | #twilio.newResponse().Say("The request from Twilio was NOT VALID. It might have been spoofed!").getResponse()# 26 | 27 | 28 | -------------------------------------------------------------------------------- /samples/REST-BadHttpMethod.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/REST-BadParameter.cfm: -------------------------------------------------------------------------------- 1 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Generated Documentation (CFML Twilio Library 1.0) 8 | 9 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | <H2> 31 | Frame Alert</H2> 32 | 33 | <P> 34 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 35 | <BR> 36 | Link to<A HREF="overview-summary.html">Non-frame version.</A> 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /samples/TwiML-BadInput.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /samples/REST-Buy-A-Number.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | Buy a Twilio number by area code 25 | 26 | 27 |

Buy a Twilio number by area code

28 | 29 |

#msg#

30 |
31 |
32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/REST.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 25 | 26 | 27 | 35 | 36 | 37 | 38 | 39 | 40 | 49 | ---> 50 | 51 | 52 | 53 | 54 | 55 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /console/script.js: -------------------------------------------------------------------------------- 1 | /* 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2011 Jason Fill (@jasonfill) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 7 | associated documentation files (the "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 10 | following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies or substantial 13 | portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 16 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 18 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 19 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | $(function() { 22 | 23 | var tab_counter = 0; 24 | var loadResourceUrl = ""; 25 | 26 | $( "#options" ).accordion({collapsible:true, autoHeight:false}); 27 | 28 | // tabs init with a custom tab template and an "add" callback filling in the content 29 | var $tabs = $( "#workspace-tabs").tabs({ 30 | tabTemplate: "
  • #{label} Remove Tab
  • ", 31 | add: function( event, ui ) { 32 | 33 | // get the contents of the new panel... 34 | $.get(loadResourceUrl, function(data) { 35 | $( ui.panel ).append( "

    " + data + "

    " ); 36 | $tabs.tabs("select", tab_counter); 37 | }); 38 | 39 | } 40 | }); 41 | 42 | $('.add-tab').click(function(e){ 43 | e.preventDefault(); 44 | var tab_title = $(this).attr('rel'); 45 | loadResourceUrl = $(this).attr('href'); 46 | tab_counter++; 47 | $tabs.tabs( "add", "#tabs-" + tab_counter, tab_title ); 48 | }); 49 | 50 | $( "#workspace-tabs span.ui-icon-close" ).live( "click", function() { 51 | var index = $( "li", $tabs ).index( $( this ).parent() ); 52 | $tabs.tabs( "remove", index ); 53 | }); 54 | 55 | $('form').live("submit", function(e){ 56 | e.preventDefault(); 57 | var formId = $(this).attr('id'); 58 | $('#result-' + formId).html('

    Please hold...communicating with Twilio.

    '); 59 | $('#result-' + formId).show(); 60 | 61 | var formData = $(this).serialize(); 62 | formData = formData + '&accountsid=' + $('#accountsid').val() + '&authtoken=' + $('#authtoken').val() + '&defaultformat=' + $('#defaultformat').val(); 63 | 64 | $.post("ProcessRequest.cfm", formData , function(data) { 65 | $('#result-' + formId).html(data); 66 | }); 67 | }); 68 | 69 | }); -------------------------------------------------------------------------------- /console/Panel.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

    #resource.method.XmlAttributes["apigee:displayName"]#

    29 |

    HTTP Method Used: #resource.method.XmlAttributes.Name#

    30 |

    #resource.method.doc.XmlText# View Twilio Docs

    31 | 32 |
    33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 54 | 61 | 62 | 63 | 64 | 65 |
    #resource.param[p].XmlAttributes.name# 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | #resource.param[p].doc.XmlText# 57 | 58 |   59 | 60 |
    66 |
    67 | 68 |
    69 | 70 |
    -------------------------------------------------------------------------------- /samples/TwiML.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /docs/TwilioLib/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | TwilioLib 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 53 | 57 | 58 | 59 | 60 | 61 | 66 | 67 | 68 |
    54 | CFML Twilio Library 1.0 55 | 56 |
    69 | 70 | 71 |
    72 |

    73 | Package TwilioLib 74 |

    75 | 76 |

    77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 91 | 92 | 93 | 94 | 95 |
    81 | Class Summary
    TwilioLib 89 | Base lib 90 |
    96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 121 | 125 | 126 | 127 | 128 | 129 | 134 | 135 | 136 |
    122 | CFML Twilio Library 1.0 123 | 124 |
    137 | 138 | 139 | 140 |


    141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /docs/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Overview 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 52 | 56 | 57 | 58 | 59 | 60 | 65 | 66 | 67 |
    53 | CFML Twilio Library 1.0 54 | 55 |
    68 | 69 | 70 | 71 |
    72 | 73 |

    74 | CFML Twilio Library 1.0 75 |

    76 | 77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 |
    81 | Packages
    TwilioLib
    TwilioLib.classes
    95 | 96 |

    97 |  


    98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 123 | 127 | 128 | 129 | 130 | 131 | 136 | 137 | 138 |
    124 | CFML Twilio Library 1.0 125 | 126 |
    139 | 140 | 141 | 142 |
    143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /console/index.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | CFML Test Console 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |

    Twilio CFML Test Console

    50 |
    51 |
    52 | 53 |

    #c#

    54 | 63 |
    64 |
    65 |
    66 |
    67 | 70 |
    71 |

    72 | 73 | Prior to making any requests input your AccountSid and AuthToken below. You can also update the TwilioSettings.cfm file and the values will be pulled from there. 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 91 | 92 |
    Account Sid:
    Auth Token:
    Default Format: 86 | 90 |
    93 |
    94 |

    95 |
    96 |
    97 |
    98 |
    99 |
    100 | 101 | 102 |
    -------------------------------------------------------------------------------- /lib/TwilioLib.cfc: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /index.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | Twilio CFML Library 4 | 5 | 6 | 7 |

    Twilio CFML Library

    8 |

    Introduction

    9 |

    Thank you for downloading the CFML library for Twilio. If you have made it to this point you obviously know what Twilio is and have an interest in leveraging the awesome service that they provide. If you need more information on Twilio you can view the following links: 10 |

    16 |

    17 | 18 |

    Getting Started With CFML & Twilio

    19 |

    The CFML library for Twilio was put together with the goal of taking the simple Twilio API and making it even easier for CFML developers to consume.

    20 |

    21 | A few things you will need to do prior to running any of the samples below: 22 |

      23 |
    1. Go to Twilio.com and create your free trial account. They will provide you with $30 in free calling credits for testing.
    2. 24 |
    3. Once you have created your account you will want to locate your AccountSid and AuthToken. These can be found under "Developer Tools" on the Dashboard page once logging into your Twilio account.
    4. 25 |
    5. Edit the TwilioSettings.cfm template that sits along side this index.cfm page in your file sytem using the AccountSid and AuthToken from your Twilio account.
    6. 26 |
    7. Run any of the samples below and have fun with the Twilio & CFML!
    8. 27 |
    28 |

    29 | 30 |

    CFML Developer Tools

    31 | 35 | 36 |

    Samples

    37 | 48 | 49 |

    Future Library Enhancements

    50 |
      51 |
    • Realtime Call Debugger - Coming soon this will allow you to watch the TwiML being returned from your application in real-time.
    • 52 |
    • Integrated Logging Component - This will provide hooks for logging inside the library.
    • 53 |
    54 | 55 |

    Project & Contact Information

    56 |

    This project is hosted on RIAForge. 57 |

    61 |

    62 | 63 |

    Licensing (MIT License)

    64 |

    Copyright (c) 2011 Jason Fill (@jasonfill)

    65 |

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    66 |

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    67 |

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    68 | 69 | 70 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | TwilioLib.classes 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 53 | 57 | 58 | 59 | 60 | 61 | 66 | 67 | 68 |
    54 | CFML Twilio Library 1.0 55 | 56 |
    69 | 70 | 71 |
    72 |

    73 | Package TwilioLib.classes 74 |

    75 | 76 |

    77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 127 | 128 | 129 | 130 | 131 |
    81 | Class Summary
    RESTClient 89 | 90 |
    RESTRequest 98 | 99 |
    RESTResponse 107 | 108 |
    TwiML 116 | Twilio handles instructions for calls and SMS messages in real time from web applications. 117 |
    Utils 125 | 126 |
    132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 157 | 161 | 162 | 163 | 164 | 165 | 170 | 171 | 172 |
    158 | CFML Twilio Library 1.0 159 | 160 |
    173 | 174 | 175 | 176 |


    177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /lib/classes/Utils.cfc: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /lib/classes/RESTRequest.cfc: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /lib/classes/RESTResponse.cfc: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /console/ProcessRequest.cfm: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |

    Request Result

    73 | This request 74 | 75 | was successful. 76 | 77 | failed. 78 | 79 |

    CFML Code Used

    80 |
    81 | &##60;--- Create an instance of the TwilioLib, this is a singleton so it could be persisted in the Application scope or handled via a DI engine such as ColdSpring ---&##62; 82 |
    83 | &##60;cfset twilio = createObject("component", "TwilioLib").init(#_accountsid#, #_authtoken#) /&##62; 84 |
    85 |
    86 | 87 | &##60;--- Create a new structure that will hold the request parameters ---&##62; 88 |
    89 | &##60;cfset rData = StructNew() /&##62; 90 |
    91 |
    92 | &##60;--- Add all the parameters to the structure ---&##62;
    93 | 94 | &##60;cfset rData.#f# = #FORM[f]# /&##62;
    95 |
    96 |
    97 |
    98 | &##60;--- Call the newRequest method from the TwilioLib object that was created previously, or is persisted in the application ---&##62; 99 |
    100 | &##60;cfset requestObj = twilio.newRequest("#resourceUri#", "#resourceMethod#", rData) /&##62; 101 |
    102 |
    103 | &##60;--- Check to see if the request was successful using the wasSuccessful method from the response object ---&##62;
    104 | requestObj.getResponse().wasSuccessful() 105 |
    106 |
    107 | &##60;--- Get the raw text response ---&##62; 108 |
    109 | requestObj.getResponse().asString() 110 |
    111 |
    112 | &##60;--- Get the response as CFML Object ---&##62; 113 |
    114 | requestObj.getResponse().output() 115 |
    116 |
    117 | #cfmlcode# 118 | 119 |

    Raw Response - requestObj.getResponse().asString()

    120 | 121 | 122 |

    CFML Object Response - requestObj.getResponse().output()

    123 | 124 | 125 |
    126 | 127 | -------------------------------------------------------------------------------- /lib/classes/RESTClient.cfc: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/Utils.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Callable 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 56 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 |
    57 | CFML Twilio Library 1.0 58 | 59 |
    72 | 73 | 74 | 75 |
    76 | 77 |

    78 | 79 | TwilioLib.classes 80 |
    81 | Class Utils

    82 | 83 | 84 | 85 |
    WEB-INF.cftags.component
     86 |         extended by TwilioLib.classes.Utils
     87 | 
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 |
    public class Utils
     98 | 
    extends WEB-INF.cftags.component
    99 |
    100 |
    101 | 102 | 103 | 104 |
    105 | 106 |

    107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 116 | 117 | 118 | 119 | 124 | 125 |
    115 | Constructor Summary
    120 | init(any accountSid, any authToken) 121 |
    122 | 123 |
    126 |   127 | 128 | 129 | 130 | 131 | 132 | 133 | 135 | 136 | 137 | 138 | 139 | 141 | 145 | 146 | 147 | 148 | 150 | 154 | 155 | 156 | 157 | 159 | 165 | 166 | 167 | 168 |
    134 | Method Summary
    140 | private stringgenerateSignature(string signKey, string signMessage) 142 |
    143 | 144 |
    149 | private stringpreparePostVars(string qString) 151 |
    152 | 153 |
    158 |  booleanvalidateRequest([struct CgiInfo='[runtime expression]'], [struct HttpResponseInfo='[runtime expression]']) 160 |
    161 | 162 | 163 |           Validates the request is coming from Twilio 164 |
    169 | 170 | 171 | 172 |   173 | 174 | 175 | 176 | 177 | 178 | 179 | 184 | 185 |
    Methods inherited from class WEB-INF.cftags.component
    180 | 181 | 182 | 183 |
    186 | 187 | 188 |   189 |

    190 | 191 | 192 | 193 | 194 | 195 | 196 |

    197 | 198 | 200 | 201 |
    199 | Constructor Detail
    202 | 203 |

    204 | 205 | init

    206 | public init(any accountSid, any authToken) 207 |
    208 |
    209 | 210 |

    211 |

    212 | 213 |
    214 |
    Parameters:
    215 | 216 |
    accountSid
    217 | 218 |
    authToken
    219 | 220 |
    221 | 222 | 223 |
    224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 234 | 235 |
    233 | Method Detail
    236 | 237 |

    238 | generateSignature

    239 | private string generateSignature(string signKey, string signMessage) 240 | 241 |
    242 |
    243 | 244 |

    245 |

    246 | 247 | 248 |
    249 |
    Parameters:
    250 | 251 |
    signKey
    252 | 253 |
    signMessage
    254 | 255 |
    256 | 257 | 258 | 259 |
    260 |
    261 | 262 |

    263 | preparePostVars

    264 | private string preparePostVars(string qString) 265 | 266 |
    267 |
    268 | 269 |

    270 |

    271 | 272 | 273 |
    274 |
    Parameters:
    275 | 276 |
    qString
    277 | 278 |
    279 | 280 | 281 | 282 |
    283 |
    284 | 285 |

    286 | validateRequest

    287 | public boolean validateRequest([struct CgiInfo='[runtime expression]'], [struct HttpResponseInfo='[runtime expression]']) 288 | 289 |
    290 |
    291 | Validates the request is coming from Twilio. 292 |

    293 |

    294 | 295 | 296 |
    297 |
    Parameters:
    298 | 299 |
    CgiInfo
    300 | 301 |
    HttpResponseInfo
    302 | 303 |
    304 | 305 | 306 | 307 |
    308 |
    309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 333 | 337 | 338 | 339 | 340 | 341 | 346 | 347 | 348 |
    334 | CFML Twilio Library 1.0 335 | 336 |
    349 | 350 | 351 | 352 |
    353 | 354 | 355 | 356 | -------------------------------------------------------------------------------- /docs/TwilioLib/TwilioLib.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Callable 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 56 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 |
    57 | CFML Twilio Library 1.0 58 | 59 |
    72 | 73 | 74 | 75 |
    76 | 77 |

    78 | 79 | TwilioLib 80 |
    81 | Class TwilioLib

    82 | 83 | 84 | 85 |
    WEB-INF.cftags.component
     86 |         extended by twilio.TwilioLib
     87 | 
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 |
    public class TwilioLib
     98 | 
    extends WEB-INF.cftags.component
    99 |
    100 |
    101 | 102 | 103 |

    104 | Base lib 105 |

    106 | 107 | 108 |


    109 | 110 |

    111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 120 | 121 | 122 | 123 | 128 | 129 |
    119 | Constructor Summary
    124 | init(any accountSid, any authToken, [any ApiVersion='[runtime expression]'], [any EndPoint='[runtime expression]'], [string DefaultReturnFormat='[runtime expression]']) 125 |
    126 | 127 |
    130 |   131 | 132 | 133 | 134 | 135 | 136 | 137 | 139 | 140 | 141 | 142 | 143 | 145 | 151 | 152 | 153 | 154 | 156 | 162 | 163 | 164 | 165 | 167 | 173 | 174 | 175 | 176 |
    138 | Method Summary
    144 |  anygetUtils() 146 |
    147 | 148 | 149 |           Creates a new Twilio utility object 150 |
    155 |  anynewRequest(string Resource, string Method='GET', struct Vars='[runtime expression]') 157 |
    158 | 159 | 160 |           Creates a new REST request object 161 |
    166 |  anynewResponse() 168 |
    169 | 170 | 171 |           Creates a new TwiML response object 172 |
    177 | 178 | 179 | 180 |   181 | 182 | 183 | 184 | 185 | 186 | 187 | 192 | 193 |
    Methods inherited from class WEB-INF.cftags.component
    188 | 189 | 190 | 191 |
    194 | 195 | 196 |   197 |

    198 | 199 | 200 | 201 | 202 | 203 | 204 |

    205 | 206 | 208 | 209 |
    207 | Constructor Detail
    210 | 211 |

    212 | 213 | init

    214 | public init(any accountSid, any authToken, [any ApiVersion='[runtime expression]'], [any EndPoint='[runtime expression]'], [string DefaultReturnFormat='[runtime expression]']) 215 |
    216 |
    217 | 218 |

    219 |

    220 | 221 |
    222 |
    Parameters:
    223 | 224 |
    accountSid - The AccountSid provided by Twilio.
    225 | 226 |
    authToken - The AuthToken provided by Twilio.
    227 | 228 |
    ApiVersion - The version of the Twilio API to be used.
    229 | 230 |
    EndPoint - The Twilio API endpoint.
    231 | 232 |
    DefaultReturnFormat - The default return format that should be used. This can be overridden in for REST request as well.
    233 | 234 |
    235 | 236 | 237 |
    238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 248 | 249 |
    247 | Method Detail
    250 | 251 |

    252 | getUtils

    253 | public any getUtils() 254 | 255 |
    256 |
    257 | Creates a new Twilio utility object. 258 |

    259 |

    260 | 261 | 262 | 263 | 264 |
    265 |
    266 | 267 |

    268 | newRequest

    269 | public any newRequest(string Resource, string Method='GET', struct Vars='[runtime expression]') 270 | 271 |
    272 |
    273 | Creates a new REST request object. 274 |

    275 |

    276 | 277 | 278 |
    279 |
    Parameters:
    280 | 281 |
    Resource - The resource that is to be consumed.
    282 | 283 |
    Method - The HTTP method to be used.
    284 | 285 |
    Vars - Any variables that are to be sent with the request.
    286 | 287 |
    288 | 289 | 290 | 291 |
    292 |
    293 | 294 |

    295 | newResponse

    296 | public any newResponse() 297 | 298 |
    299 |
    300 | Creates a new TwiML response object. 301 |

    302 |

    303 | 304 | 305 | 306 | 307 |
    308 |
    309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 333 | 337 | 338 | 339 | 340 | 341 | 346 | 347 | 348 |
    334 | CFML Twilio Library 1.0 335 | 336 |
    349 | 350 | 351 | 352 |
    353 | 354 | 355 | 356 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/RESTClient.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Callable 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 56 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 |
    57 | CFML Twilio Library 1.0 58 | 59 |
    72 | 73 | 74 | 75 |
    76 | 77 |

    78 | 79 | TwilioLib.classes 80 |
    81 | Class RESTClient

    82 | 83 | 84 | 85 |
    WEB-INF.cftags.component
     86 |         extended by twilio.classes.RESTClient
     87 | 
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 |
    public class RESTClient
     98 | 
    extends WEB-INF.cftags.component
    99 |
    100 |
    101 | 102 | 103 | 104 |
    105 | 106 |

    107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 116 | 117 | 118 | 119 | 124 | 125 |
    115 | Constructor Summary
    120 | init(any accountSid, any authToken, any ApiVersion, any EndPoint, any DefaultResponse='xml') 121 |
    122 | 123 |
    126 |   127 | 128 | 129 | 130 | 131 | 132 | 133 | 135 | 136 | 137 | 138 | 139 | 141 | 147 | 148 | 149 | 150 | 152 | 158 | 159 | 160 | 161 | 163 | 169 | 170 | 171 | 172 |
    134 | Method Summary
    140 | private structbuildUrl(any resource='', any requestObj='') 142 |
    143 | 144 | 145 |           Builds the full URL for the resource being accessed 146 |
    151 |  anysendRequest(string Resource, string Method='GET', struct Vars='[runtime expression]') 153 |
    154 | 155 | 156 |           Constructs the HTTP request and sends it off to Twilio 157 |
    162 | private stringverifyParameterKey(string parameter, any requestObj) 164 |
    165 | 166 | 167 |           Verifies the parameter key is a valid key for any Twilio REST resource and ensures that the key is in the proper case 168 |
    173 | 174 | 175 | 176 |   177 | 178 | 179 | 180 | 181 | 182 | 183 | 188 | 189 |
    Methods inherited from class WEB-INF.cftags.component
    184 | 185 | 186 | 187 |
    190 | 191 | 192 |   193 |

    194 | 195 | 196 | 197 | 198 | 199 | 200 |

    201 | 202 | 204 | 205 |
    203 | Constructor Detail
    206 | 207 |

    208 | 209 | init

    210 | public init(any accountSid, any authToken, any ApiVersion, any EndPoint, any DefaultResponse='xml') 211 |
    212 |
    213 | 214 |

    215 |

    216 | 217 |
    218 |
    Parameters:
    219 | 220 |
    accountSid
    221 | 222 |
    authToken
    223 | 224 |
    ApiVersion
    225 | 226 |
    EndPoint
    227 | 228 |
    DefaultResponse
    229 | 230 |
    231 | 232 | 233 |
    234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 244 | 245 |
    243 | Method Detail
    246 | 247 |

    248 | buildUrl

    249 | private struct buildUrl(any resource='', any requestObj='') 250 | 251 |
    252 |
    253 | Builds the full URL for the resource being accessed. 254 |

    255 |

    256 | 257 | 258 |
    259 |
    Parameters:
    260 | 261 |
    resource
    262 | 263 |
    requestObj
    264 | 265 |
    266 | 267 | 268 | 269 |
    270 |
    271 | 272 |

    273 | sendRequest

    274 | public any sendRequest(string Resource, string Method='GET', struct Vars='[runtime expression]') 275 | 276 |
    277 |
    278 | Constructs the HTTP request and sends it off to Twilio. 279 |

    280 |

    281 | 282 | 283 |
    284 |
    Parameters:
    285 | 286 |
    Resource - The resource that is being requested.
    287 | 288 |
    Method - The HTTP method that is being used to request the resource, valid methods include: GET, POST, PUT, DELETE.
    289 | 290 |
    Vars - The parameters that are to be sent with the request.
    291 | 292 |
    293 | 294 | 295 | 296 |
    297 |
    298 | 299 |

    300 | verifyParameterKey

    301 | private string verifyParameterKey(string parameter, any requestObj) 302 | 303 |
    304 |
    305 | Verifies the parameter key is a valid key for any Twilio REST resource and ensures that the key is in the proper case. 306 |

    307 |

    308 | 309 | 310 |
    311 |
    Parameters:
    312 | 313 |
    parameter - The parameter to check.
    314 | 315 |
    requestObj - An instance of the RESTRequest object which will be used to get the valid parameters.
    316 | 317 |
    318 | 319 | 320 | 321 |
    322 |
    323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 347 | 351 | 352 | 353 | 354 | 355 | 360 | 361 | 362 |
    348 | CFML Twilio Library 1.0 349 | 350 |
    363 | 364 | 365 | 366 |
    367 | 368 | 369 | 370 | -------------------------------------------------------------------------------- /lib/classes/Capability.cfc: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/RESTResponse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Callable 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 56 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 |
    57 | CFML Twilio Library 1.0 58 | 59 |
    72 | 73 | 74 | 75 |
    76 | 77 |

    78 | 79 | TwilioLib.classes 80 |
    81 | Class RESTResponse

    82 | 83 | 84 | 85 |
    WEB-INF.cftags.component
     86 |         extended by twilio.classes.RESTResponse
     87 | 
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 |
    public class RESTResponse
     98 | 
    extends WEB-INF.cftags.component
    99 |
    100 |
    101 | 102 | 103 | 104 |
    105 | 106 |

    107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 116 | 117 | 118 | 119 | 124 | 125 |
    115 | Constructor Summary
    120 | init([any RequestObj], [struct Response]) 121 |
    122 | 123 |
    126 |   127 | 128 | 129 | 130 | 131 | 132 | 133 | 135 | 136 | 137 | 138 | 139 | 141 | 147 | 148 | 149 | 150 | 152 | 156 | 157 | 158 | 159 | 161 | 165 | 166 | 167 | 168 | 170 | 174 | 175 | 176 | 177 | 179 | 183 | 184 | 185 | 186 | 188 | 192 | 193 | 194 | 195 | 197 | 201 | 202 | 203 | 204 | 206 | 210 | 211 | 212 | 213 | 215 | 221 | 222 | 223 | 224 | 226 | 232 | 233 | 234 | 235 | 237 | 243 | 244 | 245 | 246 |
    134 | Method Summary
    140 |  stringasString() 142 |
    143 | 144 | 145 |           Return the response as a string 146 |
    151 |  structdump() 153 |
    154 | 155 |
    160 |  stringgetContentLength() 162 |
    163 | 164 |
    169 |  stringgetContentType() 171 |
    172 | 173 |
    178 |  stringgetETag() 180 |
    181 | 182 |
    187 |  stringgetLastModified() 189 |
    190 | 191 |
    196 |  stringgetStatusCode() 198 |
    199 | 200 |
    205 |  stringgetStatusText() 207 |
    208 | 209 |
    214 |  anyoutput() 216 |
    217 | 218 | 219 |           Return the response as represented by the CFML engine 220 |
    225 |  structraw() 227 |
    228 | 229 | 230 |           Returns the complete raw HTTP response 231 |
    236 |  booleanwasSuccessful() 238 |
    239 | 240 | 241 |           Indicate whether the request was successful or not 242 |
    247 | 248 | 249 | 250 |   251 | 252 | 253 | 254 | 255 | 256 | 257 | 262 | 263 |
    Methods inherited from class WEB-INF.cftags.component
    258 | 259 | 260 | 261 |
    264 | 265 | 266 |   267 |

    268 | 269 | 270 | 271 | 272 | 273 | 274 |

    275 | 276 | 278 | 279 |
    277 | Constructor Detail
    280 | 281 |

    282 | 283 | init

    284 | public init([any RequestObj], [struct Response]) 285 |
    286 |
    287 | 288 |

    289 |

    290 | 291 |
    292 |
    Parameters:
    293 | 294 |
    RequestObj
    295 | 296 |
    Response
    297 | 298 |
    299 | 300 | 301 |
    302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 312 | 313 |
    311 | Method Detail
    314 | 315 |

    316 | asString

    317 | public string asString() 318 | 319 |
    320 |
    321 | Return the response as a string. 322 |

    323 |

    324 | 325 | 326 | 327 | 328 |
    329 |
    330 | 331 |

    332 | dump

    333 | public struct dump() 334 | 335 |
    336 |
    337 | 338 |

    339 |

    340 | 341 | 342 | 343 | 344 |
    345 |
    346 | 347 |

    348 | getContentLength

    349 | public string getContentLength() 350 | 351 |
    352 |
    353 | 354 |

    355 |

    356 | 357 | 358 | 359 | 360 |
    361 |
    362 | 363 |

    364 | getContentType

    365 | public string getContentType() 366 | 367 |
    368 |
    369 | 370 |

    371 |

    372 | 373 | 374 | 375 | 376 |
    377 |
    378 | 379 |

    380 | getETag

    381 | public string getETag() 382 | 383 |
    384 |
    385 | 386 |

    387 |

    388 | 389 | 390 | 391 | 392 |
    393 |
    394 | 395 |

    396 | getLastModified

    397 | public string getLastModified() 398 | 399 |
    400 |
    401 | 402 |

    403 |

    404 | 405 | 406 | 407 | 408 |
    409 |
    410 | 411 |

    412 | getStatusCode

    413 | public string getStatusCode() 414 | 415 |
    416 |
    417 | 418 |

    419 |

    420 | 421 | 422 | 423 | 424 |
    425 |
    426 | 427 |

    428 | getStatusText

    429 | public string getStatusText() 430 | 431 |
    432 |
    433 | 434 |

    435 |

    436 | 437 | 438 | 439 | 440 |
    441 |
    442 | 443 |

    444 | output

    445 | public any output() 446 | 447 |
    448 |
    449 | Return the response as represented by the CFML engine. 450 |

    451 |

    452 | 453 | 454 | 455 | 456 |
    457 |
    458 | 459 |

    460 | raw

    461 | public struct raw() 462 | 463 |
    464 |
    465 | Returns the complete raw HTTP response. 466 |

    467 |

    468 | 469 | 470 | 471 | 472 |
    473 |
    474 | 475 |

    476 | wasSuccessful

    477 | public boolean wasSuccessful() 478 | 479 |
    480 |
    481 | Indicate whether the request was successful or not. 482 |

    483 |

    484 | 485 | 486 | 487 | 488 |
    489 |
    490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 514 | 518 | 519 | 520 | 521 | 522 | 527 | 528 | 529 |
    515 | CFML Twilio Library 1.0 516 | 517 |
    530 | 531 | 532 | 533 |
    534 | 535 | 536 | 537 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/RESTRequest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Callable 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 56 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 |
    57 | CFML Twilio Library 1.0 58 | 59 |
    72 | 73 | 74 | 75 |
    76 | 77 |

    78 | 79 | TwilioLib.classes 80 |
    81 | Class RESTRequest

    82 | 83 | 84 | 85 |
    WEB-INF.cftags.component
     86 |         extended by TwilioLib.classes.RESTRequest
     87 | 
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 |
    public class RESTRequest
     98 | 
    extends WEB-INF.cftags.component
    99 |
    100 |
    101 | 102 | 103 | 104 |
    105 | 106 |

    107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 116 | 117 | 118 | 119 | 124 | 125 |
    115 | Constructor Summary
    120 | init() 121 |
    122 | 123 |
    126 |   127 | 128 | 129 | 130 | 131 | 132 | 133 | 135 | 136 | 137 | 138 | 139 | 141 | 145 | 146 | 147 | 148 | 150 | 154 | 155 | 156 | 157 | 159 | 163 | 164 | 165 | 166 | 168 | 174 | 175 | 176 | 177 | 179 | 183 | 184 | 185 | 186 | 188 | 192 | 193 | 194 | 195 | 197 | 203 | 204 | 205 | 206 | 208 | 214 | 215 | 216 | 217 | 219 | 223 | 224 | 225 | 226 | 228 | 232 | 233 | 234 | 235 | 237 | 241 | 242 | 243 | 244 | 246 | 250 | 251 | 252 | 253 |
    134 | Method Summary
    140 |  structdump() 142 |
    143 | 144 |
    149 |  stringgetApiVersion() 151 |
    152 | 153 |
    158 |  structgetParameters() 160 |
    161 | 162 |
    167 |  anygetResponse() 169 |
    170 | 171 | 172 |           Returns the response object 173 |
    178 |  stringgetResponseFormat() 180 |
    181 | 182 |
    187 |  stringgetUrl() 189 |
    190 | 191 |
    196 |  stringgetValidParameterList() 198 |
    199 | 200 | 201 |           Returns a list of all the valid parameters for all the REST resources 202 |
    207 | package voidhandleResponse([struct response]) 209 |
    210 | 211 | 212 |           Handles the response that is returned from Twilio 213 |
    218 |  voidsetApiVersion([string ApiVersion]) 220 |
    221 | 222 |
    227 |  voidsetParameters([string Type], [struct Values]) 229 |
    230 | 231 |
    236 |  voidsetResponseFormat([string ResponseFormat]) 238 |
    239 | 240 |
    245 |  voidsetUrl([string Url]) 247 |
    248 | 249 |
    254 | 255 | 256 | 257 |   258 | 259 | 260 | 261 | 262 | 263 | 264 | 269 | 270 |
    Methods inherited from class WEB-INF.cftags.component
    265 | 266 | 267 | 268 |
    271 | 272 | 273 |   274 |

    275 | 276 | 277 | 278 | 279 | 280 | 281 |

    282 | 283 | 285 | 286 |
    284 | Constructor Detail
    287 | 288 |

    289 | 290 | init

    291 | public init() 292 |
    293 |
    294 | 295 |

    296 |

    297 | 298 | 299 |
    300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 310 | 311 |
    309 | Method Detail
    312 | 313 |

    314 | dump

    315 | public struct dump() 316 | 317 |
    318 |
    319 | 320 |

    321 |

    322 | 323 | 324 | 325 | 326 |
    327 |
    328 | 329 |

    330 | getApiVersion

    331 | public string getApiVersion() 332 | 333 |
    334 |
    335 | 336 |

    337 |

    338 | 339 | 340 | 341 | 342 |
    343 |
    344 | 345 |

    346 | getParameters

    347 | public struct getParameters() 348 | 349 |
    350 |
    351 | 352 |

    353 |

    354 | 355 | 356 | 357 | 358 |
    359 |
    360 | 361 |

    362 | getResponse

    363 | public any getResponse() 364 | 365 |
    366 |
    367 | Returns the response object. 368 |

    369 |

    370 | 371 | 372 | 373 | 374 |
    375 |
    376 | 377 |

    378 | getResponseFormat

    379 | public string getResponseFormat() 380 | 381 |
    382 |
    383 | 384 |

    385 |

    386 | 387 | 388 | 389 | 390 |
    391 |
    392 | 393 |

    394 | getUrl

    395 | public string getUrl() 396 | 397 |
    398 |
    399 | 400 |

    401 |

    402 | 403 | 404 | 405 | 406 |
    407 |
    408 | 409 |

    410 | getValidParameterList

    411 | public string getValidParameterList() 412 | 413 |
    414 |
    415 | Returns a list of all the valid parameters for all the REST resources. 416 |

    417 |

    418 | 419 | 420 | 421 | 422 |
    423 |
    424 | 425 |

    426 | handleResponse

    427 | package void handleResponse([struct response]) 428 | 429 |
    430 |
    431 | Handles the response that is returned from Twilio. 432 |

    433 |

    434 | 435 | 436 |
    437 |
    Parameters:
    438 | 439 |
    response
    440 | 441 |
    442 | 443 | 444 | 445 |
    446 |
    447 | 448 |

    449 | setApiVersion

    450 | public void setApiVersion([string ApiVersion]) 451 | 452 |
    453 |
    454 | 455 |

    456 |

    457 | 458 | 459 |
    460 |
    Parameters:
    461 | 462 |
    ApiVersion
    463 | 464 |
    465 | 466 | 467 | 468 |
    469 |
    470 | 471 |

    472 | setParameters

    473 | public void setParameters([string Type], [struct Values]) 474 | 475 |
    476 |
    477 | 478 |

    479 |

    480 | 481 | 482 |
    483 |
    Parameters:
    484 | 485 |
    Type
    486 | 487 |
    Values
    488 | 489 |
    490 | 491 | 492 | 493 |
    494 |
    495 | 496 |

    497 | setResponseFormat

    498 | public void setResponseFormat([string ResponseFormat]) 499 | 500 |
    501 |
    502 | 503 |

    504 |

    505 | 506 | 507 |
    508 |
    Parameters:
    509 | 510 |
    ResponseFormat
    511 | 512 |
    513 | 514 | 515 | 516 |
    517 |
    518 | 519 |

    520 | setUrl

    521 | public void setUrl([string Url]) 522 | 523 |
    524 |
    525 | 526 |

    527 |

    528 | 529 | 530 |
    531 |
    Parameters:
    532 | 533 |
    Url
    534 | 535 |
    536 | 537 | 538 | 539 |
    540 |
    541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 565 | 569 | 570 | 571 | 572 | 573 | 578 | 579 | 580 |
    566 | CFML Twilio Library 1.0 567 | 568 |
    581 | 582 | 583 | 584 |
    585 | 586 | 587 | 588 | -------------------------------------------------------------------------------- /docs/TwilioLib/classes/TwiML.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Callable 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 56 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 |
    57 | CFML Twilio Library 1.0 58 | 59 |
    72 | 73 | 74 | 75 |
    76 | 77 |

    78 | 79 | TwilioLib.classes 80 |
    81 | Class TwiML

    82 | 83 | 84 | 85 |
    WEB-INF.cftags.component
     86 |         extended by TwilioLib.classes.TwiML
     87 | 
    88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 |
    public class TwiML
     98 | 
    extends WEB-INF.cftags.component
    99 |
    100 |
    101 | 102 | 103 |

    104 | Twilio handles instructions for calls and SMS messages in real time from web applications. 105 |

    106 | 107 | 108 |


    109 | 110 |

    111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 120 | 121 | 122 | 123 | 128 | 129 |
    119 | Constructor Summary
    124 | init(any accountSid, any authToken, [any ApiVersion='[runtime expression]'], [any EndPoint='[runtime expression]']) 125 |
    126 | 127 |
    130 |   131 | 132 | 133 | 134 | 135 | 136 | 137 | 139 | 140 | 141 | 142 | 143 | 145 | 149 | 150 | 151 | 152 | 154 | 158 | 159 | 160 | 161 | 163 | 169 | 170 | 171 | 172 | 174 | 180 | 181 | 182 | 183 | 185 | 191 | 192 | 193 | 194 | 196 | 200 | 201 | 202 | 203 | 205 | 209 | 210 | 211 | 212 | 214 | 218 | 219 | 220 | 221 | 223 | 229 | 230 | 231 | 232 | 234 | 240 | 241 | 242 | 243 | 245 | 251 | 252 | 253 | 254 | 256 | 262 | 263 | 264 | 265 | 267 | 273 | 274 | 275 | 276 | 278 | 284 | 285 | 286 | 287 | 289 | 295 | 296 | 297 | 298 | 300 | 306 | 307 | 308 | 309 | 311 | 317 | 318 | 319 | 320 |
    138 | Method Summary
    144 | private anyappend(string verb='', [string body=''], struct properties='[runtime expression]', [string childOf='']) 146 |
    147 | 148 |
    153 | private anybuildResponse([any responseDoc], [any appendTo], [any Item]) 155 |
    156 | 157 |
    162 |  anyconference(string roomName='', [string muted=''], [string beep=''], [string startConferenceOnEnter=''], [string endConferenceOnExit=''], [string waitUrl=''], [string waitMethod=''], [numeric maxParticipants=''], [string childOf='']) 164 |
    165 | 166 | 167 |           The verb's noun allows you to connect to a conference room 168 |
    173 |  anydial([string number=''], string action='', [string method=''], [string timeout=''], [string hangupOnStar='false'], [string timeLimit=''], [string callerId='']) 175 |
    176 | 177 | 178 |           Connects the current caller to an another phone 179 |
    184 |  anygather(string action, [string method=''], [string timeout=''], [string finishOnKey=''], [string numDigits='']) 186 |
    187 | 188 | 189 |           Collects digits that a caller enters into his or her telephone keypad 190 |
    195 |  anygetResponse() 197 |
    198 | 199 |
    204 |  arraygetResponseData() 206 |
    207 | 208 |
    213 |  stringgetResponseXml() 215 |
    216 | 217 |
    222 |  anyhangup() 224 |
    225 | 226 | 227 |           Ends a call 228 |
    233 |  anynumber(string number='', [string sendDigits=''], [string url=''], [string childOf='']) 235 |
    236 | 237 | 238 |           The verb's noun specifies a phone number to dial 239 |
    244 |  anypause([numeric length='1'], [string childOf='']) 246 |
    247 | 248 | 249 |           Waits silently for a specific number of seconds 250 |
    255 |  anyplay(string url, [numeric loop='1']) 257 |
    258 | 259 | 260 |           Plays an audio file back to the caller 261 |
    266 |  anyrecord(string action='', [string method=''], [string timeout=''], [string finishOnKey=''], [string maxLength=''], [string transcribe=''], [string transcribeCallback=''], [string playBeep='']) 268 |
    269 | 270 | 271 |           Records the caller's voice and returns to you the URL of a file containing the audio recording 272 |
    277 |  anyredirect(string url, [string method='']) 279 |
    280 | 281 | 282 |           Transfers control of a call to the TwiML at a different URL 283 |
    288 |  anyreject([string reason='']) 290 |
    291 | 292 | 293 |           Rejects an incoming call to your Twilio number without billing you 294 |
    299 |  anysay(string body, [string voice=''], [string language=''], [numeric loop='1'], [string childOf='']) 301 |
    302 | 303 | 304 |           Say converts text to speech that is read back to the caller 305 |
    310 |  anysms([string to=''], [string from=''], [string action=''], [string method=''], [string statusCallback='']) 312 |
    313 | 314 | 315 |           Sends an SMS message to a phone number during a phone call 316 |
    321 | 322 | 323 | 324 |   325 | 326 | 327 | 328 | 329 | 330 | 331 | 336 | 337 |
    Methods inherited from class WEB-INF.cftags.component
    332 | 333 | 334 | 335 |
    338 | 339 | 340 |   341 |

    342 | 343 | 344 | 345 | 346 | 347 | 348 |

    349 | 350 | 352 | 353 |
    351 | Constructor Detail
    354 | 355 |

    356 | 357 | init

    358 | public init(any accountSid, any authToken, [any ApiVersion='[runtime expression]'], [any EndPoint='[runtime expression]']) 359 |
    360 |
    361 | 362 |

    363 |

    364 | 365 |
    366 |
    Parameters:
    367 | 368 |
    accountSid
    369 | 370 |
    authToken
    371 | 372 |
    ApiVersion
    373 | 374 |
    EndPoint
    375 | 376 |
    377 | 378 | 379 |
    380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 390 | 391 |
    389 | Method Detail
    392 | 393 |

    394 | append

    395 | private any append(string verb='', [string body=''], struct properties='[runtime expression]', [string childOf='']) 396 | 397 |
    398 |
    399 | 400 |

    401 |

    402 | 403 | 404 |
    405 |
    Parameters:
    406 | 407 |
    verb
    408 | 409 |
    body
    410 | 411 |
    properties
    412 | 413 |
    childOf -
    414 | 415 |
    416 | 417 | 418 | 419 |
    420 |
    421 | 422 |

    423 | buildResponse

    424 | private any buildResponse([any responseDoc], [any appendTo], [any Item]) 425 | 426 |
    427 |
    428 | 429 |

    430 |

    431 | 432 | 433 |
    434 |
    Parameters:
    435 | 436 |
    responseDoc
    437 | 438 |
    appendTo
    439 | 440 |
    Item
    441 | 442 |
    443 | 444 | 445 | 446 |
    447 |
    448 | 449 |

    450 | conference

    451 | public any conference(string roomName='', [string muted=''], [string beep=''], [string startConferenceOnEnter=''], [string endConferenceOnExit=''], [string waitUrl=''], [string waitMethod=''], [numeric maxParticipants=''], [string childOf='']) 452 | 453 |
    454 |
    455 | The verb's noun allows you to connect to a conference room. Much like how the noun allows you to connect to another phone number, the noun allows you to connect to a named conference room and talk with the other callers who have also connected to that room. 456 |

    457 |

    458 | 459 | 460 |
    461 |
    Parameters:
    462 | 463 |
    roomName - Name of the conference room to connect to.
    464 | 465 |
    muted - The 'muted' attribute lets you specify whether a participant can speak on the conference. If this attribute is set to 'true', the participant will only be able to listen to people on the conference. This attribute defaults to 'false'.
    466 | 467 |
    beep - The 'beep' attribute lets you specify whether a notification beep is played to the conference when a participant joins or leaves the conference. This defaults to 'true'.
    468 | 469 |
    startConferenceOnEnter - This attribute tells a conference to start when this participant joins the conference, if it is not already started. This is true by default. If this is false and the participant joins a conference that has not started, they are muted and hear background music until a participant joins where startConferenceOnEnter is true. This is useful for implementing moderated conferences.
    470 | 471 |
    endConferenceOnExit - If a participant has this attribute set to 'true', then when that participant leaves, the conference ends and all other participants drop out. This defaults to 'false'. This is useful for implementing moderated conferences that bridge two calls and allow either call leg to continue executing TwiML if the other hangs up.
    472 | 473 |
    waitUrl - The 'waitUrl' attribute lets you specify a URL for music that plays before the conference has started.
    474 | 475 |
    waitMethod - This attribute indicates which HTTP method to use when requesting 'waitUrl'. It defaults to 'POST'. Be sure to use 'GET' if you are directly requesting static audio files such as WAV or MP3 files so that Twilio properly caches the files.
    476 | 477 |
    maxParticipants - This attribute indicates the maximum number of participants you want to allow within a named conference room. The default maximum number of participants is 40. The value must be a positive integer less than or equal to 40.
    478 | 479 |
    childOf - The verb that this verb should be nested within.
    480 | 481 |
    482 | 483 | 484 | 485 |
    486 |
    487 | 488 |

    489 | dial

    490 | public any dial([string number=''], string action='', [string method=''], [string timeout=''], [string hangupOnStar='false'], [string timeLimit=''], [string callerId='']) 491 | 492 |
    493 |
    494 | Connects the current caller to an another phone. If the called party picks up, the two parties are connected and can communicate until one hangs up. If the called party does not pick up, if a busy signal is received, or if the number doesn't exist, the dial verb will finish. 495 |

    496 |

    497 | 498 | 499 |
    500 |
    Parameters:
    501 | 502 |
    number - The phone number to dial.
    503 | 504 |
    action - The 'action' attribute takes a URL as an argument. When the dialed call ends, Twilio will make a GET or POST request to this URL including the parameters below.
    505 | 506 |
    method - The 'method' attribute takes the value 'GET' or 'POST'. This tells Twilio whether to request the 'action' URL via HTTP GET or POST. This attribute is modeled after the HTML form 'method' attribute. 'POST' is the default value.
    507 | 508 |
    timeout - The 'timeout' attribute sets the limit in seconds that is waited for the called party to answer the call. Basically, how long should Twilio let the call ring before giving up and reporting 'no-answer' as the 'DialCallStatus'.
    509 | 510 |
    hangupOnStar - The 'hangupOnStar' attribute lets the calling party hang up on the called party by pressing the '*' key on his phone. When two parties are connected using , Twilio blocks execution of further verbs until the caller or called party hangs up. This feature allows the calling party to hang up on the called party without having to hang up her phone and ending her TwiML processing session. When the caller presses '*' Twilio will hang up on the called party. If an 'action' URL was provided, Twilio submits 'completed' as the 'DialCallStatus' to the URL and processes the response. If no 'action' was provided Twilio will continue on to the next verb in the current TwiML document.
    511 | 512 |
    timeLimit - The 'timeLimit' attribute sets the maximum duration of the in seconds. For example, by setting a time limit of 120 seconds will hang up on the called party automatically two minutes into the phone call. By default, there is a four hour time limit set on calls.
    513 | 514 |
    callerId - The 'callerId' attribute lets you specify the caller ID that will appear to the called party when Twilio calls. By default, when you put a in your TwiML response to Twilio's inbound call request, the caller ID that the dialed party sees is the inbound caller's caller ID.
    515 | 516 |
    517 | 518 | 519 | 520 |
    521 |
    522 | 523 |

    524 | gather

    525 | public any gather(string action, [string method=''], [string timeout=''], [string finishOnKey=''], [string numDigits='']) 526 | 527 |
    528 |
    529 | Collects digits that a caller enters into his or her telephone keypad. When the caller is done entering data, Twilio submits that data to the provided 'action' URL in an HTTP GET or POST request, just like a web browser submits data from an HTML form. If no input is received before timeout, the process moves through to the next verb in the TwiML document. 530 |

    531 |

    532 | 533 | 534 |
    535 |
    Parameters:
    536 | 537 |
    action - The 'action' attribute takes an absolute or relative URL as a value. When the caller has finished entering digits Twilio will make a GET or POST request to this URL including the parameters below. If no 'action' is provided, Twilio will by default make a POST request to the current document's URL.
    538 | 539 |
    method - The 'method' attribute takes the value 'GET' or 'POST'. This tells Twilio whether to request the 'action' URL via HTTP GET or POST. This attribute is modeled after the HTML form 'method' attribute. 'POST' is the default value.
    540 | 541 |
    timeout - The 'timeout' attribute sets the limit in seconds that Twilio will wait for the caller to press another digit before moving on and making a request to the 'action' URL. For example, if 'timeout' is '10', Twilio will wait ten seconds for the caller to press another key before submitting the previously entered digits to the 'action' URL. Twilio waits until completing the execution of all nested verbs before beginning the timeout period.
    542 | 543 |
    finishOnKey - The 'finishOnKey' attribute lets you choose one value that submits the received data when entered.
    544 | 545 |
    numDigits - The 'numDigits' attribute lets you set the number of digits you are expecting, and submits the data to the 'action' URL once the caller enters that number of digits. For example, one might set 'numDigits' to '5' and ask the caller to enter a 5 digit zip code. When the caller enters the fifth digit of '94117', Twilio will immediately submit the data to the 'action' URL.
    546 | 547 |
    548 | 549 | 550 | 551 |
    552 |
    553 | 554 |

    555 | getResponse

    556 | public any getResponse() 557 | 558 |
    559 |
    560 | 561 |

    562 |

    563 | 564 | 565 | 566 | 567 |
    568 |
    569 | 570 |

    571 | getResponseData

    572 | public array getResponseData() 573 | 574 |
    575 |
    576 | 577 |

    578 |

    579 | 580 | 581 | 582 | 583 |
    584 |
    585 | 586 |

    587 | getResponseXml

    588 | public string getResponseXml() 589 | 590 |
    591 |
    592 | 593 |

    594 |

    595 | 596 | 597 | 598 | 599 |
    600 |
    601 | 602 |

    603 | hangup

    604 | public any hangup() 605 | 606 |
    607 |
    608 | Ends a call. If used as the first verb in a TwiML response it does not prevent Twilio from answering the call and billing your account. 609 |

    610 |

    611 | 612 | 613 | 614 | 615 |
    616 |
    617 | 618 |

    619 | number

    620 | public any number(string number='', [string sendDigits=''], [string url=''], [string childOf='']) 621 | 622 |
    623 |
    624 | The verb's noun specifies a phone number to dial. Using the noun's attributes you can specify particular behaviors that Twilio should apply when dialing the number. 625 |

    626 |

    627 | 628 | 629 |
    630 |
    Parameters:
    631 | 632 |
    number - The phone number to dial.
    633 | 634 |
    sendDigits - The 'sendDigits' attribute tells Twilio to play DTMF tones when the call is answered. This is useful when dialing a phone number and an extension. Twilio will dial the number, and when the automated system picks up, send the DTMF tones to connect to the extension.
    635 | 636 |
    url - The 'url' attribute allows you to specify a url for a TwiML document that will run on the called party's end, after she answers, but before the parties are connected. You can use this TwiML to privatly play or say information to the called party, or provide a chance to decline the phone call using and . The current caller will continue to hear ringing while the TwiML document executes on the other end. TwiML documents executed in this manner are not allowed to contain the verb.
    637 | 638 |
    childOf - The verb that this verb should be nested within.
    639 | 640 |
    641 | 642 | 643 | 644 |
    645 |
    646 | 647 |

    648 | pause

    649 | public any pause([numeric length='1'], [string childOf='']) 650 | 651 |
    652 |
    653 | Waits silently for a specific number of seconds. If first verb in a TwiML document, Twilio will wait the specified number of seconds before picking up the call. 654 |

    655 |

    656 | 657 | 658 |
    659 |
    Parameters:
    660 | 661 |
    length - The 'length' attribute specifies how many seconds Twilio will wait silently before continuing on.
    662 | 663 |
    childOf - The verb that this verb should be nested within.
    664 | 665 |
    666 | 667 | 668 | 669 |
    670 |
    671 | 672 |

    673 | play

    674 | public any play(string url, [numeric loop='1']) 675 | 676 |
    677 |
    678 | Plays an audio file back to the caller. Twilio retrieves the file from a URL that you provide. 679 |

    680 |

    681 | 682 | 683 |
    684 |
    Parameters:
    685 | 686 |
    url - The URL of an audio file that Twilio will retrieve and play to the caller.
    687 | 688 |
    loop - Specifies how many times the audio file is played. The default behavior is to play the audio once. Specifying '0' will cause the the audio file to loop until the call is hung up.
    689 | 690 |
    691 | 692 | 693 | 694 |
    695 |
    696 | 697 |

    698 | record

    699 | public any record(string action='', [string method=''], [string timeout=''], [string finishOnKey=''], [string maxLength=''], [string transcribe=''], [string transcribeCallback=''], [string playBeep='']) 700 | 701 |
    702 |
    703 | Records the caller's voice and returns to you the URL of a file containing the audio recording. You can optionally generate text transcriptions of recorded calls by setting the 'transcribe' attribute of the verb to 'true'. 704 |

    705 |

    706 | 707 | 708 |
    709 |
    Parameters:
    710 | 711 |
    action - The 'action' attribute takes an absolute or relative URL as a value. When recording is finished Twilio will make a GET or POST request to this URL including the parameters below. If no 'action' is provided, will default to requesting the current document's URL.
    712 | 713 |
    method - The 'method' attribute takes the value 'GET' or 'POST'. This tells Twilio whether to request the 'action' URL via HTTP GET or POST. This attribute is modeled after the HTML form 'method' attribute. 'POST' is the default value.
    714 | 715 |
    timeout - The 'timeout' attribute tells Twilio to end the recording after a number of seconds of silence has passed. The default is 5 seconds.
    716 | 717 |
    finishOnKey - The 'finishOnKey' attribute lets you choose a set of digits that end the recording when entered.
    718 | 719 |
    maxLength - The 'maxLength' attribute lets you set the maximum length for the recording in seconds. If you set 'maxLength' to '30', the recording will automatically end after 30 seconds of recorded time has elapsed. This defaults to 3600 seconds (one hour) for a normal recording and 120 seconds (two minutes) for a transcribed recording.
    720 | 721 |
    transcribe - The 'transcribe' attribute tells Twilio that you would like a text representation of the audio of the recording. Twilio will pass this recording to our speech-to-text engine and attempt to convert the audio to human readable text.
    722 | 723 |
    transcribeCallback - The 'transcribeCallback' attribute is used in conjunction with the 'transcribe' attribute. It allows you to specify a URL to which Twilio will make an asynchronous POST request when the transcription is complete.
    724 | 725 |
    playBeep - The 'playBeep' attribute allows you to toggle between playing a sound before the start of a recording. If you set the value to 'false', no beep sound will be played.
    726 | 727 |
    728 | 729 | 730 | 731 |
    732 |
    733 | 734 |

    735 | redirect

    736 | public any redirect(string url, [string method='']) 737 | 738 |
    739 |
    740 | Transfers control of a call to the TwiML at a different URL. All verbs after this method are unreachable and ignored. 741 |

    742 |

    743 | 744 | 745 |
    746 |
    Parameters:
    747 | 748 |
    url - An absolute or relative URL for a different TwiML document.
    749 | 750 |
    method - The 'method' attribute takes the value 'GET' or 'POST'. This tells Twilio whether to request the URL via HTTP GET or POST. 'POST' is the default.
    751 | 752 |
    753 | 754 | 755 | 756 |
    757 |
    758 | 759 |

    760 | reject

    761 | public any reject([string reason='']) 762 | 763 |
    764 |
    765 | Rejects an incoming call to your Twilio number without billing you. This is very useful for blocking unwanted calls. If the first verb in a TwiML document is , Twilio will not pick up the call. The call ends with a status of 'busy' or 'no-answer', depending on the verb's 'reason' attribute. Any verbs after are unreachable and ignored. 766 |

    767 |

    768 | 769 | 770 |
    771 |
    Parameters:
    772 | 773 |
    reason - The reason attribute takes the values 'rejected' and 'busy.' This tells Twilio what message to play when rejecting a call. Selecting 'busy' will play a busy signal to the caller, while selecting 'rejected' will play a standard not-in-service response. If this attribute's value isn't set, the default is 'rejected.'
    774 | 775 |
    776 | 777 | 778 | 779 |
    780 |
    781 | 782 |

    783 | say

    784 | public any say(string body, [string voice=''], [string language=''], [numeric loop='1'], [string childOf='']) 785 | 786 |
    787 |
    788 | Say converts text to speech that is read back to the caller. Say is useful for development or saying dynamic text that is difficult to pre-record. 789 |

    790 |

    791 | 792 | 793 |
    794 |
    Parameters:
    795 | 796 |
    body - The text to be converted to speech.
    797 | 798 |
    voice - The 'voice' attribute allows you to choose a male or female voice to read text back. The default value is 'man'. Allowed Values: man, woman
    799 | 800 |
    language - The 'language' attribute allows you pick a voice with a specific language's accent and pronunciations. Twilio currently supports languages 'en' (English), 'es' (Spanish), 'fr' (French), and 'de' (German). The default is 'en'.
    801 | 802 |
    loop - Specifies how many times you'd like the text repeated. The default is once. Specifying '0' will cause the the this text to loop until the call is hung up.
    803 | 804 |
    childOf - The verb that this verb should be nested within.
    805 | 806 |
    807 | 808 | 809 | 810 |
    811 |
    812 | 813 |

    814 | sms

    815 | public any sms([string to=''], [string from=''], [string action=''], [string method=''], [string statusCallback='']) 816 | 817 |
    818 |
    819 | Sends an SMS message to a phone number during a phone call. 820 |

    821 |

    822 | 823 | 824 |
    825 |
    Parameters:
    826 | 827 |
    to - The 'to' attribute takes a valid phone number as a value. Twilio will send an SMS message to this number. When sending an SMS during an incoming call, 'to' defaults to the caller. When sending an SMS during an outgoing call, 'to' defaults to the called party. The value of 'to' must be a valid phone number.
    828 | 829 |
    from - The 'from' attribute takes a valid phone number as an argument. This number must be a phone number that you've purchased from or ported to Twilio. When sending an SMS during an incoming call, 'from' defaults to the called party. When sending an SMS during an outgoing call, 'from' defaults to the calling party. This number must be an SMS-capable local phone number assigned to your account.
    830 | 831 |
    action - The 'action' attribute takes a URL as an argument. After processing the verb, Twilio will make a GET or POST request to this URL with the form parameters 'SmsStatus' and 'SmsSid'. Using an 'action' URL, your application can receive synchronous notification that the message was successfully enqueued.
    832 | 833 |
    method - The 'method' attribute takes the value 'GET' or 'POST'. This tells Twilio whether to request the 'action' URL via HTTP GET or POST. This attribute is modeled after the HTML form 'method' attribute. 'POST' is the default value.
    834 | 835 |
    statusCallback - The 'statusCallback' attribute takes a URL as an argument. When the SMS message is actually sent, or if sending fails, Twilio will make an asynchronous POST request to this URL with the parameters 'SmsStatus' and 'SmsSid'. Note, 'statusCallback' always uses HTTP POST to request the given url.
    836 | 837 |
    838 | 839 | 840 | 841 |
    842 |
    843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 867 | 871 | 872 | 873 | 874 | 875 | 880 | 881 | 882 |
    868 | CFML Twilio Library 1.0 869 | 870 |
    883 | 884 | 885 | 886 |
    887 | 888 | 889 | 890 | --------------------------------------------------------------------------------