Introducing The Idolizer: Free Asterisk AutoDialer for American Idol® Addicts

After a fun day of packing boxes for the Big Move, there's nothing quite as mind numbing as an hour of the FOX TV® network's American Idol® and 50 of your favorite commercials. The Little Mrs. doesn't mind the one hour break in production. It's the two additional hours voting for Kelly Pickler that drives her up the wall. She really can sang. Honest, honey! Enter, The Idolizer. Today's Asterisk® project is for those that have better things to do than dialing a tollfree number for two hours every Tuesday evening. And, no, the show's producers don't like autodialers. Too damn bad! We don't like commercials (especially ten at a time), but they're still showing those. Here's the deal. Cut out the commercials, and we'll turn off our autodialer. And I'll bet DialIdol.com will, too. And, no, we're not affiliated with the Fair and Balanced® network nor the American Idol® show. We just don't wanna waste two hours dialing the same phone number over and over ... when we could be packing boxes and making the Little Mrs. happy.

Prerequisites. To use The Idolizer autodialer with Asterisk, you'll need a free Asterisk@Home PBX or at least a copy of the VMware version of Asterisk@Home that runs in a Window on your Windows XP desktop. This works on versions of Asterisk@Home at least as far back as 1.5. Our tutorials will get you up and running in under an hour. Then you'll need an account with a hosting provider that gives you free calls to toll-free numbers or unlimited outbound calling in the U.S.

Installation. Using the Asterisk Management Portal (AMP) or freePBX, choose Maintenance->Config Edit->extensions_custom.conf and add the following custom context to the bottom of the file:

[custom-idolizer]
exten => s,1,SetGlobalVar(COUNTER=1)
exten => s,2,Answer
exten => s,3,Wait(2)
exten => s,4,Dial(sip/8664365701@telasip-gw|18|L(10000:2000:5000)) ; 18 for TelaSIP, 22 for FWD
;exten => s,4,Dial(iax2/*18664365701@fwd|22|L(10000:2000:5000)) ; 18 for TelaSIP, 22 for FWD
exten => s,5,Goto(h,1)
exten => s,105,NoOp(BUSY)
exten => s,106,Goto(h,1)
exten => h,1,SetGlobalVar(COUNTER=$[${COUNTER} + 1])
exten => h,2,NoOp(Counter: ${COUNTER})
exten => h,3,Wait(6)
exten => h,4,GotoIf($["${COUNTER}" < "999"]?s,2)
exten => h,5,Hangup

Once you know the phone number of the contestant you wish to vote for, make the following adjustments to the code above:

  • Provider ... Replace telasip-gw with the trunk name of your VoIP provider in line s,4 (see samples)
  • Protocol ... Be sure you specify the correct protocol for your provider: sip or iax2 (see samples)
  • Dialing Prefix ... The dialing prefix must be added to match what your provider expects to receive before the 10-digit, toll-free number (see samples)
  • Toll-Free Number ... Enter the 10-digit number (default: 8664365701) of your favorite contestant in line s,4 (see samples)
  • AutoDial Counter ... Set the maximum number of times you want the call placed in line h,4 (999 is default)
  • Now move to the top of the file and insert the following code in the [from-internal-custom] context using an available extension number on your system (default=1234):

    exten => 1234,1,Goto(custom-idolizer,s,1)

    Click the Update button to save your changes, and then reload Asterisk: Setup->Incoming Calls->Submit Changes->Red Bar.

    Tweaking the Settings. If you find that your calls aren't being completed or that your votes aren't being registered (i.e. the call disconnects before you are thanked for voting), it's easy to fine tune the script. The number 18 in s,4 tells the dialer how many seconds to wait for an answer when placing calls. The number 10000 in s,4 (in thousandths of a second) tells Asterisk how long to stay connected once a call is answered. And the number 6 in h,3 tells Asterisk how many seconds to wait between placing calls.

    Using the AutoDialer. When you're ready to begin your dialing spree, pick up an extension on your system and dial the extension number you assigned to The Idolizer (default=1234). Put the receiver down (don't hang up!) and enjoy the rest of your evening while The Idolizer does the dialing for you. When you're ready to stop voting, hang up the phone. If you'd like to follow the progress of your calls, fire up the Command Line Interface (CLI) on your Asterisk system (asterisk -r) and enjoy the show!


    Nerd Vittles User Map. Thanks for visiting! We hope you'll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don't know the difference in the last two, here's the best definition we've found: "a nerd is very similar to a geek, but with more RAM and a faster modem." The map still isn't quite representative of where all of our visitors are coming from, but we're getting there. We're always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you're visiting as well. We'll check it out one of these days.

    Want More Projects? For a complete catalog of all our previous Asterisk projects, click here. For the most recent articles, click here and just scroll down the page.

    Headline News for the Busy Executive and the Lazy Loafer. Get your Headline News the easy way: Planet Asterisk, Planet Gadget, Planet Mac, and Planet Daily. Quick read, no fluff.

    Got a PDA or Web-Enabled Smartphone? Check out our new PDAweather.org site and get the latest weather updates and forecasts from the National Weather Service perfectly formatted for quick download and display on your favorite web-enabled PDA, cellphone, or Internet Tablet. And, of course, it's all FREE!

    Be Sociable, Share!

    7 Responses to “Introducing The Idolizer: Free Asterisk AutoDialer for American Idol® Addicts”

    1. Maceo says:

      Ward,

      Or other NerdVittles addicts…er…readers like myself. Being a relative newbie I think it would be a nice exercise to show how a script like this could accept user input.

      For example:
      After dialing 1234, maybe play the “please enter mailbox number” file, the user enters the 800 number to call and presses ‘#’ and then that’s what gets dialed.

      I’m trying to get a grasp on how user input into Asterisk is handled, can anyone help?

      Maceo

      [WM: There are lots of projects on Nerd Vittles that will show you how to accept user input in your dialplan. Have a look at the catalog here. Here's a code snippet from another project to get you started:]

      exten => s,1,Answer
      exten => s,2,Wait(1)
      exten => s,3,DigitTimeout,7
      exten => s,4,ResponseTimeout,7
      exten => s,5,Read(NUM2CALL,vm-enter-num-to-call,10)
      exten => s,6,NoOp(${NUM2CALL})
      exten => s,7,GotoIf($["foo${NUM2CALL}" = "foo"]?h,5)
      exten => s,8,Background(pls-hold-while-try)
      exten => s,9,Dial(local/${NUM2CALL}@from-internal)

    2. gsmclean says:

      Unrelated to this post, but have you noticed the planet asterisk site has an issue (looks like someone didn’t close a strike or del tag in on of the posts the RSS reader pulled. The planet setup may need tweaked to make sure unclosed tags don’t spill over, but that’s prob. not your problem. Just figured I’d let you know.

      [WM: Thanks. I saw it, too, and sent them a note.]

    3. David says:

      Idolizer!!! You crack me up!

    4. Frank Barrett says:

      Love the scrips and tip bits you do so well. Thanks!

    5. Austin says:

      To make the Idolizer work wit the latest version of AAH, I think you may need to add the g option to the Dial extension:

      exten => s,4,Dial(ZAP/1/w18664365701|10|L(10000:2000:5000)&g)

      At least I did.

    6. john says:

      hi,

      I have found another use for this wonderful little snippet.
      I have been getting calls from telemarketers auto dialers
      getting a message , “”please wait, we have an important message” imagine that, a machine actully telling me verbally to wait!!!!

      I set my autodialer to call back their 800 number a half million times. call, wait 3 seconds, hangup, redial. im not joking, its been running for 17 hours.
      Yes, i have looked into the legal end of this.
      They signed a contract to pay for all incoming calls, their machine called me first, and, its been done before. They dont have a leg to stand on. I cant wait to see the fallout from this.

      john

    7. gsxr69 says:

      Hi,

      I would like to use this, but I want it to call out the same number simultaneously (I have a 10 port line so call the number specified 10 times rather than call hangup call…) and also send over DTMF eg 1 then 3.

      Can some one help me?

      [WM: Yes, but not here. Post it on the forums.]

    Ringbinder theme by Themocracy