Twilio: using Twimlets

Posted on Thursday, September 11, 2014





This guide will walk your through how to use Twimlets with Twilio.  I assume you already have a Twilio account set up









What is are Twimlets?


The Twimlet page at https://www.twilio.com/labs/twimlets [1] has this explanation.


Twimlets are tiny web applications that implement basic voice functionality. Think of them as "Widgets" in the web world.


I am still new to Twilio, but, if my understanding is correct, to get Twilio to do something impressive you really need to use some kind of web service.   A static TwiML file is not enough (to do much).

Twimlets fulfill the need for an easy to use web service with your Twilio phone number.   They are not enough to do everything, but they may be enough to get the job you want done.
Voicemail Twimlet

I am going to start with the voicemail Twimlet.
The voicemail Twimlet documentation can be found at https://www.twilio.com/labs/twimlets/voicemail [1]


Scroll to the bottom of the page






They provide a nice URL generator for the tool.





If you enter in the following information you will get this URL.



Replace me@example.com with your own email address, then copy the resulting URL (to be pasted later)






Log into your twilio account






Open up the Numbers Tab






Click on your Twilio phone number.







Paste the URL here in the Voice section.











Click Save.







Now make Your Call!


I dialed into my number.  Here is a recording of my call to the number.


It looks like it’s a good idea to add, press 1 when you are complete.  My call went long because I did not do this.



Looking at my email I see that the voice message was sent to me.








If I click on the link I can listen to the audio or download it.



Here is the actual message Twilio recorded








Shortening the URL


Twilio does provide a way to shorten the URL for you.  If you are logged into Twilio you should be able to open this url https://www.twilio.com/labs/twimlets/my











Select Voicemail and click Create New Twimlet







Enter the information again and click Save URL






Give it a name and lick Save







Now you have a shortened twimlet URL associated with your account.

Click OK








Click My Twimlets








You should now see your Twimlet saved here.


You can place this URL in your Voice Request URL






References
[1]        Twimlet page
                        https://www.twilio.com/labs/twimlets
                Accessed 08/2014
[2]        Twilio Voicemail Twimlet
                        https://www.twilio.com/labs/twimlets/voicemail

                Accessed 08/2014 





This post is a part of and epic, the pagerduty and twilio epic.


Epic Goal:   Set up a phone number, via twillio, that when called will set off a pagerduty event.

No comments:

Post a Comment