Asterisk Appointment Reminder Solution

Over the last 11 years, I have had the incredible opportunities to be involved with companies that either encourage the exploration of new technology, or the need to deploy and utilize virtual office spaces.

Having the freedom to really tinker with about anything that trips my trigger for the day, I’ve become been fascinated with the space between computers and telephony and interoperability with Cloud-Based computing.

The possibilities are endless.

Take for instance my latest distraction,  I have implemented a number of appointment reminder systems for clients in my career, and they typically are:

  • Expensive to purchase
  • Tied to expensive annual vendor support agreements
  • Tied to specific software packages for integration / automation options
  • Expensive to expand (additional phone lines, etc)

Why not leverage open source and the cloud to do the same thing?  Sure, there will need to be some custom development on an interface and some sort of integration connector…but really, what is that difficult about a system that queues calls to a dialer?  (I say that tongue-in-cheek, of course…)

So I set off to build this.  I found a number of blogs and WIKIs about people who had successfully (or unsuccessfully in some cases) put something like this in place.   I hate reinventing the wheel so I always like to find something at least remotely applicable to what I’m trying to do.  I found a good starting point at Ward Mundy’s (NerdVittles) Teleyapper / Robodialer for Asterisk page.

I have been working with Asterisk since the early 2000s – I love it.  The contributing community behind it is unmatched.  I’ve installed dozens of Asterisk-based systems, (Core Asterisk, PIAF, Trixbox, FreePBX, VICIDial, and Elastix) over the years and haven’t found a real business need that the Asterisk community hasn’t been able to meet.

So I started off on gathering my business requirements on how I wanted this service to work:

  • Available 24×7
  • Able to use multiple providers / trunks
  • Provider and Location Failover
  • Neat / Easy to Use Interface
  • Outbound CallerID set on the fly (appear as customer)
  • Payment integration (PayPal to start)
  • 99% HANDS OFF (I hate maintaining simple things…)
  • Worth enough $$$ to make it worth my time building it!

Those last two I never really bothered to think about in my youth – partnering up with anyone who had an idea or some free time to build “the next best thing” but ending up with something unsellable or so manually intensive that I just gave up on it.  Great experience yes, but the literal MONTHS of time wasted on ideas teaches you to ask yourself, “would anyone REALLY buy this?” more and more as you grow up.  HA!

So after researching a few “competitors” on the web that did roughly the same thing, I figured that I’d make a go at this.  I installed Teleyapper on a virtual instance and began running all kinds of calls through it.  “Cool!” I thought, but it needed more.

Core System:

Pentium Dual Core box
PIAF (Asterisk + PBX in a Flash)
2 channels of Cepstral with Allison’s lovely voice
2 SIP Trunking providers (CallCentric and VoIPStreet) for failover

Testing, testing, testing, and more testing.  Calls to landlines, calls to cell phones, calls to VoIP phones, calls to Skype phones, calls to answering machines / voicemail.  I spent two weeks solid (and about $50 in carrier fees) making sure that I knew for sure how data moved around in the system and that the final product wasn’t a waste.

Ok, core system is good, but I need a website to feed this beast data.  I shuddered at the thought of hosting this solution in my basement – to start off is always OK, but what about when my flaky internet connection tanks or my little Linksys router can’t take it (which is often…grrrr)?

MySQL is awesome – let me tell you.  There are a lot of cloud / hosting providers out there that allow you to put publicly-accessible MySQL instances out there, my choice at the time was GoDaddy.  (I already had hosting packages and domains out there)  I signed up for a basic Linux hosting package and away we went.  Taking the basic structure of Ward’s scripts, working in some additional includes and streamlining the DB calls and general flow and my Asterisk box was now talking to GoDaddy’s servers.  Cool!  Connect up a website, easy enough to do.

Now came tweaking the original DB design to integrate multiple customers, payment packages, demo accounts, and resellers…took a little bit, but 8 more DB tables, 20+ new columns in the existing table schema, some stored procedures – BOOM, we have a functioning site.  LAUNCH Adwords and some Facebook advertising.  Go baby go!

“Wait…” I said, “What about scalability?”  Granted Asterisk can handle more calls than I could realistically throw at it in the near future, but before I scored my first customer and instituted the “locked-down production” mantra, let’s integrate in the ability for multiple Asterisk boxes to continually ping the master DB for calls to make.  Easy enough – add one new column in a few tables to handle a unique “DialerID”.

Production System

Core System x 2 (two separate locations)
GoDaddy MySQL Hosting (GoDaddy runs MySQL 5.0 that has stored proc support)
Hostgator PHP Hosting (GoDaddy’s PHP Mail is HORRID, and I’m being nice leaving it at that – but Hostgator doesn’t support MySQL stored procs)
PayPal Integrated Payments with IPN functionality

Ad campaigns running, letters to local businesses, word of mouth going – fun stuff.

Want to know more of the nitty-gritty technical details behind this?  Comment away…