Archive for category Uncategorized
Need Ideas
Posted by Aaron in Uncategorized on December 13th, 2006
I’ve got this awesome blog to keep up with, and although there are a bunch of things I know I could be putting on here, but I need ideas from the people. My little site isn’t frequented that much, but that’s fine with me, I would like to see it grow and become a great resource.
Anyone that has ideas, feel free to let me know, shoot me an email at amdtech@mdaniel.net and I’ll write about it. Also, I may be looking for people to keep the blog updated as well with their experiences and ideas so there’s more information from other people.
Thanks
Your friendly neighborhood Asterisk guy
MWI Notification
Posted by Aaron in Uncategorized on December 6th, 2006
Since some people on the mailing lists are asking for this, I decided to release it into the public domain.
Asterisk MWI is an interesting animal. Most people don’t realize that the MWI light is turned on simply by the presence or absence of the msg.txt files in the voicemail user’s directory. Using the method I’m outlining here will allow you to keep the load light on any call servers and have the voicemail server(s) handle notification and voicemail storage. This method is also immediate, since every time a call is made, Asterisk does the processing and sending of the MWI instead of a cron job that’s run every X minutes.
The first thing you’ll need is the notify_vmail_extern.sh script:
#!/bin/bash
CONTEXT=$1
EXTEN=$2
NUMVMS=$3
SCMCMD="/usr/local/bin/notify_extern.sh $CONTEXT $EXTEN $NUMVMS"
ssh ${SERVER} "$SCMCMD" > /dev/null 2>&1 &
This script goes on the voicemail box(es). Asterisk automatically sends the three arguments to the externnotify script, so don’t worry about those, just make sure your script has them. The SCMCMD is actually the script and controls that will be run on the other servers as well. The ssh command is what actually does the notification. You can have as many of these in here as necessary to send notifications out. If your phone is registered to only one server, you can probably do some creative lookups based on the arguments (either a db lookup for location information based on extension). If the phone can be registered anywhere, you can just put a series of ssh commands in to send the command to all the servers at once.
In order for that script to work, you must have ssh keys from the user Asterisk is running under on the voicemail box to the user that Asterisk is running under on the other machines. That is outside the scope of this article.
Next, you’ll need the script that runs on the call servers that will be doing the final notification:
#!/bin/bash
CONTEXT=$1
EXTEN=$2
NUMVMS=$3
NOCMD="rm -f /var/spool/asterisk/voicemail/$CONTEXT/$EXTEN/INBOX/*"
CREATECMD="mkdir -p /var/spool/asterisk/voicemail/$CONTEXT/$EXTEN/INBOX"
if [[ $NUMVMS = "0" ]]; then
$NOCMD
else
$NOCMD
$CREATECMD
for ((count = 1; count <= $NUMVMS; count++)); do
if [ $count -lt 10 ] ; then msgcount=000$count
elif [ $count -lt 100 ] ; then msgcount=00$count
elif [ $count -lt 1000 ] ; then msgcount=0$count
fi
TOUCHCMD="touch /var/spool/asterisk/voicemail/$CONTEXT/$EXTEN/INBOX/msg$msgcount.txt"
$TOUCHCMD
done
fi
This script is pretty straightforward. All it does is take the arguments sent, parse through the number of voicemails, and dependent on how many there are, either create that number of message files, or delete them outright. This process is about as immediate as the ssh comand can get.
Finally, on the voicemail server, edit the voicemail.conf file and configure the externnotify option like this:
externnotify=/usr/local/bin/notify_vmail_extern.sh
In Asterisk, do a reload app_voicemail.so and you’re done
Watch and make sure that it’s working.
UPDATE: In response to comments below, Asterisk 1.4 switched to checking for specific lengths of the msgXXXX.txt file name, so the old script didn’t work anymore. The update in blue above makes it work with later versions of 1.4.
Conversion Blues
Posted by Aaron in Uncategorized on December 4th, 2006
We’ve finally begun our approach into the full-scale deployment of Asterisk across the entire system. I will say, the number of options that you have when installing such an open system are staggering, as well as the cost involved in such a move. It sorta gives the impression of why most companies choose to go with the hosted solution, or have another company just come in and do the work for them.
I figure I’ll go over a few considerations we have had to take before undertaking something of this size. I won’t say it’s huge, but it’s not small either, with about 7000+ possible endpoints. Asterisk is a free product, granted, but it’s still a drop in the bucket when you’re doing a single shot system-wide replacement of this many phones.
Early estimates are putting us at about $2.5M, which I guess would be kinda conservative (jeesh, I wish I had this much money). This number involves the upgrade of every single network switch under a Cisco 3750 on the main Administration part of our network, i.e. Not Dorms. Once you have the switch capability, you can start working on the infrastructure and making sure that the switches can run your phones for an extended period of time, hence, you need a UPS. Our average uptime in the event of failure is about 2 hours, which someone higher up deemed was the best length of time to allow for. This infrastructure evaluation can also involve the evaluation of the server system as well as any upgrades required to get features you require. Finally, consider the phones, and what you need for your system.
The phones are what puts the project at the $2.5M number. Let’s say you go for full scale replacement of every single endpoint with an IP phone. That’s where the magic comes in, since you’ll be dropping at LEAST $100 for each phone, with a little more for certain featuresets and users that like to have “pretty” phones that do more. I think our numbers put us at about $1M for the entire phone order. That’s fun.
Now take into consideration that students don’t *really* need pretty IP phones, do they? Personally, I would rather bring my own phone, especially if I could use a cordless one. This brings something I wasn’t too thrilled with when I first started working on this project: Analog Converters. There are a number of options here, some of which are somewhat elegant, some are a little too risky from the hardware side. You could either go out and get several thousand “personal” converters, let’s say at $50 a piece, but the problem here is the control is with the user, not the sysadmin. Or you could go the Citel route (which converted me, they make some really awesome analog/digital-converters). At about $100 a port, this is more expensive than the personal converter solution, but much cheaper than the IP phone solution, since you don’t have to have the UPS support you require with the IP phone solution since these devices take up FAR less power than a full dorm of IP phones.
I’m not sure where this path is headed, but things finally seem to be coming together for our particular Asterisk installation. I’m definitely hoping it goes smoothly, and hope they actually go through with this system wide replacement.
Polycom vs. Cisco
Posted by Aaron in Uncategorized on October 29th, 2006
I was recently asked by my supervisors to create a document that contrasted Polycom phones to Cisco phones, on a point by point basis. The original format is in a word document, so I’ve decided to convert that document to a blog entry for easier access for everyone. Keep in mind that this is a point for point comparison for a management team, not for the technical users. Most of this information is displayed in a manner that makes it easier for us to make a decision on what phones to use (if you can’t tell, I’m pushing hard against Cisco).
Read the rest of this entry »