00:00:17.039
it's uh my name is greg i am the developer evangelist for twilio and just out of curiosity how many of
00:00:22.800
you have heard of twilio before i know of twilio that's awesome so cool how many of you have used twilio before
00:00:29.439
that is also so cool all right um awesome so uh so yeah so i'm developer
00:00:35.040
evangelist for them and like i said i live here in chicago i'm so incredibly happy to be here this is to be able to
00:00:40.960
speak at railsconf i've programmed for a good chunk of my life but i just picked up rails uh about
00:00:46.239
three years ago um and i just started working for twilio about two months ago
00:00:51.440
and it's just been absolutely incredible and so to be able to speak at railsconf in the city i love uh you know for this
00:00:58.960
company it is it's like i don't know it kind of feels like a big accomplishment uh for me so um so if you were to come
00:01:06.240
up to me afterwards you're saying hey craig you just spoke at railsconf in the city that you love
00:01:12.960
uh what are you gonna do next what do you think i would say
00:01:18.000
damn right i'm going to disney world i'm going on saturday night so i wish i could say i actually planned
00:01:24.560
it that way my wife and i just happened to uh to plan a vacation at disney world uh
00:01:30.000
and it happened to be that we're flying out the exact day after railscope so that was so nice
00:01:35.680
um and i don't know like when i was growing up i absolutely loved disney world it was
00:01:40.720
an amazing place for me it probably was actually the the happiest place on earth for me um so much so that when i was in
00:01:46.240
college i took a semester off and i went and i picked up trash at the magic kingdom uh and i got paid 5.85 an hour
00:01:52.960
like literally clean up cute um and it was awesome and but when i was actually when i was
00:01:58.799
younger epcot was my favorite i didn't have much use for castles and stuff but epcot
00:02:04.799
was you know stands for experimental prototype community of tomorrow it is a
00:02:09.920
is a vision of the future epcot was built to inspire us about what is possible with technology
00:02:16.400
and the ways in which technology can change our life and to come up with new ideas and new ways
00:02:21.760
to communicate um and you know the the big golf ball here is actually a
00:02:27.440
ride it's called spaceship earth if you haven't been there before and when you go inside of it you get in one of these
00:02:32.640
cars that looks like this and it's not a fast ride it's not a particularly exciting ride what it is is about a
00:02:38.640
20-minute tribute to the history of communication and uh you go through and you see these
00:02:44.400
different scenes and so you see like the the monks who were
00:02:49.760
copying manuscripts by hand and all these guys are animatronics they're all robots right except for he might not be moving it might be snoring or something
00:02:56.160
um and then you see the printing press during the industrial revolution and then you see the advent of the
00:03:01.920
telegraph the first time that we had real-time communications over great distance and then we see the advent of the
00:03:08.480
telephone system the first time that we had uh real-time voice communication
00:03:13.519
over distance and back when i was a kid in the mid 80s and the the you know like the late 80s
00:03:19.120
or something this was the last scene in the history it was the vision of the future
00:03:24.159
it was it was a boy in america talking on a video screen to a girl in japan
00:03:31.120
that was that was the vision of the future from from the mid to late 80s and uh the thing about epcot is that you
00:03:37.599
know it's this vision of the future and the thing about the future is that it comes you know
00:03:42.959
uh and so so every 10 years or so they shut down spaceship earth for for a few weeks
00:03:48.640
and they update it and i just found this out i didn't know this was the case i haven't been there in like 10 years but i want to see this
00:03:54.080
next week but they added a new scene depicting what disney considers to be a
00:04:00.640
uh you know what has been an important contribution to human communication as the telephone
00:04:07.599
of the telegraph and that movement is represented by waz sitting in his garage
00:04:13.120
tinkering on the first apple disney believes that the advent of the personal computer and and the
00:04:19.600
proliferation of software has had as big of an effect on human communication as has the telephone and we at twilio
00:04:27.360
would agree with that our mission statement is to change communications forever
00:04:32.880
at least that's the short version of it the the longer version is to change communications forever by migrating this
00:04:38.639
industry from its legacy and hardware to its future and software that's kind of mouthful so let me let me
00:04:44.400
help explain that a little bit better and it's a little bit easier to explain that by talking about other industries because we're seeing this trend
00:04:50.240
everywhere you know mark andre says that software is eating the world and what we're seeing is all these these
00:04:55.919
industries that used to be dependent upon hardware are now becoming playground for people who can write
00:05:01.120
software people like you so what if i said change hosting forever by migrating this industry from this legacy and
00:05:07.039
hardware to its future and software who might be talking about there anyone
00:05:13.120
heroku yeah amazon with aws you know it used to be that if you
00:05:19.039
wanted to host a website you needed to know how to do this and now when i want to host a new website or create a server i click that
00:05:24.639
blue button up there uh i don't know anything about hardware these these guys are digital ocean they have a
00:05:30.800
i'm guessing y'all probably heard they're awesome i just started using them a few months ago they have a booth downstairs
00:05:36.160
uh what about this change payments forever who might this be
00:05:41.520
straight yeah yeah exactly who else yeah paypal braintree yeah it used to be
00:05:48.960
that if you wanted to uh process a bunch of credit card to get by one of these things and five years later
00:05:54.639
that was going to be the exact same device as the day it rolled off the line and today square spent so little money
00:06:00.160
on the actual hardware they give it away you know they're not hardware people they're software people software people
00:06:05.280
who are changing the payments industry what about this change transportation forever who's doing that
00:06:11.199
uber how would you like to be the guy who owns the company that makes these things right here
00:06:17.199
it was like five years ago that life looked pretty good you know that you didn't have to change things you sell pretty much the same product of itself
00:06:22.560
the last 10 years and then these guys come along uber doesn't make any hardware they're
00:06:27.680
software people any other software people who have totally disrupted this transportation
00:06:32.720
industry we have as software people i don't think that there is
00:06:38.800
any other skill set that you can have that gives you more power to impact the world right now
00:06:44.319
than the skill set that you all have in here today and so that's what we're passionate about we're passionate about changing
00:06:50.560
communications forever by migrating this industry from its legacy and hardware as future and software how do we use
00:06:55.759
software how do we empower all of you here to change communications and there's a technology that's new it's
00:07:01.680
just in the last three years has come around it was not invented by us but we love it and it's called webrtc
00:07:07.840
and we believe that it's going to change the way that the world communicates it just who here has heard of webrtc
00:07:14.000
here i mean because he all showed up in the room so it wasn't like
00:07:19.039
totally un disinteresting for you um
00:07:24.639
okay so what is webrtc so webrtc enables real-time communication in the browser via open
00:07:31.199
peer-to-peer protocols that's more of a mouthful than the uh migrating this industry from its legacy
00:07:37.840
and everybody so let's break this down a little bit
00:07:43.039
so real real-time communication in the browser we've had real-time communication on the internet for a while this is not
00:07:49.680
necessarily a new thing um skype came out about 10 years ago and it
00:07:55.520
provided real-time voice communication over the internet you know now we have google hangouts
00:08:00.800
uh which happens in the browser but it requires a plug-in in order to install we've had real-time communication in the
00:08:06.080
browser before but it's always required plug-ins especially flash and then you have facetime which is
00:08:11.199
again it's a standalone app it's not happening in the browser and i don't know like everyone here is a web developer i'm guessing um
00:08:18.639
i have never tried to screw around with media before i don't know if any of you have but
00:08:24.080
it's pain in the ass uh you have to first figure out how to get access to the camera how to get
00:08:29.120
access to the microphone you have to be able to pull in that data you have to be able to code in some way and you have to figure out how to transfer it was a
00:08:34.959
little bit more complicated making http requests and once it gets there you have to figure out how to decode it there's all
00:08:40.640
this information going back and forth it's way more difficult than building crud apps and rails um
00:08:46.560
webrtc gives us all of that for free okay so webrtc is this open set of protocols it's this tool set
00:08:53.519
that lives in the browser and it allows you to have access to the video camera and to the microphone
00:09:00.240
and it will capture that information for you and then it will wrap it up for you and allow you to ship it off so that's
00:09:06.240
amazing like it's uh it's it's absolutely incredible that the tools we have and it's happening in the browser
00:09:12.480
um which is you know we used to have you know in skype we're used to installing these
00:09:18.720
third-party apps right which means that the other person doesn't have skype and doesn't want to install it you can't communicate with
00:09:24.320
them um and it also means that if you wanted to build something that took advantage of real-time communication
00:09:29.839
before you had to know how to build a standalone app so that wasn't necessarily something that was open to web developers out
00:09:37.200
there now if you know how to build apps for the browser especially as it gets in a
00:09:43.519
second it's all javascript you can build real-time build apps that use real-time communication so webrtc is
00:09:50.000
javascript apis it's actually three apis that are in javascript uh one is called
00:09:55.440
getusermedia that's the one that actually captures the media for us that's the one that will open up the
00:10:00.959
camera it'll open up the microphone start recording that information uh then you have this other one called
00:10:07.680
rtc pure connection which we'll talk about in a second but it's the one that establishes the connection that lets you
00:10:13.040
communicate and send that information off and then we have rtc data channel which is actually super interesting this
00:10:19.040
is whenever we talk about webrtc the first thing that comes up is video communication or voice communication
00:10:25.279
um but the people who are really into this stuff are actually most into this rtc data channel one or
00:10:32.000
it's it's kind of the biggest unknown because the the use cases for the media stuff is pretty obvious um although i'm
00:10:38.560
sure we're gonna think of things that we've never thought of before but this data channel one opens up a lot of opportunities that not a whole lot of
00:10:44.399
people have thought through yet uh and i'll talk about that again in just a second uh well i want to talk about it here i guess because that's where the
00:10:50.240
slide is uh so so the thing with the uh with the rtc
00:10:55.920
peer connection is that we're not bouncing these messages through a server the
00:11:01.200
the way in which this is going to work is that we're going to open up a direct connection between two browsers
00:11:06.320
and so these guys have thought of using that data channel they got required um they wrote something called peer cdn so
00:11:12.640
this idea that as visitors came to your website they could download those assets and then open up direct connections
00:11:18.480
to other visitors who came to your website and serve that
00:11:23.519
you know this the data channel allows us to start doing things thinking about things like bittorrent in the browser
00:11:30.160
let me talk a little bit more about the peer-to-peer connection so it's open peer-to-peer protocol so this is the
00:11:35.920
standard web model right we have data going to a server and coming back what webrtc allows us to do is to establish a
00:11:42.640
peer-to-peer secure encrypted peer-to-peer connection between two browsers so this means that a it's really fast
00:11:51.519
because the data is not going through a server you know like if you right now you can have a situation in which you
00:11:57.360
have two people sitting in japan and their messages are bouncing off a server in new york before they get to each other webrtc can help figure out that
00:12:03.920
hey you're on the same network uh you can just open up a connection right here and you can communicate it's
00:12:09.040
also secure your messages are not going through a third party and all web rtc connections or transfers are
00:12:16.000
encrypted so it solves a lot of security issues that people are concerned about these
00:12:21.120
days and it's also interoperable if you have skype you can't talk to somebody on
00:12:26.320
facetime you know you can't talk to somebody um on google hangouts versus facetime
00:12:32.959
webrtc is open protocol so this means that a you don't have to get people to install special software if they have a
00:12:39.279
browser then they can use your app and these protocols mean that you could set it up we're all using the same protocols
00:12:44.639
for this so that your app can talk to another app which is super cool um all right so whether he's gonna
00:12:50.720
change the world it's so easy it's amazing it's actually unfortunately a little bit more complicated that's the pretty picture
00:12:56.639
um so is webrtc ready yet.com uh this is a
00:13:02.560
site that's put up by the people at and yet and if you want to learn more about webrtc
00:13:07.839
they're kind of leaders in the space their consulting shop out in seattle they've done some great tools i'll show
00:13:13.200
you that actually the talkie dog i o the video conferencing thing i showed you a little bit earlier that's by those guys
00:13:18.959
and you have two people they go to the same url and it pops up starts a video chat amongst you um so they're keeping a
00:13:25.279
scorecard here of who is what browsers are webrtc ready yet and you know those big black lines going through anything
00:13:32.240
that's owned by microsoft and apple because they pretty much don't do anything unless you twist their arm to
00:13:38.639
do it which also unfortunately means that webrtc is not currently enabled on ios devices
00:13:44.560
on google on chrome for android you can do webrtc uh so that means you could build an app someone could visit on
00:13:49.839
their android phone and communicate video chat with somebody else who's on desktop you can't do that
00:13:55.120
on ios unfortunately yet and you know one of the things that we really need are for more people more
00:14:00.399
developers to start building apps because of apple and microsoft have proven they're pretty much only going to
00:14:05.600
do something if you twist their arm and do it like we need webrtc to reach a critical mass we need like that killer
00:14:10.880
app that everybody's complaining about that their ios device doesn't do it and so the best way to get them to make
00:14:18.160
webrtc more open standard or you know just more widely adopted is we need developers to
00:14:23.760
start building with it um but chrome and firefox are fully supported so this means that you can build an app
00:14:30.160
and firefox you know use webrtc and firefox and and someone chrome can use it and hopefully we'll get to the point
00:14:35.600
where pretty much every browser i i don't really have a lot of hope for id but you know
00:14:41.519
um and webrtc does not do signaling so you know i'm a rails guy i
00:14:47.120
i don't really know a whole lot about network protocols and stuff and i don't really get it like tcpip like i kind of
00:14:52.240
know what it is i don't know how it works i don't know if any of you are like that but this diagram that i had up here earlier uh
00:14:59.920
might surprise you but it actually painted a little bit of a well simple picture of how things actually work it's
00:15:06.240
not actually quite like this um so if i want these two machines to actually talk to each other then i need
00:15:13.120
them to open up a signal between each other there's a whole lot of information that they need to communicate back and
00:15:18.320
forth before they actually can start talking and to use that to set up that connection we'll use stp or session
00:15:24.399
description protocol and sdp is going to answer questions like are you there you know who are you uh what is it you're
00:15:31.120
sending me are you send me a video you send me audio uh how is it encoded what am i going to do with it when it comes back and then this question of which is
00:15:38.160
a pretty important question now first off is where are you actually because um you know the slightly more complicated
00:15:45.759
view of how the world actually works is that your computer is actually sitting behind a router it's not
00:15:52.079
connected directly to the internet and we use nat in order to give that computer that's on the local
00:15:58.000
network a local ip address and then it's hiding behind a router that has the the publicly available ip address
00:16:03.680
so there's a set of protocols in order to figure out where these computers are so that one computer can figure out hey
00:16:09.040
where am i on the internet um it's called ice interactive connectivity establishment one of them is called stun
00:16:16.000
which is how do we traverse the net so the idea here is that you have a server sitting out in the world somewhere and
00:16:22.880
this one computer's trying to figure out hey where am i so it pings the stun server the stun server relays back
00:16:28.240
that computer's ip address and then this computer can send that ip address to the other computer and now they've found
00:16:34.320
each other they can set up direct connection sometimes that doesn't work so we have this thing called turn which is like hey
00:16:39.920
that didn't work and so then we just end up bouncing messages through the turn uh the turn takes care of it for us um i
00:16:46.560
don't have much interest in any of this stuff like it's uh it's kind of a pain in the ass uh and and webrtc does not include
00:16:53.680
and that's actually a good thing um the reason for it is that there are all sort there are flame words
00:17:00.000
about what signaling protocol is best so which of you know the whole network connectivity thing is this whole other
00:17:06.880
minefield and for webrtc to have bundled that in they would have had to come down on a hard stance instead of what they're
00:17:12.240
saying is depending on your app you can implement this in whatever way you think is is correct um
00:17:18.400
and so it doesn't build in that signalling force webrtc does not also
00:17:23.520
doesn't really scale well between multiple people so you can do multiple connections
00:17:28.720
uh but it happens through what's called a mesh network so for each additional person who's out of the network
00:17:34.080
everybody else has to open up a you know connection to them
00:17:39.280
so you run into these problems where once you start adding four or five people like the number of connections
00:17:45.120
grows exponentially and everything slows down so on that talking on io you can get three or four people on there for
00:17:51.280
video chat but anything more than that it really starts to slow down and doesn't really work that
00:17:56.640
well um and webrtc doesn't do telephones um you know no matter what apps we're
00:18:02.240
building it's super cool we do this stuff in the browser the fact is that for most business applications
00:18:07.280
most communication is happening over the telephony network and so at some point you're probably if you're
00:18:13.760
building a business application you're probably going to need some sort of way to get in the telephones um but
00:18:19.840
let's say that you're not you're not deterred by those downsides there uh and you want to get started how
00:18:25.679
would you go about doing that there is a library called simple webrtc
00:18:32.960
it is built by the people at and yet and what he has done is this guy named
00:18:38.080
henrik who also gave this awesome talk of cascadia.js last year talking about this stuff uh he
00:18:45.360
does a great job of communicating this but with simple art webrtc it's just a set of javascript tools that takes care
00:18:50.960
of a lot of this stuff so there is a simple signaling server that's built in node that you can set up and take care of
00:18:56.960
some of these problems he also standardized even though their open protocols the way in which you implement something in firefox is a little bit
00:19:02.960
different than the way that you would implement it in chrome and you kind of have to uh they're just not entirely
00:19:08.160
standardized and his library serves as a wrapper for that to standardize those
00:19:13.200
protocols or you know the the javascript actions for you um
00:19:19.200
and then of course you know i haven't worked for twilio so it might surprise you that we have a a way that you can take advantage of
00:19:24.320
some of this stuff so we have what's called twilio client and twilio client is a way to enable
00:19:29.919
communication in the browser and we leverage webrtc for some of it it's not a fully uh it's let's say it's not a
00:19:36.640
webrtc solution and then you can't just use twilio and solve all your webrtc
00:19:42.480
prompts for you but it is a webrtc enabled solution in that we're using webrtc to solve a lot of problems that
00:19:48.720
we were doing before and they becoming much easier for us now that we've been doing webrtc
00:19:55.520
or at least they will be you know more so in the future and a lot of the things that you want to do with webrtc you can
00:20:01.039
actually do with twilio client and we will handle the signaling for you uh we will handle
00:20:07.200
the issues such as what happens if the uh the person who comes to your website is
00:20:12.480
using internet explorer they're using safari you know what do you do then you know and the answer is that you fall
00:20:18.400
back to a flash plug-in and that's kind of a pain in the ass to write so we take care of that stuff for you so uh with
00:20:24.480
that i want to show you just a quick demo of what it looks like and do a little bit of coding here and show you what it
00:20:31.039
looks like to build an app that uses twilio client that would enable browser browser communication or enable browser
00:20:37.679
to telephone communication um let me do this
00:20:43.440
because it's hard to type one hand all right can you still hear me
00:20:49.840
all right all right so the first thing i want to do
00:20:56.240
i don't know if i need to speak into this for the uh the app or what or for the recording
00:21:01.360
but i want to come to my twilio dashboard here and i'm going to create a new app and i'll just call this my railsconf
00:21:07.600
phone and i need to provide a
00:21:13.360
url for where i want twilio to get the instructions from
00:21:18.640
for what to do once i actually try to make an outbound call
00:21:24.960
and once i've actually created my application here then i'm provided with a unique
00:21:30.159
identifier for that app so i'm going to build this thing in sinatra everyone familiar with sinatra
00:21:37.760
so okay so sinatra for those of you who aren't sasha is just super stripped down
00:21:43.280
web framework so it's like in rails if you could just define your routes on the fly and then just kind of stick the
00:21:49.120
controllers in there at the same time um it just lets you really build things really fast so i'm going to
00:21:54.720
build a sinatra app so i'll require sinatra um i'm going to require the twilio ruby
00:22:00.720
library uh if i'm assuming everyone here is a ruby programmer since you're here at railsconf if you're not or if you're
00:22:06.400
into other things we also have libraries for python we have libraries for uh for node we have if you're a dot net
00:22:12.400
person which oh my god does anyone here dude.net wow that's awesome i would didn't imagine that's so cool like do you does
00:22:19.440
your company also do rails as well or is that something you do i don't do it very much you don't
00:22:24.880
okay cool well if you decide you want to build something using twilight.net we got you
00:22:30.799
uh so and then i'm gonna require some uh credentials that i have because i do not feel like
00:22:37.120
sharing my off token and whatnot with y'all so i'm going to just set up this is
00:22:42.559
basically like think of it from a rails percep perspective as my uh my root my index
00:22:48.320
and what i need to do is send a capability token is what we call it to twilio to let it know that this
00:22:55.039
client is able to interact with twilio on behalf of my account so i'll set up
00:23:01.360
it's called capability and i'll use the twilio library
00:23:08.159
this is one of those words i misspelled all the time capability uh and i'm just going to pass that my
00:23:14.880
authentication information and then once i have my capability token
00:23:21.039
i need to tell it what are the capabilities that i'm actually offering to the client what am i letting the client do and in this case i'm going to
00:23:27.679
let the client have outgoing connections and i'm going to paste in my application id that i just got
00:23:34.559
and i'm going to allow it to have a lot of the client to have incoming applications and i just need to give
00:23:40.480
this client a name just so twilio knows how to uniquely identify this particular client
00:23:46.640
and once i've done that then i can generate my token
00:23:52.640
and then i can use erb to pass that token into
00:24:00.960
the html and some javascript that i wrote ahead of time actually i say i wrote it at the time i
00:24:06.559
didn't actually write it ah what i'm doing here is just following along with the
00:24:11.919
the quick start guide so you can actually go through the same thing and you can have this
00:24:17.760
if you are interested in what i'm doing here afterwards uh you can recreate this whole thing in probably 15 or 20 minutes
00:24:23.360
going through the quick start guides on goleo's docs so i'll save this i just want to show
00:24:28.400
you what this looks like all right so this is all the uh the
00:24:36.720
i well not many of you know me but if you didn't know me or my wife will tell you that i am not much of a designer so i
00:24:42.000
can tell you i definitely did not do this part uh but uh but yeah so it's there's probably about 15 lines of html
00:24:47.600
about 15 lines of javascript that's happening um and you can see that from the docs if you go through this um so
00:24:53.520
what's going to happen here is i'm going to punch in a phone number i'm going to hit the call button and when i hit the
00:24:58.640
call button twilio's going to send that phone number it's going to send the capability token or my client's going to send that to
00:25:04.880
twilio and then twilio's going to check see if i have the permissions to actually interact with
00:25:11.039
that application and if i do then twilio is going to go looking for instructions to say okay what do you want me to do
00:25:16.080
with this information and that's what i set up over here is i set up the url i said this is where you go
00:25:21.520
to find that information and so i'm just going to write a set of instructions for twilio
00:25:28.240
that will tell it what i want to do once i try to place a call here
00:25:34.159
and the way it works is that twilio makes an http request to my server and so then my server is going to send
00:25:40.480
back a response and that response is going to be in xml
00:25:46.720
and so my response is going to tell twilio to dial
00:25:55.200
a number
00:26:01.760
like so now i need two numbers to make a phone call
00:26:06.880
i need a from number and twilio won't let you just put any number on your caller id uh for you know
00:26:13.120
obvious reasons um but so this has to be a number that either you bought through twitter you
00:26:18.400
can buy phone numbers on twilio for about a dollar no for actually exactly a dollar or you can register say it like your own
00:26:25.279
phone you verify you know how they can do two factor off they'll send you a code and you say hey actually verify
00:26:30.320
that you do own that number and then you can send uh calls from that so i'll do that i'm gonna use my
00:26:36.720
mobile number as the from here let me drop some
00:26:44.799
all right and then the two number i'm going to i have my form set up so twilio's going to or my client's going
00:26:50.960
to take that that number that i punched in the form is going to send it to twilio and then twilio is going to send that number back to this endpoint here
00:26:57.440
when it makes that http request so that number is going to come through in the params
00:27:04.640
like that and i need ruby to actually interpret that
00:27:11.360
all right so there we go so that's my instructions i have five lines of instructions to twilio
00:27:17.440
of how to actually make a call so they send me an http request i send them a response it says hey dial from this
00:27:23.520
number to this other number all right so reload that we'll pull open the soft
00:27:29.120
phone and i am going to call
00:27:35.520
once my loading pigeons here strangers there you go i'm actually calling my wife's phone
00:27:42.000
because she was kind of not telling me for the purposes of this uh this presentation so watch what
00:27:47.440
happens when i call here i get a little uh a little warning from chrome up here
00:27:52.480
just a permission thing chrome is asking me do you want to let this application use your microphone this is a
00:27:59.120
native chrome dialogue all right so prior to webrtc
00:28:04.720
this would be a flash app asking you this so can you all hear me sorry uh so this
00:28:10.880
would be a flash app actually this now like i said earlier if somebody were to come to this app that i built on a non webrtc enabled browser twilio
00:28:18.480
would figure that out and then we would serve up the the flash app so you can just build it once here and we'll take care of all the interoperability i think
00:28:25.279
that's how you pronounce that but yes i do want twilio to or i do want chrome to use
00:28:30.480
this so so there we go now we're dialing the phone
00:28:38.159
and i'm going to answer and now and now i can speak
00:28:57.760
i was doing this earlier earlier i'm destroying running all right
00:29:04.159
all right so decide you can make a browser call a phone
00:29:13.919
um like i said that's super simple and thank you for the applause i love when that goes well
00:29:20.640
like i said i've only been doing this for two months so live coding is a little bit scary for me but uh but it's pretty awesome that it's that
00:29:26.559
easy to do uh so that was a super small app built in sinatra there's a whole lot of cool
00:29:31.919
stuff you can do with twilio so besides just making that first call so you can do things like transcribing the call you
00:29:37.919
can do things like dropping 40 people or 100 people into a conference call you can do things like recording the
00:29:43.919
call you can build an entire call center using numbers that you bought for a
00:29:48.960
dollar on twilio and this is an app called zest zest phone which was built by a company out
00:29:55.360
in california they are a finance company that uses big data
00:30:00.640
in order to um in order to make better loans i guess and they built
00:30:07.279
this whole call center they're dealing with tons of phone calls and they open source the entire thing and it's all on rails so if you want to study a really
00:30:13.200
cool code base in rails about how you do some more advanced functionality on twilio um doing things
00:30:19.520
like placing people on hold or you know like the the supervisor might be listening in on mute uh sort of stuff you can do all
00:30:26.240
that using this package so go google that zest phone um it's super super cool and and you can drop this functionality
00:30:33.120
into just about any app that you would be working on so it's just add-on functionality so if you ever have an app you need to call people or you need to
00:30:39.600
receive calls or you need that uh you want to build a soft phone so you can have two browsers communicate with each
00:30:46.320
other so let's say that you built a multi-player game and you wanted everybody who was in there to talk to one another you can do
00:30:52.640
that using the twilio client as well um so that's it you know that the
00:30:59.039
like i said we're super super excited about this we're super excited about webrtc and but more broadly speaking
00:31:04.159
we're so excited about the way in which software is now enabling people like us like people who know absolutely nothing
00:31:10.399
about telephony equipment it used to be that if you wanted to build a call center then you had to
00:31:15.679
spend a hundred thousand dollars minimum well actually the first thing you probably need to do is hire a lawyer and
00:31:21.200
you need to negotiate contracts with the major carriers so that you can use their their equipment and their lines and um
00:31:27.120
you'd be locked in for a long time they need to spend hundreds of thousand dollars on equipment and fill up a closet full of that
00:31:32.880
um and now like you need a free twilio account
00:31:39.360
it's pretty crazy um and for for literally like instead of hundreds of
00:31:44.399
thousands of dollars for dollars uh you could build a call center um you can take this twilio client and you can buy
00:31:50.880
a 200 chromebook and and you know put a mic on it and give it to
00:31:56.080
a person in a call center instead of having to buy all the expensive telephony equipment we've always needed before so um
00:32:02.880
yeah we are so excited antonio about the way in which um the way in which software is allowing us
00:32:09.200
to make a huge impact on the world by just making it easier to communicate we fundamentally believe that the more we
00:32:15.120
communicate as a society the better our society begins so i just like to encourage you to go play around with us
00:32:20.320
webrtc or others with twilio client go use the tools use the skill set that you have to go change the world thank you
00:32:26.240
very much
00:32:51.440
you