How the Star Wars hotline was created
June 29th, 2010 by Adam KalseyIn 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:
