Telephony and django


Published on

Published in: Technology, Design
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Telephony has traditionally been expensive and out of reach for most developers. Twilio gives you instant access to send and receive voice and SMS messages, handle account billing, scale up to supports thousands of callers automatically, and it's cheap!
  • Telephony and django

    1. 1. Hello world? Hello? Hello? Building epic telephony apps with django-twilio.
    2. 2. Who am I? <ul><ul><li>Randall Degges </li></ul></ul><ul><ul><li>Lead developer @ BTS communications (we build cool telephony stuff). </li></ul></ul><ul><ul><li>Full stack developer. </li></ul></ul><ul><ul><li>Been doing this for 3 years. </li></ul></ul><ul><ul><li>Python / Django / Asterisk / VoIP. </li></ul></ul><ul><ul><li>[email_address] </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li>IRC: rdegges @ freenode </li></ul></ul>
    3. 3. So... what the heck is telephony?
    4. 4. Telephony <ul><ul><li>Apps that work via voice (IVRs). </li></ul></ul><ul><ul><li>Apps that work via SMS (text message). </li></ul></ul><ul><ul><li>Apps that help people communicate using their phones. </li></ul></ul><ul><ul><li>Some examples: </li></ul></ul><ul><ul><ul><li>  PagerDuty ( ) </li></ul></ul></ul><ul><ul><ul><li>  Conference Calls ( ) </li></ul></ul></ul><ul><ul><ul><li>  Knock Knock ( ) </li></ul></ul></ul><ul><ul><ul><li>  ... </li></ul></ul></ul>
    5. 5. A brief history of telephony.
    6. 6. Telephony--finally usable! <ul><ul><li>Until recently, telephony was HARD. </li></ul></ul><ul><ul><ul><li>Expensive and Proprietary. </li></ul></ul></ul><ul><ul><ul><li>Required hookups ( telcos, carriers, special hardware ). </li></ul></ul></ul><ul><ul><ul><li>Lots of domain knowledge. </li></ul></ul></ul><ul><ul><ul><li>Big learning curve. </li></ul></ul></ul><ul><ul><li>twilio is a game changer. </li></ul></ul><ul><ul><ul><li>Cheap and Accessible. </li></ul></ul></ul><ul><ul><ul><li>Less of a learning curve. </li></ul></ul></ul><ul><ul><ul><li>Scalable. </li></ul></ul></ul><ul><ul><ul><li>Works over HTTP. </li></ul></ul></ul>
    7. 7. Why twilio? <ul><ul><li>Cheap. </li></ul></ul><ul><ul><li>Scalable. </li></ul></ul><ul><ul><li>Well documented & supported. </li></ul></ul><ul><ul><li>I said so! </li></ul></ul><ul><ul><li> </li></ul></ul>
    8. 8. Let's learn about telephony!
    9. 9. How twilio works (incoming). <ul><ul><li>You buy a phone number from twilio. </li></ul></ul><ul><ul><li>You give twilio a URL where your application lives (eg: </li></ul></ul><ul><ul><li>Someone calls or SMS messages your phone number. </li></ul></ul><ul><ul><li>twilio receives your call / SMS, and POSTs to your URL with lots of data. </li></ul></ul><ul><ul><li>Your web application tells twilio what to do next. </li></ul></ul><ul><ul><li>Repeat. </li></ul></ul>
    10. 10. How twilio works (outgoing). <ul><ul><li>You POST to twilio with some instructions. </li></ul></ul><ul><ul><li>twilio does what you want. </li></ul></ul>
    11. 11. django-twilioooooyeeaaaa
    12. 12. django-twilio makes twilio easy. <ul><ul><li>It provides lots of utilities for building twilio apps. </li></ul></ul><ul><ul><li>Don't write boilerplate code. </li></ul></ul><ul><ul><li>Lock down your telephony web applications. </li></ul></ul><ul><ul><li>It's actively developed. ( </li></ul></ul><ul><ul><li>It's got great support. </li></ul></ul><ul><ul><li>It's got great docs. ( </li></ul></ul><ul><ul><li>It's unit tested. </li></ul></ul><ul><ul><li>It got sample apps       ( </li></ul></ul><ul><ul><li>And oh yea, it's easy! </li></ul></ul>
    13. 13. Hello, LA Django! <ul><li># </li></ul><ul><li>urlpatterns = patterns('', </li></ul><ul><li>    # ... </li></ul><ul><li>     url(r'^$', 'django_twilio.views.say', {'text': 'hi!'}), </li></ul><ul><li>    # ... </li></ul><ul><li>) </li></ul><ul><li>Try it live: (818) 924-2943! See: </li></ul><ul><li> </li></ul>
    14. 14. Easy, right?
    15. 15. Make a Conference Room <ul><li># </li></ul><ul><li>  urlpatterns = patterns('', </li></ul><ul><li>    # ... </li></ul><ul><li>     url(r'^$', 'django_twilio.views.conference', { </li></ul><ul><li>         'name': 'conf1', </li></ul><ul><li>        'wait_url': '', </li></ul><ul><li>        'wait_method': 'GET', </li></ul><ul><li>    }), </li></ul><ul><li>    # ... </li></ul><ul><li>) </li></ul><ul><li>Try it live: (818) 924-2942!  </li></ul><ul><li> </li></ul>
    16. 16. Custom Stuff <ul><li># </li></ul><ul><li>from twilio.twiml import Response </li></ul><ul><li>from django_twilio.decorators import twilio_view </li></ul><ul><li>@twilio_view </li></ul><ul><li>def my_view(request): </li></ul><ul><li>    r = Response() </li></ul><ul><li>    r.sms('Party at my place?') </li></ul><ul><li>    return r </li></ul><ul><li> </li></ul>
    17. 17. State of Development <ul><ul><li>Actively developed. </li></ul></ul><ul><ul><li>New stuff every day. </li></ul></ul><ul><ul><li>Great docs ( </li></ul></ul><ul><ul><li>Lots of unit tests. </li></ul></ul><ul><ul><li>Working on new features and stable release. </li></ul></ul><ul><ul><li>Working towards being a full twilio solution. </li></ul></ul><ul><ul><li>Project supported by twilio! </li></ul></ul>
    18. 18. Resources <ul><ul><li>My website: </li></ul></ul><ul><ul><li>twilio: </li></ul></ul><ul><ul><li>twilio-python: </li></ul></ul><ul><ul><li>django-twilio: </li></ul></ul><ul><ul><li>example apps from this presentation: </li></ul></ul>
    19. 19. Questions?
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.