My First Twillio App

Its been a bit depressing week and I was wondering what to put in blog and there I came across Twillio…I felt adventurous and gave it a try.

Open an Account and DID

Opening an Account is simple, Online and hence fast. The free account gives you a US based DID number for free that can be used to make & Take calls from the grand old PSTN and also send & receive SMS. Its not unlimited …there is a credit limit of $30…Good enough to try this Cloud Solution.

I wanted to first try out a Cloud IVR Solution and hence focused on the inbound settings.

I went under Numbers->Twillio Numbers and there is the DID assigned to me and the URIs to which it has been configured to handle the call.

I Clicked on the number and it shows the detailed configuration and the default for Voice is some test URL pointing to a Twimlets.com site which has a simple app that does nothing but read out the sentence given in the URL itself. I Changed the Text and then from my Deskphone called the DID…It gives a short message and then after keypress reads out the sentence I had configured using Text-to-Speech.

Now the DID portion is tested and ready.

Host IVR Application

In Practical scenarios a Simple message is not what I would want to play to the caller but rather provide a menu and based on the option selected either transfer call to another number or take a voicemail. This would not fit into a single line and hence the option is to host the IVR Application in third party servers and configure to call them from Twillio. Further the Application can be PHP, Java, ,Net, Python or Ruby…But need to host these in a site and in my case for FREE J

Now where do I go to get a free site..A brief googling around pointed me to this site called w00.us. It’s a very conservative free no-ads site which allows free PHP hosting for a mighty 1.5MB of code. We usually hear GBs and TBs normally and 1.5MB may sound tiny but remember we are going to keep PHP code with zero media.

Great …I Registered and got a *.w00.us account. I activated the Site using the URL sent to my email and was shown a neat page with URL to the Admin Center and all details of MySql that also gets configured by default.

I logged into the administration center using the URL provided and zeroed into the “Online File Manager”. In this site no uploads are allowed in the root folder and instead need to be uploaded into the “/htdocs” folder. I simply navigated to this folder and created a test.php file using the text editor provided in the site itself. I started testing the code given under different versions of code provided by twillio in https://www.twilio.com/resources/tarball/twiml.zip. The code in the 1.4 folder is the most complex and funniest…try it yourself to know why J

Great! That was something to cheer up on an otherwise gloomy week. Next going to read more of the documentation on how to make more complex IVR Applications as per my design…Will blog if I discover anything interesting.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s