15
Twilio Lightning Talk Twilio Infrastructure APIs for building voice and text messaging apps Michael Peacock

Supermondays twilio

Embed Size (px)

Citation preview

Page 1: Supermondays twilio

Twilio Lightning Talk

TwilioInfrastructure APIs for building voice and text messaging apps

Michael Peacock

Page 2: Supermondays twilio

Twilio Lightning Talk

Collection of “Infrastructure APIs” supporting:

• Make and receive phone calls• Send and receive text messages• Buy phone numbers• Record caller messages• Conference calls• IVR: Interactive Voice Response• DTMF: Gathering number presses• Text to speech

Via the web

Page 3: Supermondays twilio

Twilio Lightning Talk

How does it work?

• Create an account• Buy a phone number ($1/month)• Write the code, hosted on your server• Link the application to the phone number

• When someone calls the number, twilio hooks into your application which tells it what to do

Page 4: Supermondays twilio

Twilio Lightning Talk

Writing an application

Its all XML

<?xml version="1.0" encoding="UTF-8"?><Response>

<Gather numDigits="4" action=“verify.php">

<Say>

This is the ACME telephone verification service. To verify

your telephone number, please enter the four digit code shown

on your screen now.

</Say>

</Gather></Response>

Page 5: Supermondays twilio

Twilio Lightning Talk

Writing an application

• <Say> something• <Play> a file• <Gather> digits the caller presses• <Dial> a number to transfer/conference

the caller• Send an <Sms>• <Record> what the caller is saying

Page 6: Supermondays twilio

Twilio Lightning Talk

Writing an application

Many of the libraries support generating “TwiML” programatically. E.g.

Page 7: Supermondays twilio

Twilio Lightning Talk

Application flow

At each stage during the call, you define a URL for twilio to redirect to.

This allows you to verify details, or act upon a specific request.

Page 8: Supermondays twilio

Twilio Lightning Talk

Make a call

You don’t have to wait for someone to phone you. There is a REST API which allows you to:

– Initiate a call from your application

– Send an SMS

– Buy a phone number

Page 9: Supermondays twilio

Twilio Lightning Talk

Use cases

• Verify a customers phone number

– https://github.com/mkpeacock/Phone-Number-Verificati

on

• Telephone access to your application

– Let customers check the status of their orders

• Lead generation

– Use a number per lead source and track your marketing

efforts

– A / B testing on your website (auto-provision a number)

• Request a call back form

Page 10: Supermondays twilio

Twilio Lightning Talk

Costs (its really cheap!)

• Phone numbers: $1/month

– Inbound calls: 1c/minute

– Outbound calls: 2c/minute (landlines)

– Outbound calls: 14c/minute (mobiles)

• Freephone numbers: $2/month

– Inbound calls: 6c/minute

Page 11: Supermondays twilio

Twilio Lightning Talk

Don’t want to host the code?

For pre-defined basic applications (twimlets) which don’t require continuous back and forth between the user and the server, Twilio can host your code.

Page 12: Supermondays twilio

Twilio Lightning Talk

Twimlets

• Call forwarding• Ring upto 5 numbers until one of them

answers• Voicemail• Simple menu• Simple message: plays predefined text

and audio• Conference calls

Page 13: Supermondays twilio

Twilio Lightning Talk

Connect

Twilio connect lets you build and sell twilio powered applications which then connect to another users twilio account.

This lets you sell the application, but lets the buyer pay for their own usage directly.

Page 14: Supermondays twilio

Twilio Lightning Talk

Please turn on your phone

Want to see a live demo?

Call 0191 580 1814 and rate this evenings talks.

Page 15: Supermondays twilio

Twilio Lightning Talk

Any questions?

www.michaelpeacock.co.uk

www.twitter.com/michaelpeacock