How the Star Wars hotline was created

June 29th, 2010 by Adam Kalsey

In yesterday’s Star Wars hotline post we resurrected the old Empire Strikes Back fan hotline using the recently rediscovered teaser recordings from starwars.com. The post on startwars.com about the old hotline says

This was before the telephone system was completely computerized. Back then, there was a lot of mechanical switching equipment. The first week the system went live, so many people called the number, AT&T couldn’t handle it. They were so overloaded, the system couldn’t even handle generating busy signals to all of the calls. The 800 system for Illinois crashed and shut down for several hours. AT&T insisted that we add additional phone lines.

When we started the company 10 years ago, we started out with a problem statement that we then set out to solve. That problem? “Computer telephony sucks.”

The telephony world has come a long way since the days of the original Empire hotline. Instead of roomfuls of switching equipment, all we needed to build the Empire hotline was 5 lines of PHP code.

<?php
$urls = array('http://www.starwars.com/media/audio/empire1_c3po.mp3', 'http://www.starwars.com/media/audio/empire1_han.mp3', 'http://www.starwars.com/media/audio/empire1_leia.mp3', 'http://www.starwars.com/media/audio/empire1_luke.mp3', 'http://www.starwars.com/media/audio/empire1_vader.mp3');
$key = array_rand($urls,1);
answer();
say($urls[$key] . ' Call back for another message. There are five in all.');
hangup();
?>

The app uses the MP3 recordings stored on starwars.com. If you use an audio URL in your Tropo Say statement, we’ll play it. So the code takes the five urls of the different recordings, selects a random one, then answers the phone and plays the recording. Then it lets you know that you can call back for more messages and hangs up.

That’s a lot simpler than a roomful of switching equipment. And since we work with the carriers, if one of them can’t handle the call volume, we’ll route around them. And you don’t need to add any phone lines. We’ll scale to handle as many calls as you need.

Related posts:

  1. Star Wars Empire Strikes Back hotline on Tropo
  2. Call the Empire Strikes Back hotline on Star Wars Day
  3. Customer Service Hotline
  4. Fallback to text to speech if your audio fails

Tags: , , ,

Leave a Reply

Please note: By submitting a comment you agree to comply with our Comment Policy. We welcome all comments, positive or negative, but do reserve the right to remove all or part of blog comments that do not comply with our policy.

Additionally, the first time you leave a comment on this blog, it will be held for moderation. After that first comment has been approved, future comments will be posted without delay.

Additional comments powered by BackType