twiliocon 2013 - communications without boundaries

31
#TWILIOCON Communications without Boundaries - Preparing your App for Global Use ANDREW JORDAN, SALES ENGINEER, @ TWILIO

Upload: andrew-jordan

Post on 28-Nov-2014

289 views

Category:

Technology


2 download

DESCRIPTION

Guidance for deploying Twilio applications outside of the US and Canada. This deck covers Global Low Latency, Unicode, E164 formatting, and reducing fraud risk.

TRANSCRIPT

Page 1: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Communications without Boundaries - Preparing your App for Global Use

ANDREW JORDAN, SALES ENGINEER, @ TWILIO

Page 2: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Hi. I’m Andrew Jordan.I’m a Sales Engineer at Twilio.

My Twitter handle is @andrewkirk

Page 3: TwilioCon 2013 - Communications Without Boundaries
Page 4: TwilioCon 2013 - Communications Without Boundaries
Page 5: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Going Global. Avoiding Common Pitfalls.Four common issues my team encounters & how to avoid them.

1. Optimizing Call Latency

2. Delivering Unicode encoded SMS

3. Formatting Phone Numbers

4. Preventing Telecom Fraud

Page 6: TwilioCon 2013 - Communications Without Boundaries

GLOBAL LOW LATENCY

Page 7: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Global Low Latency

Oregon

Virginia

Sao Paulo

Dublin

Tokyo

Singapore

Page 8: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Global Low Latency

Virginia

Page 9: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Global Low Latency

Virginia

Page 10: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Global Low Latency

Dublin

Page 11: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Implementing GLL

PSTN <Dial> PSTN REST

PSTN <Record> <Client>

<Conference>

2012 2013

Page 12: TwilioCon 2013 - Communications Without Boundaries

CHARACTER ENCODING

Page 13: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Character Encoding: GSM

GSM is the standard encoding for SMS. Using GSM,

you can send up to 160 characters per message.

Basic Character Set.

(7 Bits, 128 Characters)

Page 14: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Character Encoding: UCS-2

Much larger than GSM. Covers 110,000 characters

(each character is 16-bit). Maximum SMS sizes

drops to 70 characters.

Page 15: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Unicode + Twilio.We’ve got your back.

out how to encode your message for delivery.

All our client libraries do this by default.

Send us a UTF-8 encoded request and we’ll !gure

Page 16: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Character Encoding: Common Pitfalls

MAXIMUM

CHARACTERS

If all your characters are GSM, you’ll have 160 maximum

characters per message - otherwise you only get 70.

DATABASE

STORAGE

Make sure your database connections speak UTF-8. If

you’re using MySQL, make sure your columns are stored

in utf8mb4 if you want emoji or other 4 byte characters.

HTTP

PARAMETERS

Make sure your language / framework interprets percent

escaped HTTP parameters as UTF-8, not Latin-1.

Page 17: TwilioCon 2013 - Communications Without Boundaries

NUMBER FORMATTING

Page 18: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Number Formatting: E.164

The E.164 speci!cation is awesome for machines, but

not people. We don’t really use it in our day-to-day lives,

so it’s dif!cult for us to understand.

Ex. 0844 809 0200 vs. +44 844 809 0200

Page 19: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Design your interfaces to help your users

Page 20: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Page 21: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Page 22: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Page 23: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Libphonenumber

Page 24: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

• It’s great for number formatting but also will do the following:

•Parse phone numbers

•Tell you if they’re valid or even possible

•Geocode numbers and tell you their locale in various languages

•Bindings for Java, JS, C#, Obj-C, Python, Ruby, and PHP

Libphonenumber

Page 25: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Oppa Demo Time.

Page 26: TwilioCon 2013 - Communications Without Boundaries

FRAUD

Page 27: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Telecom Fraud: Traffic Pumping.

1. BUY NUMBERS Attackers buy telephone numbers (or blocks of them).

Typically these have a high per-minute charge.

2. DRIVE TRAFFIC Attackers then drive as much traf!c as possible to the

numbers.

3. PROFIT Carriers that receive calls are paid by the carrier where

the call terminates. Typically, attackers are associated

with (or are) carriers.

Page 28: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Telecom Fraud: Protecting Yourself

You have to be proactive to protect yourself from Telecom

Fraud. Make sure you setup sanity checks & limits.

Don’t allow unauthenticated users to make an unlimited

number of phone calls, and charge users in real time, not

after the fact.

Page 29: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Telecom Fraud: Twilio’s Anti-Fraud Measures

Twilio works hard to prevent fraud before it happens. We

use algorithms to detect suspicious behavior and maintain

internal blacklists of known bad or risky routes.

You can also setup International Permissions let

you whitelist places where you do business.

Usage triggers allow you to setup alerts.

Page 30: TwilioCon 2013 - Communications Without Boundaries

#TWILIOCON

Conclusion. Try these at home!

• Use GLL resources to reduce call latency.

• Encode your requests in UTF-8. We’ll pick the right the encoding.

• Encourage correct Phone Number input & validate with libphonenumber.

• Be aware of Telecom Fraud & protect yourself with Twilio’s tools.

Page 31: TwilioCon 2013 - Communications Without Boundaries

QUESTIONS?