After our announcement for support of SMS and Instant Messaging at SpeechTek this week, I would like to build upon Mike Thompson’s post for building Messaging into your Tropo applications. To get started all you need is the same Tropo account you are already using.
When you log in to your account now, you will notice three additional features:
1. An option to add a URL that powers SMS/messaging
2. An option to add an SMS enabled number (provided we have them in stock)
3. An option to add one or more Instant Messaging Networks to your application
Once you have created a new application, now you need to write a script. The beauty is that you use the same methods and capabilities of the existing Tropo API. In this Ruby example (available on Gist) we are going to play a sandwich trivia game, where we ask the user to tell us what WE think are the best sandwiches ever:
When you then chat with the Instant Messaging or SMS account you have configured in your application, you will see something like this:
Thats it! You have added messaging to your Tropo account.
A current consideration is that when dealing with different channels your timeouts need to be adjusted. On a voice call you may not want to wait for a response any more than 10 seconds, while with messaging you may want to wait 30 seconds or 60 seconds or more. This is why we have two URLs, one for voice and one for SMS/messaging right now, to allow you to account for user behavior across different channels.
Stay tuned as we add additional features to Tropo, and enjoy!
- How To Get Started with SMS / Text Messaging on Tropo.com
- How-To: Sending an SMS using WebAPI