Asterisk and Evolution

We’ve just switched from a regular VOIP vendor to an in-house Asterisk PBX with a T‑1.

The results have been good so far — we have much less delay on calls, and a heck of a lot more control over our phones and our system. Most of TCG’s employees work onsite, so they can’t plug in a VOIP phone at their desk; to deal with them the PBX finds them and rings on their office and/or cell and/or home lines simultaneously or consecutively. For our offsite people we have VOIP phones for each of them.

The system also takes care of faxes — each person now has their own fax number, effectively, and faxes are emailed to them directly.

And the system provides us with conferencing (up to 23 users, of course, since that’s the number of incoming lines we have on the T‑1 (ISDN PRI)).

It’s that last bit that’s caused me to exhibit my inner geek. We bought our system from a vendor, Intuitive Voice, whose product is called Evolution. It’s basically an instantiation of the Asterisk system, with a fairly nice web-based user interface and a slightly-customized copy of CentOS. I was able to buy the whole system from them, including the T‑1 card and software, which made my life much simpler.

Unfortunately they (a) encrypt their PHP code so I can’t muck with it, and (b) use a mysql database to store all the Asterisk configuration options. While this dramatically complicates my mucking with the default configuration, it can’t stop me! With, that is, a little help from the good folks at Intuitive Voice, who cheered me on as I made my changes, while noting that if I screwed up anything too badly they would not be able to give me support anymore. Not surprising. But do be careful — you can totally hose your system while doing this.

First I wanted to make it so the first caller to a conference line did not hear our hold music. To do that I did the following:

  1. SSH into the box (got the root password from Intuitive Voice).
  2. Become root, if you’re not already.
  3. /etc/init.d/mysqld stop (we need to get into the database without a password)
  4. mysqld_safe –skip-grant-tables & (this will restart the database but make it so passwords are not required. Yay security!)
  5. mysql asterisk_config (going into the correct database)
  6. Find rows of ast_config where var_val contains MeetMe (it’ll be in the format 14000,20,MeetMe(14000,siMP,2232) where 14000 is the conference line, and 2232 is the passcode)
  7. Change siMP to something without the “M” like siP (exact SQL for us: update ast_config set var_val=“14000,20,MeetMe(14000,sicP,2232)” where id=126222)
  8. /etc/init.d/mysqld stop (stop the unprotected mysql instance)
  9. /etc/init.d/mysqld start (start the good one)
  10. Go into the web interface and restart the PBX (not necessary to reboot)
  11. Wait a bit — it seems to take a few minutes to do something, maybe a cron job? Anyway it should work in 15 minutes or so.
  12. Give it a shot.

This also worked when we wanted to remove the annoying “please state your name followed by the pound key” thing so people could be announced as they entered — just make the option scP rather than sicP. And it worked when I wanted to change the conference line extension to something more complicated than 14000.

After I did it, though, the request for name (option i) reappeared. I was able to finally kill it by modifying /etc/asterisk/extensions.conf. I also modified /etc/asterisk/meetme.conf, just for good measure.

One important thing to remember, tho: Do NOT go to “Conference Rooms” and save the line you’ve modified, or it’ll (a) overwrite it with the old options (siMP) and (b) change the row ID so it’s a pain to find again. Whee!

I was helped significantly by a page on the Asterisk wiki.

Next hack: How to change the music on hold every few minutes — Evolution starts with the same song every time, annoyingly, even when it’s set to “random”. I’ll be finding a way to fix that in the next week or so.

2 responses to “Asterisk and Evolution

  1. They won’t tell you the default one (smart, since it’s the same for everyone), but they’ll change it to something you know.
    Of course, once they tell you you’ll want to change it. We also removed the root account, which is SOP for us, and installed all our normal security software. That means they won’t support it quite as much, but we haven’t hit any situation where they blamed us for screwing up the box.

Comments are closed.