28 Dec 2009, 5:46pm
Code
by Danielle Morrill

View Comments

Stuff I Built: Simple International Calling Card with Twilio

Reposted from the Twilio Company Blog

When I came downstairs this morning I was greeted by two bubbly and very sleep deprived Australians eager for some tea, and a chance to call Mum.  My first thought – there’s a Twilio app for that (or there will be soon)!

Being in the Christmas sprint, I decided I’d quickly code up an application that would make it easy for them to call a U.S. number from the landline at our house or any local phone, and be forwarded to their mom’s, boyfriends, and other folks through a simple menu.  20 minutes later, we made our first call!

Setting Up the International “Calling Card”

Twilio doesn’t provide international phone numbers, but you can set up a U.S. number and have it forward to an international destination using the <Dial> verb.  You don’t even need to use the REST API to make the outbound calls, its so simple!

Files to create:

  • * Handler for the incoming call, to greet the caller and read the menu, gather the menu selection keypress
  • * PHP handler for taking the keypress and directing the application to the right file to dial the number
  • * Files for each of the phone menu options, going to the different numbers to call

Setting up incoming-call.php

This first file is the one that I pointed the Twilio phone number to, to handle incoming calls.  It greets the caller and reads them a menu of people to call, and asks them to press a number to start.

It looks something like this:

<?php
 header("content-type: text/xml");
 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>

<Response>

<Gather numDigits="1" action="make-call.php" method="POST">

 <Say voice="woman">Hey girls, ready to call someone? If you know your s\
election, you may make it at any time.</Say>
 <Say>Press 1 to Call Laurens Mom</Say>
 <Say>Press 2 to Call Jace</Say>
 <Say>Press 3 to Call Eleesa's Home</Say>
 <Say>Press 4 to Call Duh lane ah's Cell Phone</Say>
 <Say>To get help, Press 5 to Call Danielle</Say>

</Gather>

<Say voice="woman">Thanks for using this Twil ee oh app, created by Danielle. \
Happy holidays!</Say>

</Response>

Setting up make-call.php

After the caller has pressed as key, the application posts the results to make-call.php, so we need to create a php file that understands what to do next with that information, and route the call.

<?php 
 
        if($_REQUEST['Digits'] == '1') { 
                header("Location: call-laurens-mom.php");
                die;
        }

        if($_REQUEST['Digits'] == '2') {
                header("Location: call-jace.php");
                die;
        }

        if($_REQUEST['Digits'] == '3') {
                header("Location: call-elisas-home.php");
                die;
        }

        if($_REQUEST['Digits'] == '4') {
                header("Location: call-dlaina-cell.php");
                die;
        }

        if($_REQUEST['Digits'] == '5') {
                header("Location: call-danielle.php");
                die;
        }

        header("content-type: text/xml");
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";

?>

Setting up TwiML to Connect the Call

As you can see in the previous php script make-call.php, each selection directed the application to a different file.  This file is a very simple piece of TwiML that uses the <Dial> verb to connect the call.  Each one is pretty much the same, and looks like this:

<?php
        header("content-type: text/xml");
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>

<Response>

<Say>Connecting you to Danielle, for help with this application..</Say>

<Dial>4256987497</Dial>

</Response>

It’s Not Pre-paid, It’s Pay-As-You-Go

The best part about this for Elisa and Lauren is that it isn’t a prepaid card where they spend $50 and and are stuck with the card, even if they don’t use it up.  I’m billing them for exactly the amount they use, and they don’t have to pay for it until after the fact.  I can imagine turning custom pay-as-you-go calling cards into a really interesting business.

So there you have it.  If you have any international guests in your home this holiday season, or are interested in going into the calling card business, this might be a good place to start.  The app took less than 20 minutes to write, mostly because we were goofing around with the text to speech quite a bit, and is written with PHP.

You do need an upgraded Twilio account to get a phone number and make international calls, so maybe some Twilio minutes would be a good thing to ask Santa to bring you.  Happy holidays!

24 Dec 2009, 9:53pm
Parties Video
by Danielle Morrill

View Comments

Get Out the Cameras, It’s Christmas With the Clarks

If you have been reading my blog for awhile, then you know by now that I have my family well trained to expect a video camera on them at any time.  Last Christmas we were snowbound at my parent’s house, which lead to some real gems.  This year, we only get to spend a couple days with them before driving South to San Francisco.  Here are some of the videos from last year, and I look forward to sharing what we come up with this year in a coming post.

Christmas Morning 2009

Christmas Morning 2008 from danielle morrill on Vimeo.

Preparing Christmas Dinner with Mom

My Mom is a Total Martha from danielle morrill on Vimeo.

My Goals for 2009

I am going to need to follow this with some goals for 2010 – I’ve got my thinking cap on.

My Goals for 2009 from danielle morrill on Vimeo.

21 Dec 2009, 1:32pm
Daily Life
by Danielle Morrill

View Comments

The Great SF Apartment Hunt Begins

While not quite as epic as searching for an apartment in Manhattan, this is the first time in 3 years that I’ve been looking for a place to rent and this time it is in a city that I don’t know all that well. I’ve been reading up on neighborhoods, asking everyone’s opinion, driving around when I get a chance – all hoping to figure out the answer to the elusive question, “where do I want to live?”

It took me a couple tries to get my location right while I was a renter in Seattle, so it would be nice not to go through the trial and error process again. I’ve been renting a room in a friend’s apartment in Potrero Hill for about six months now, but somehow renting a room just isn’t the same as having my own place. Fortunately, it also means that I’m not in a huge rush to find something – more focused on getting it right. I am driving my car down to San Francisco from Seattle early next week, so I need to find a place with parking (willing to pay extra). I’m debating a couple things:

  • studio vs. 1 bedroom
  • month-to-month or short-term lease vs. 1 year commitment
  • does being walking distance to work matter?
  • laundry in the unit?
  • secure garage?
  • could I survive without a dishwasher

To Rent or To Swap?

We have a house in Kirkland and a condo in Seattle, so if we’re able to find someone willing to swap with us that might be a viable (and money-saving) option.

19 Dec 2009, 4:27pm
Travel
by Danielle Morrill

View Comments

Pictures from Our Tour of the Louvre

Using Whrrl for what it does best – sharing pictures with a narrative.  Enjoy!

More stories at Musee du Louvre
Powered by Whrrl

14 Dec 2009, 7:03am
Posts
by Danielle Morrill

View Comments

Why I Won’t Touch LBS with a Ten Foot Pole

Pitch any VC and you’ll find certain markets, uses cases, and other oddities that have left a bad taste in their month.  No matter how interesting your product, or how much traction you have, they’re just not going to go there.  This can be frustrating and make you feel like they are being ignorant or bull headed.  I even though so, until I recently realized that I get annoyed by every single location based services idea I hear – mostly as a result of having worked on Whrrl.  People will tell me “the opportunity is huge” and all I can do is smile slightly, thinking that I know better but there is a no way they will understand, when I ask, “Really, why?”

And why is the location based services opportunity huge, exactly?  Is it really an untapped need people have to get information about the world around them on the go.  While this might seem cool to a very small niche of geeks, is this anywhere near making it to the mainstream world?  I used to think so, and to believe that it was simple a problem people didn’t realize they had.  At a time, it was my job to evangelize a product that would help people to capture their experiences and share their location with friend.  Fundamentally, doing this is all about collecting “footstreaming” data on the company’s end so that they can slice and dice users in a different way, and sell advertisers on segments like “visits urban bar 2+ nights per week” or “goes to McDonald’s more than 3 times per month”, etc… you get the idea.

People Will Balk When Location Data is Used for Advertisements

Right now people are having fun using location data to share their location with friends on Foursquare, but the minute I begin to receive advertisements on Foursquare (or Twitter/Facebook where I am publishing my location) I am going to feel like my privacy has been invaded, and I am going to stop sharing.  Nevermind that the information is already public and that I’m already explicitly putting it out there for the world to read – right now only humans are answering back (if at all).  Getting advertisements related to my checkins would be the equivalent of interaction with bot Twitter users – lame!

Possible Location Based Network of Choice: Facebook

As I wrote in early November, Facebook seems like the best option for a successful location based network because it already has the critical mass of friends who I actually know and trust in real life AND the granular privacy settings that LBS users on every product have been clamoring for from day one.  A few weeks after my post, Jason Kincaid echoed my sentiment in his post “Watch Out Foursquare, Facebook is Poised to Dominate Geo”.

Facebook Privacy Management Isn’t Great

I have to wonder if anyone even remembers the debacle with Beacon?  It seems to me they’ve been aware of and actively working on LBS capabilities for the social network, along with advertising, for some time now and have probably been waiting for that mess to blow over (P.S. Looks like Facebook settled the Beacon thing for a cool $9.5 Million dollars).  To read more on this visit: http://www.beaconclasssettlement.com/

What About Whrrl, Loopt, Brightkite and the Rest?

MG Siegler, who has been covering LBS for a long time and even wrote about the launch of the Whrrl iPhone app (thanks MG!), posted “Location’s Social Paradox” today on TechCrunch, and opened with the statement:

“There’s an absolute eruption of activity around location-based services right now.”

It’s funny, it seems like each year is going to finally be the reckoning for social uses of devices with GPS. With each year comes a new crop of products, applications, companies, and avid users looking to take their products mainstream.  Last year it was Brightkite, a year before that you might saw it was Loopt or Whrrl.  Before that we had Dodgeball, Jaiku, and a slew of others.

For various reasons, these products have had less penetration into the early adopter market than Foursquare.  Of course, there is a bit of an echo chamber when it comes to faddish apps in the Bay Area – but if crossing the chasm is the name of the game for LBS then making a fad and turning it into a trend might just be what Foursquare can accomplish that the others have not.

So, Why Not Touch LBS?

Other than crappy past experience, I’m just not sure the market is as big as I originally believed it was.  I think sharing location is useful with a very small number of people who actually care about where I am, and even then it might be more efficient for me to ask for or tell them location explicitly on a case-by-case basis (over chat, IM, phone, etc.) than to passively send the information out to followers on a network. And that’s just an issue of finding a use case for sharing location. Monetizing it as a business is an entirely different issue, because while I might share my location with friends as a feature of a product I am loathe to consider sharing it with a company looking to leverage my information for advertising dollars.

This begs a deeper question, which is ‘what is the future of advertising’?  At one time, contextual information such as location was considered useful for providing more deeply relevant ads, but is this still realistic or meaningful today.  While a curiousity, it is still to be seen if these more timely and location-relevant ads would actually create more *action* against offers, like visiting a restaurant or cashing in on a special (coupon).  For now, I think this remains a feature – not a product, and it is why Facebook is still best positioned to experiment.  Maybe they will acquire a product with a network and significant traction (such as Foursquare) to nudge things along.