I’ve had a good productive few days with system things recently. Probably the biggest improvements have been on the phone system.
The cutover to Trixbox changed a lot of how we worked with the phone system — and not all for the better. Losing LDAP caller-id lookup and other features was a bit of a PITA, and honestly was a bit too much to sacrifice just to get the easy configurability of FreePBX. I blogged about how I restored the LDAP caller-id lookup, and that the LDAP phone directory was on the way back, but I remembered one other thing that was really useful in the previous setup — voicemail.
In an office phone system, you would generally associate voicemail with an extension. FreePBX follows that model, and makes it really easy to set up. For a home system, however, it’s not ideal, because (at least in my setup anyway) there are a number of extensions that are all in the same ring group and are actually all for the same person (or people).
Right at the start, I configured this in FreePBX by setting up “Other (custom) device” extensions with Voicemail enabled, and disabling voicemail on all “real” extensions. In the setup of the real extensions, I set the “mailbox” field in Device Options to be the correct voicemail number that extension would belong to, so that the Message Waiting Indicator (MWI) worked correctly. The trouble was that getting into the voicemail system was not a one-touch deal any more, as the default FreePBX voicemail access feature codes were all set up according to the mailbox-per-extension model. So we had to dial the Voicemail number (a non-intuitive number starting with *98 according to FreePBX) and log in with a password.
I thought about setting up a custom application (FreePBX-speak for a hand-written context in extensions.conf), but thought that there must be a way to get the existing code to work… but after looking at it for a while, I decided that a custom app would be much easier to get working my way, and be less likely to break in a future FreePBX release.
The end result was incredibly simple. Since I had already told FreePBX the desired mailbox for each real extension (the MWI config I mentioned earlier), I simply wrote a few lines of dialplan to extract that from MySQL and send the caller to that voicemail box! I was expecting a lot of work, but I think it took longer for me to get the MySQL userid and password right than it did to get the code correct. 🙂
Other things I did were a rearrangement of the queue and IVR for the work phone line, and I made a bunch of system recordings for queues and voicemail. There’s very little left for the phone system now!