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<num>.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
TOUCHCMD="touch /var/spool/asterisk/voicemail/$CONTEXT/$EXTEN/INBOX/msg$count.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.
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.
Fonality vs. Digium
This is a cross posting in response to the flamewar currently going on between Marcelo Rodriguez from Voxilla and Chris Lyman from Fonality. The original posts are at:
http://voxilla.com/soapvox/marcelo-rodriguez/fonality-is-fine-but-worrisome-869.html
http://voxilla.com/soapvox/marcelo-rodriguez/a-mini-fonality-furor-879.html
First I’m going to say that this discussion has been blown way out of proportion by the folks at Fonality, and Chris is showing some very childish tendencies. I wouldn’t be surprised if his responses alone steered prospective customers away from using his products.
Speaking as a user of Asterisk in a large environment compared to Fonality’s average install, most of his arguments about why his company’s decisions are “correct” are blown way out of proportion. I’m going to have to agree with Marcelo’s concerns on this one, even in the face of Chris’s responses refuting most of them (or downplaying the concern people should rightly feel). Fonality’s product sounds like a catch, and it’s no wonder that small businesses are calling them up for phone systems, but I think Fonality is playing russian roullette with their customers systems.
Marcelo’s arguments are definitely straightforward and his responses are to the point, some would even say they’re correct. I’m going to argue from my standpoint some of the issues covered. I’m not interested in a point for point bulletin as these are going to overlap and address some of the arguments stated.
* Security and Management - It is not the PBX designer’s job to manage the phone system. Historically, larger companies house their own telecom system and manage their own extensions. Hell, we have a Meridian that we manage fully in house. Companies aren’t stupid, the only reason they’re picking the VoIP solutions over anything is that it’s definitely cheaper and brings them into a whole new realm of possibility. Digium hands over the software in a box just like any software company does, and doesn’t require direct access to the servers. And for the strong willed, there’s even a *gasp* open source edition that’s… free??!!?? Granted, setting up Asterisk is definitely not for the faint of heart, but with the advent of the Appliance, they’ve got a GUI Framework that is also *gasp* open source. Seems to me that we’re getting closer and closer to what Fonality is offering.
* Call Detail Records - I’m not sure where Chris is getting his arguments about the use of CPU cycles and such. We’ve been running our databases in tangent with our Asterisk systems along with call detail processing without any issues, period, and we’re running PostgreSQL which is more memory intensive than MySQL is. Ethics aside, I’d like to see the Federal Regulations that state that the information that Fonality is receiving (I’m assuming without the companies even knowing) is protected from their involvement. Who’s to say that they’re not looking at the detail records.
* Hosted Services - Chris argued that all the hosted services would have the same questionable problems that Fonality is being questioned about now, and I’m going to disagree with that one. Vonage, just to name one, is by law considered a Phone Company, they are bound by federal regulations (Marcelo did state that, didn’t he?) about how they handle their services and customers. Also, that’s a whole different ballgame. Fonality handles the internal company systems, not the global communications of the company. Honestly, is it so hard for them to release control of the systems their customers *bought* and provide patch support and such to the customer?
* Ease of use - This is also a moot point. Digium offers consulting and there are many contractors out there that will get a system up and running and turn over control without any uplink to “central” servers. These services are even to the point where the only time they would have to come in is if the customer wanted a massive restructuring of their system. Case in point, the entire development team of our system would be fully satisfied with leaving their post for an extended period of time without having to worry about the kind of stuff that Fonality is expecting their customers to fail in their capabilities on.
As I said before, Fonality really isn’t coming out on top on this one. In my opinion, Digium’s doing a great job of staying out of it (who knows, they may not even know about this whole argument). The responses this has received will probably open a few eyes and make people realize that taking companies at face value isn’t always the best idea. I’m glad we went with a straight Digium solution, it’s definitely served us well, and we don’t have to worry about the things that Chris’s empty promises claim to prevent.
Aaron Daniel
Senior Voice Analyst
Sam Houston State University
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 »
An ongoing battle… Which phone is better?
As everyone may know, we currently run our Asterisk system with a mishmash of Cisco phones. Mostly 7940’s, some 7912’s, and a few others here and there. However, we’re in the process of evaluating various types of phones to expand our network into a more standards compliant, capable network of phones. This is what brings me here today, which phone do we like the best?
Voicemail App Modifications
Posted by Aaron in Modifications on October 13th, 2006
After discussing with the Internet2 VoIP SIG, I’ve decided to go ahead and post most of the modifications from our system as patches. This patch is everything we’ve done with the voicemail application. Next will be the modifications done to the sip channel.
Included in this patch:
- “From User” functionality
- This function allows us to send voicemail FROM the user that left the message, so you can just click reply when you receive the email
- “MP3 Conversion”
- This function converts the voicemail to mp3 format before emailing it to the user, providing more application saturation and not requiring special codecs in most cases.
- “Volume Gain”
- This increases (or decreases) the volume of messages that are emailed.
- “Forward Compatibility”
- I call this compatibility since it makes forwarding the message act the same as regular voicemail messages do. The original handling was that it would be dropped in a user’s inbox and the forward function does all the work. I didn’t write the patch, but we do have it in place and working and I didn’t realy think it was necessary to remove it from the patch file.
The only patch that actually requires any sort of database backend modification is the From User patch. We use an email lookup table (named emaillookup… you can name it anything in the database, but it must be called emaillookup in extconfig) that contains all of our user’s phone numbers, cid names, extension, and email addresses:
Table "public.emaillookup" Column | Type | Modifiers ----------+-----------------------+----------- cidnum | character varying(10) | email | character varying(60) | cidname | character varying(60) | username | character varying(15) | exten | character varying(5) |
And in extconfig.conf:
[settings]
emaillookup => odbc,ast_cnf,emaillookup ; use your standard db connection here
Aside from that, if anyone has any questions, let me know.
Volgain patch for asterisk v1.2
Posted by Aaron in Modifications on October 11th, 2006
I’m attaching a patch that will allow users of the 1.2 version of asterisk to increase (or decrease) the gain on voicemails that are emailed.
The version we use on campus also converts to mp3 for better client support, as well as a number of other patches if anyone would be interested in that. Just post a comment and I’ll see what I can do.
In order to install the patch, run these commands:
cd /path/to/asterisk/source
patch -p0 --verbose < /path/to/volgain.patch
make
make install # you can run this or just copy app_voicemail.so
# from apps to /usr/lib/asterisk/modules and restart asterisk
<edit>
Sorry guys, I left a section in the code that was part of our CONVERTMP3 function, it’s been removed.
Internet2 VoIP SIG
Posted by Aaron in Presentations on October 9th, 2006
Just a quick post that I’ll be presenting on October 12th at 1pm CDT for the Internet2 VoIP SIG.
Here is the presentation I’ll be using in PDF format: