telephony and django

Post on 08-May-2015

8.331 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Hello world? Hello? Hello?

Building epic telephony apps with django-twilio.

Who am I?

• Randall Degges• Lead developer @ BTS communications (we build

cool telephony stuff).• Full stack developer.• Been doing this for 3 years.• Python / Django / Asterisk / VoIP.• rdegges@gmail.com• http://rdegges.com/• IRC: rdegges @ freenode

So... what the heck is telephony?

Telephony

• Apps that work via voice (IVRs).• Apps that work via SMS (text message).• Apps that help people communicate using their

phones.

• Some examples:o  PagerDuty (http://www.pagerduty.com/)o  Conference Calls (http://bridg.me/)o  Knock Knock (http://knockknock.in/)o  ...

A brief history of telephony.

Telephony--finally usable!

• Until recently, telephony was HARD.o Expensive and Proprietary.o Required hookups (telcos, carriers, special hardware).o Lots of domain knowledge.o Big learning curve.

• twilio is a game changer.o Cheap and Accessible.o Less of a learning curve.o Scalable.o Works over HTTP.

Why twilio?

• Cheap.• Scalable.• Well documented & supported.• I said so!• http://twilio.com/

Let's learn about telephony!

How twilio works (incoming).

• You buy a phone number from twilio.• You give twilio a URL where your application lives

(eg: http://coolguy.com/sup/bro/).• Someone calls or SMS messages your phone

number.• twilio receives your call / SMS, and POSTs to your

URL with lots of data.• Your web application tells twilio what to do next.• Repeat.

How twilio works (outgoing).

• You POST to twilio with some instructions.• twilio does what you want.

django-twilioooooyeeaaaa

django-twilio makes twilio easy.

• It provides lots of utilities for building twilio apps.• Don't write boilerplate code.• Lock down your telephony web applications.• It's actively developed. (github.com/rdegges/django-

twilio)• It's got great support.• It's got great docs. (django-twilio.readthedocs.org)• It's unit tested.• It got sample apps

      (github.com/rdegges/django-twilio-example-apps)• And oh yea, it's easy!

Hello, LA Django!

# urls.pyurlpatterns = patterns('',    # ...    url(r'^$', 'django_twilio.views.say', {'text': 'hi!'}),    # ...)

Try it live: (818) 924-2943! See:

http://django-twilio.readthedocs.org/en/latest/views.html#saying-stuff

Easy, right?

Make a Conference Room# urls.py urlpatterns = patterns('',    # ...    url(r'^$', 'django_twilio.views.conference', {        'name': 'conf1',        'wait_url': 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.rock',        'wait_method': 'GET',    }),    # ...)

Try it live: (818) 924-2942! django-twilio.readthedocs.org/en/latest/views.html#teleconferencing

Custom Stuff# views.pyfrom twilio.twiml import Responsefrom django_twilio.decorators import twilio_view

@twilio_viewdef my_view(request):    r = Response()    r.sms('Party at my place?')    return r

django-twilio.readthedocs.org/en/latest/decorators.html#all-in-one-decorator

State of Development

• Actively developed.• New stuff every day.• Great docs (http://django-twilio.rtfd.org).• Lots of unit tests.• Working on new features and stable release.• Working towards being a full twilio solution.• Project supported by twilio! 

http://www.twilio.com/docs/libraries/

Resources

• My website: http://rdegges.com/• twilio: http://www.twilio.com/• twilio-python: https://github.com/twilio/twilio-python• django-twilio: 

https://github.com/rdegges/django-twilio• example apps from this presentation: 

https://github.com/rdegges/django-twilio-example-apps

Questions?

top related