How to Integrate Text
and Phone Messaging
with Your Website
by Cindy Cullen
cindycullen.com
Programming since 1983
Building websites since 1999
Freelance web developer since 2003
Cel...
Messages
MyOutdoorCalendar.com
Images courtesy of vectorolie / FreeDigitalPhotos.net
We tried…
“We need phone calls and text messages”
Email Mobile Apps
Image courtesy of zirconicusso /
FreeDigitalPhotos.net
Short Codes
O Five digit number
O About $1000+/month
O Long application approval process
Shared Short Codes
O Buy Keyword(s) – about $25/month
O Phone numbers – about $3/month
O Voice – about $0.05/minute
O Text...
Images courtesy of vectorolie / FreeDigitalPhotos.net
BowlingGreenMassage.com
Mass Text
Database of phone numbers
Opening today at 3pm
Openingtodayat3pm
Web Meets Messaging with
10 digit phone numbers
O Twilio
O Tropo
O Plivo
O Nexmo
How it Works
O Buy Phone Number (or short code)
O Receive messages on my website
O Call or Text that number
O Twilio/Tropo...
Pricing
O Phone Numbers
O $0.80/month - $3/month (Avg. $1/month)
O Voice
O Inbound $0.0050/min – $0.03/min (Avg.
$0.01/min...
My Pick
Twilio
O Average pricing
O Great documentation
O Great tutorials
O Subaccounts
O Analytics
O Developer tools
O Triggers
O ...
Mass Text
Database of phone numbers
Opening today at 3pm
Openingtodayat3pm
Sent to My Script
require "Services/Twilio.php";
$AccountSid = “Bxxxxxxx”;
$AuthToken = “2xxxxxxxx";
$client = new Services_Twilio($AccountS...
Respond to Text
<?php
header(“content-type: text/xml”);
echo “<?xml version=”1.0” encoding=”UTF-8”
?>n”;
?>
<Response>
<Me...
CloneMeServices.com
Dial 1 for
emergency
Dial 2 to leave a message
Image courtesy of Stuart Miles /FreeDigitalPhotos.net
When the number is called…
<?php date_default_timezone_set('America/Chicago');
header("content-type: text/xml");
echo "<?x...
User presses number…
<?php // if the caller pressed anything but 1 or 2 send them back
if($_REQUEST['Digits'] != '1' and $...
After the recording…
<?php
header("content-type: text/xml");
echo "<?xml version="1.0" encoding="UTF-8"?>n";
?>
<Response>...
Image courtesy of zirconicusso /
FreeDigitalPhotos.net
Applications
O Appointment Reminders
O Call Queue’s – matching callers and
agents
O Call Screening – find a live body to
a...
More Applications
O Conference Calls
O Phone Polls
O Voice Broadcast
O Voicemail
O Voice Transcription
O Audio Recording f...
And More!
O Group Chat
O Text to Speech
O SMS notifications
O SMS from a call
O MMS (some may support – only on short
code...
Who Will Want This?
O Doctors
O Dentists
O Hair and Nail Salons
O Massage Therapists
O Other Professional Services
O Marke...
Who Can Use this?
O Schools
O Clubs and Groups
O Churches
O Political Groups
O Fitness Centers & Sports Clubs
O Anybody!
Upcoming SlideShare
Loading in …5
×

How to Integrate Text and Phone Messaging with your Website

1,065 views

Published on

Sending and Receiving text and phone messages on my website.

Published in: Internet
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,065
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Web developer, cell phone user, teacher.
  • We have email, phone, text messages, phone apps. It’s time that we integrate all of them and make them work for us.
  • My story – started MOC: Booking tool for Hunting and Fishing guides. Guides needed to confirm or deny trips from the field. They needed a way to send and receive text messages to and from the website.
  • The standard ways to communicate weren’t going to work for hunting and fishing guides very well.
  • Learning how to make MOC work gave me lots of other ideas about hooking phones and text messaging
  • Wanted to send text messages to clients when she had cancellations or openings for the day. Also to send out specials.
  • Learning how to make MOC work gave me lots of other ideas about hooking phones and text messaging
  • How to Integrate Text and Phone Messaging with your Website

    1. 1. How to Integrate Text and Phone Messaging with Your Website
    2. 2. by Cindy Cullen cindycullen.com Programming since 1983 Building websites since 1999 Freelance web developer since 2003 Cell phone user since they were too big to carry Taught Computers to children and adults – Online, Homeschool co-ops, Elementary School, Junior High, High School, College, Seminars
    3. 3. Messages
    4. 4. MyOutdoorCalendar.com
    5. 5. Images courtesy of vectorolie / FreeDigitalPhotos.net
    6. 6. We tried… “We need phone calls and text messages” Email Mobile Apps
    7. 7. Image courtesy of zirconicusso / FreeDigitalPhotos.net
    8. 8. Short Codes O Five digit number O About $1000+/month O Long application approval process
    9. 9. Shared Short Codes O Buy Keyword(s) – about $25/month O Phone numbers – about $3/month O Voice – about $0.05/minute O Text - about $0.05/minute O Bulk Monthly plans usually available
    10. 10. Images courtesy of vectorolie / FreeDigitalPhotos.net
    11. 11. BowlingGreenMassage.com
    12. 12. Mass Text Database of phone numbers Opening today at 3pm Openingtodayat3pm
    13. 13. Web Meets Messaging with 10 digit phone numbers O Twilio O Tropo O Plivo O Nexmo
    14. 14. How it Works O Buy Phone Number (or short code) O Receive messages on my website O Call or Text that number O Twilio/Tropo/Plivo/Nexmo sends the message to my URL O My website processes the message and responds (usually with XML) O Send messages from my website O My website sends instructions to that number using a provided library and API
    15. 15. Pricing O Phone Numbers O $0.80/month - $3/month (Avg. $1/month) O Voice O Inbound $0.0050/min – $0.03/min (Avg. $0.01/min) O Outbound $0.0130/min – $0.03/min (Avg. $0.02/min) O SMS O Inbound Free – $0.01/msg (Avg $0.0075/msg) O Outbound $0.0065/msg - $0.01/msg (Avg. $0.0075/msg)
    16. 16. My Pick
    17. 17. Twilio O Average pricing O Great documentation O Great tutorials O Subaccounts O Analytics O Developer tools O Triggers O Easiest to get up and running for ME
    18. 18. Mass Text Database of phone numbers Opening today at 3pm Openingtodayat3pm
    19. 19. Sent to My Script
    20. 20. require "Services/Twilio.php"; $AccountSid = “Bxxxxxxx”; $AuthToken = “2xxxxxxxx"; $client = new Services_Twilio($AccountSid, $AuthToken); $twilio_number = “615-555-0123”; If ($_POST[‘From’] == $twilio_number) { $body =; $users = get_users('meta_key=phone'); $special_chars = array("-","(",")"); foreach ($users as $user) { $phone = '+1'.str_replace($special_chars,"",get_user_meta($user->ID, 'phone', true)); $numbers[] = $phone; } foreach ($numbers as $number) { $sms = $client->account->messages->sendMessage($twilio_number, $number, $_POST[‘Body’]); } } else { // Process user message }
    21. 21. Respond to Text <?php header(“content-type: text/xml”); echo “<?xml version=”1.0” encoding=”UTF-8” ?>n”; ?> <Response> <Message>Thanks <?php echo $name ?> for your response.</Message> </Response>
    22. 22. CloneMeServices.com Dial 1 for emergency Dial 2 to leave a message Image courtesy of Stuart Miles /FreeDigitalPhotos.net
    23. 23. When the number is called… <?php date_default_timezone_set('America/Chicago'); header("content-type: text/xml"); echo "<?xml version="1.0" encoding="UTF-8"?>n"; if (date("H") > '20') : // time later than 9PM? ?> <Response> <Gather action="/user-input" numDigits="1"> <Say>Welcome to Clone Me Services.</Say> <Say>If this is an emergency please press 1</Say> <Say>Otherwise, please press2</Say> </Gather> <Say>Sorry, I didn't get your response.</Say> <Redirect>/phone</Redirect> </Response> <?php else: ?> // time before 9PM, just forward <Response> <Dial>+12707916649</Dial> </Response> <?php endif; ?>
    24. 24. User presses number… <?php // if the caller pressed anything but 1 or 2 send them back if($_REQUEST['Digits'] != '1' and $_REQUEST['Digits'] != '2') { header("Location: /phone"); die; } // otherwise, if 1 was pressed we Dial CloneMeServices. If 2 we make an audio recording up to 30 seconds long. header("content-type: text/xml"); echo "<?xml version="1.0" encoding="UTF-8"?>n”; ?> <Response> <?php if ($_REQUEST['Digits'] == '1') { ?> <Dial>+16155551111</Dial> <Say>The call failed or the remote party hung up. Goodbye.</Say> <?php } elseif ($_REQUEST['Digits'] == '2') { ?> <Say>Record your message after the tone.</Say> <Record maxLength="30" action="/after-recording" /> <?php } ?> </Response>
    25. 25. After the recording… <?php header("content-type: text/xml"); echo "<?xml version="1.0" encoding="UTF-8"?>n"; ?> <Response> <Say>Thanks for your message. Goodbye.</Say> </Response>
    26. 26. Image courtesy of zirconicusso / FreeDigitalPhotos.net
    27. 27. Applications O Appointment Reminders O Call Queue’s – matching callers and agents O Call Screening – find a live body to answer O Call Metrics O Click to Call – button on website (calls to or from browsers or mobile devices $0.0025/min) O Automated Phone System
    28. 28. More Applications O Conference Calls O Phone Polls O Voice Broadcast O Voicemail O Voice Transcription O Audio Recording from your Website O Browser Phone O Browser to Browser Calls
    29. 29. And More! O Group Chat O Text to Speech O SMS notifications O SMS from a call O MMS (some may support – only on short codes with twilio)
    30. 30. Who Will Want This? O Doctors O Dentists O Hair and Nail Salons O Massage Therapists O Other Professional Services O Marketers (careful with bulk messaging!) O Dry Cleaners O Restaurants
    31. 31. Who Can Use this? O Schools O Clubs and Groups O Churches O Political Groups O Fitness Centers & Sports Clubs O Anybody!

    ×