Asterisk
The Bill to Tax VoIP

Something came up a while ago on Slashdot about taxing Internet service in the US and the idea that VoIP would be excluded in a new bill that extends the tax free status of Internet access. As usual most of the details of the proposed law are completely lost in the movement from the bill as it's written to Infoworld to Slashdot. In the course of discussion when I asked about how to see the bill itself, someone kindly provided a link to Thomas, the legislative information resource at the Library of Congress. Unfortunately the search results there aren't RESTful - there's no way to get a permalink to HR 3678 (apparently the bill in question). Anyhow, after looking up that bill and seeing the sponsors I thought it would be informative to look up the politicians named on the bill at Open Secrets and see who funds their campaigns.

There were a number of names and what I found was interesting in relation to the changes outlined in this bill. I'll just quote the reply I made on Slashdot.

Installing Asterisk 1.4 on OpenSuse 10.2

I've had my Asterisk PBX offline for a while now for no good reason, so I decided I'd upgrade and put the latest Asterisk on my new machine. I wrote about the last time I installed, that was on an older AMD Athlon 1200MHz Thunderbird. It worked fine but I got a Linksys PAP2T-NA ATA and became very lazy. The ATA just registers with Les.net and I plug a phone in to it, so there's no need for Asterisk for just basic VOIP phone service.

I decided that I'd just use the ATA for a while then I got into some sound quality problems. I switched out many parts of the system trying to determine where the problem was but the best lead that I have so far is that my modem has issues. I'm not sure that the entire problem is with the modem but I do know that my Internet connection overall gets faster if I reboot it and that shouldn't be necessary.

Anyhow, voice quality issues apparently are common with VOIP and more people are using it anyway - the balance of features and cost is still in favour of VOIP. So I figure that if I get used to my system I can work the kinks out of it later. As time goes on and there are more users it should be easier to find help on my specifics too.

Today I want to revisit some of the work I did getting Asterisk 1.2 working and see what I have to do to get Asterisk 1.4 running. It's apparently not that different.

Taking the call - Wrapping up with Sip.conf, Voicemail.conf and MeetMe.conf
One last short one about my Asterisk configuration files. I hate it when someone pastes a few lines and calls it an example, so I'm going to give the supporting parts of other config files that are needed to make my extensions.conf work. I don't think the complete files are necessary, since they're almost exactly the same as the samples that come with Asterisk. I authenticate all users based on the login and password they use for voicemail. Here's the section of voicemail.conf that creates the mailboxes and assigns the passwords. [default] 77 => 71284,Rob's Mailbox,rob@example.com 63 => 71284,Alex' Mailbox,alex@example.com 71 => 71284,Candace's Mailbox,candace@example.com 72 => 71284,Jeff's Mailbox,jeff@example.com I've started them all off with the same password but apparently the voicemail module can rewrite voicemail.conf to change passwords. The email addresses don't do anything here yet. Apparently there's a simple configuartion change you can make to enable email notifications or even enable sending the entire voicemail over email but I have yet to try that out. Here's the entirety of my meetme.conf file. ; ; Configuration file for MeetMe simple conference rooms for Asterisk of course. ; ; This configuration file is read every time you call app meetme() [general] ;audiobuffers=32 [rooms] ; ; Usage is conf => confno[,pin][,adminpin] conf => 101 Remember that in order MeetMe to work, you need a timer source, either a hardware solution or the ztdummy software timer module. I think this set up for MeetMe could be useful for people with a scheduled conference call but could also be useful to connect with over a softphone. Then people could hang out in the conference room and possibly use it as a substitute for Ventrillo or TeamSpeak. My sip.conf file is pretty much the standard sample sip.conf for now as well. The one change I made is the one that Les.net tells you to make in their sample code for peering with Asterisk. It looks something like this [general] ... some stuff ... register => <some code>:@did.voip.les.net/<special code> ... some stuff ... [lesnet_peer] type=friend host=did.voip.les.net dtmfmode=rfc2833 insecure=very disallow=all allow=ulaw context=lesnet-incoming ; incoming DID calls will arrive in the lesnet-incoming context Of course this is censored but you get the idea - if you use Les.net then you can look up the exact code for your [general] context and if you don't use Les.net then it's going to be specific to your service provider. This does tie back in to a section in my extensions.conf from yesterday though. The context=lesnet-incoming line brings incoming SIP calls from the DID to the [lesnet-incoming] context in my extensions.conf. From there I send the calls to [incoming] with a Goto() like this. [lesnet-incoming] exten => _X.,1,Answer exten => _X.,n,Goto(incoming,s,1) I didn't mention it yesterday because it ties back to sip.conf. This kind of separation lets me have a different context to answer calls from each different source. Once anything unique to that source is taken care of, I can route the call in to the [incoming] context so that everything is handled the same after that point. I think I've had enough messing with Asterisk for a little while. Though my ATA should show up in just a few days...
Taking the call - My extensions.conf for Asterisk 1.2 and How it Works

I finally got my dialplan configured to some satisfaction. I'm not so sure I want it to work the way I described any more, but I've built pretty much what I said I would. I'll explain here how to do what I did and walk through all the configuration that I did for Asterisk. Remember though that I'm a beginner at this stuff and this is my first dialplan. There could be massive holes in it that I don't know about yet (if you see one, do let me know :) ). The examples that I'll go through give away details of my internal menus, but I'll be changing the structure for my own use (as far as extension numbers & whatnot) so don't expect to just call up & start calling long distance on my dime :P.

I started from the sample extensions.conf to try things out. First I added the features I wanted then I deleted pretty much everything but those new parts I had added. The biggest piece that I kept was most of the standard extension macro. The term 'extension' is overextended. The standard extension macro acts like an extension that you'd typically think of when you think of a phone extension. It calls a user and routes to voicemail if the user is on the phone, busy or otherwise unavailable. I'll go through the interesing parts of my exensions.conf then include a link to the entire file down below.

Adding the ztdummy Timer Module to an Asterisk 1.2 Server
I've been talking about my plans for configuring Asterisk in my home for a few days now. I said that I want users of the system to be able to access voicemail, dial out and make conference calls. The only one of these features that I haven't at least tried out is conference calling. Conference calls in Asterisk can be set up with an application called MeetMe. When reading up on how to set up a MeetMe conference I saw repeated references to a requirement for a timer module. The reason a timer module is required is that Asterisk needs accurate timing to mix the two voice streams in real time. One method of timing uses special-purpose timer hardware on a PCI card that many Asterisk users have. My Asterisk server has no special hardware yet (though I did order an ATA today - the Linksys PAP2T-NA). The other method of getting a timer to work is by installing the ztdummy module. The module is called ztdummy because it works in lieu of a the real zaptel hardware device. Today I'm sharing my notes on how I installed the ztdummy timer module. The ideas and some commands might be helpful, but keep in mind my situation is with a test server that's got no live calls. Don't blindly copy what I've done if you care much about keeping your server running.
Taking the Call - Voicemail, Conference Calls and Dialing Out with Asterisk in my Home
This is the last post on planning to write my Asterisk config files, I swear I'll deliver some working examples next time. Today I want to describe how I planned out the Main Menu available to known users. By "known user" I'm talking about someone who I know personally for whom I've set up stuff on my Asterisk server. Each known user has an extension number that will connect to their own phone and they've got access to a few basic features on my server. Last time I covered how I expect to present a menu to outside callers and how an outside caller can log in so that Asterisk recognizes them as a known user. Today I want to get in to the basic features that a known user has access to once they log in. I wrote about a menu idea in my planning wiki that I now think is kind of complicated to explain and can't all be done in my first try. Here's a simplified version of that plan which only includes things that I think I can do with a reasonable amount of work on my Asterisk install (which isn't that far from a stock installation).
  • Recorded menu presents options: "To access voicemail press 7. To create a meeting press 8. To place an external call, press 9." This will be referred to as the 'Main Menu' or M.
  • Pressing 9 followed by a phone number places a call. In this case I'd use a timeout to detect the end of the phone number. This makes connecting take a little longer but improvements on this would introduce more complexity.
  • Main menu Option 8 - meetings...
  • Main menu Option 7 - Voicemail should work pretty much as standard voicemail on Asterisk.
In case you haven't noticed, the goal here is to keep it simple and get the basics working. I'll cover where I expect to get the information I need to put together these basic features (hint: voip-info.org and the Toronto Asterisk Users Group).
Taking the Call - From an Outside Call Asterisk to an Inside User
As I described in a previous post, I've been planning out my Asterisk deployment for my home. I actually made up a requirements-style document that describes my needs and expectations. A lot of this should be doable on the first pass but some features will have to wait. Here's the basic goals I've come up with so far: For any known user
  • A user will get a 2-digit extension number they can be reached at. The numbers reserved for this are in the range from of 60 to 79.
  • A user can log in easily:
    • Partial authentication if Caller ID is available and recognized (maybe not necessary?)
    • Login by dialing 1 <extension> <password>
  • A user can dial in and access voicemail, place calls or create meetings (any other features?)
  • Note that passwords may be different for different for different subsystems. Asterisk doesn't seem to have one global concept of a user, so there are several ways to authenticate, including voicemail, DISA and homemade approaches.
Expanding on Asterisk in my Home
Asterisk is an exciting application. With all the laundry list of features and applications for it, one can have a really hard time deciding what to do next if you're just exploring. Personally, I guess I don't have a particular need for any one feature of Asterisk, I just think there are a lot of really nice-to-have features. I've already got a quick hack working so that I can dial long distance from home or from any phone for drastically cheaper than any other way I know of, so what more do I really need? Well nothing, but I think it'd be much nicer to be able to dial more easily (and more securely than my hack). I'd like to integrate a phone book, maybe on my computer, maybe on a private web page or maybe on a Myth front-end. How exactly the mechanics of any one solution would work I don't really know. I also like the idea of setting up dial-in conferences. I just started looking in to MeetMe conferences tonight since I spent an hour or more on the phone with my brothers & sisters. If I could quickly set up a conference and give them a number to dial or have a way to place an n-way conference call then I would've used that. So it sounds like I have a couple goals I can work toward:
Quick Guide to Getting Cheap Calls with Asterisk 1.2 on SuSE 10.1
Let me start out with a warning, in case you don't know me, I'm really good with computers and pretty good with Linux. I'm a first-rate amateur with the telephony side of things, so my terminology may be off and there may be some concepts that I just don't get yet. Before you agree to pay for anything, my advice is to get an idea of the rough costs of the service. I asked about my plans on the Toronto Asterisk Users Group mailing list and received some great pointers. The latest version of Asterisk at the time I'm writing this is 1.2.13. I had some success experimenting with VoIP on FC4, so I want to install Asterisk on my current SuSE 10.1 and see if I can get any further with it. Unfortuanately the package offered to me is 1.2.5. I wouldn't normally care about being a few minor versions behind but the last update was for a security fix for a pretty popular device - there could be modules I'd be running that would be vulnerable.
Trixbox Broke my Monitor (not really)
A couple weeks ago I wanted to try out TrixBox (the new name for Asterisk@Home). As far as I understand it's supposed to be a BDI for Asterisk. I still don't like their installer - the instructions on their site don't match the instructions you get when you boot from the disc. When the disc boots, it looks just like the normal installer for Fedora Core or CentOS. The screen says you can pass parameters to the kernel at boot. I usually use the line "linux ide=nodma" to avoid some issue with my hard drive controller or drives that slows things down. So I did the same thing here. And I got a familiar Anaconda Installer. This is the same path I went down with Asterisk@Home and never got anywhere. That's because there are packages listed on the installer screens that can't be installed.
Syndicate content