Archive for May, 2007

SUV Ownership rules

Sunday, May 13th, 2007

I was surfing the web and stumbled across this and nearly spit milk out my nose laughing. Check this out. Its almost sad how true this is.

Centralized Voicemail server for multiple Asterisk systems using FreePBX and IAX2

Sunday, May 13th, 2007

Well I never really finished up my asterisk tips posts… I’m lazy and most of the free time I do have I dont like to spend on the computer anymore (what can I say). Im going to make it up to you though by sharing with you how to make a very slick asterisk setup.

So why would anyone want to have a stand alone voicemail server anyway?? Well thats pretty simple. Lets pretend you have a small to medium sized company. Maybe 100-500 employees, maybe more maybe less… You have 3 or 4 office locations, they span several cities or maybe even other states.. It doesnt really matter where they are. The important thing is that they all need to be connected. You need to be able to call from one office to another, and at times you will even need to forward voicemails from one location to another. Asterisk does not just automaticly support this. Even if you have routes in place that make it so you can call each person on your network with a SIP call if their voicemail box isnt on the same server as yours you cant forward them a message. This can become a big problem real fast. Infact at our company we were considering not using asterisk because of this. The good news is that its really simple to do.

First off Im not going to cover how to connect the multiple servers. This has been articled to friggin death. Its covered on many sites, one of them not being this one. Next Im going to assume you have figured out how to make connections from 1 asterisk system to another using IAX2. If not please check out this guide. It works great.

Now on to the fun stuff. I used FreePBX on our 3 PBX servers to get our dial plan setup and have a nice easy to manage user interface. I kept thinking that this would keep me from being able to customize my dial plan like i needed to but I was all wrong about that. Im now going to point you over to the guide I followed: Click me!!!

This guide is fairly good. It doesnt cover doing it with FreePBX though. If you use FreePBX you may have found that if you edit one of its config files you lost your changes once you entered the gui, or made an update to FreePBX. I went to the IRC and asked how to get around this. It was simple, at the top of the config files you see a line that says #include somefile_custom.conf All you have to do is edit that custom.conf file and over ride the context you need to edit. So if you have in your sip.conf file a [foo] context you go to sip_custom.conf and make [foo] in there and then the settings for the [foo] context from your sip_custom.conf file will be whats used instead of the [foo] from sip.conf

In the article I asked you to click to see how to do the setup it said you needed to edit a macro in extensions.conf. The context you need to edit is called [macro-vm] First what I did was copy and pasted the [macro-vm] context from extensions.conf and pasted it into extensions_custom.conf then I edited the following:

; over riding the below for our central voicemail server
exten => s-BUSY,n,Dial(IAX2/toVMail/b${ARG1})
exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)

exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
; over riding the below for our central voicemail server
exten => s-DIRECTDIAL,n,Dial(IAX2/toVMail/${ARG1})
exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)

From there I just followed the rest of the guide the other nice fellow provided and saved my settings, then setup a plain jane asterisk server for my voicemail server. I didnt use FreePBX on it at all. Managing that server is braindead simple so I didnt see the need. I hope this little tidbit will help others out there who have to set this up.