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. So instead of using YaST2 I'm going to try the 10 minute guide to Asterisk. I think I used this resource (with others) to get it running on Fedora. In my shell, I did basically what the 10 minute guide says. cd cd work/asterisk wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.13.tar.gz tar xvzf asterisk-1.2.13.tar.gz cd asterisk-1.2.13 make su make install make samples Good things happened in response to each command. Bad things might happen for you - I can't say. At this point Asterisk was installed and ready to go. asterisk -vvvvc Now I get a bunch of debug info (the vvv asks for verbosity) and an Asterisk console. The quick start guide goes on to set up with a service provider, Unlimitel I think. This is where I had to diverge from the guide. What you do here depends on what you want to use Asterisk for. If you only have a normal analog phone line right now and you want to ease in to Asterisk (as I did), one way to do that is to get a phone number for your Asterisk box. To get a phone number what you need is called a DID. When you sign up, most providers have you pay monthly for the DID plus something like 1.1 cents per minute when you're using it. I signed up with LES.net since they have DIDs available in Windsor. The rates look okay and they get okay references on the Toronto Astersisk Users Group mailing list (though Unlimitel is reputed to have better voice quality). The web based interface for les.net isn't beautiful but it's simple, quick, and it works. If you use Paypal you can pay on the spot. I downloaded a form and faxed it back so they can automatically charge my credit card whenever the balance in my account drops under $20. There's a small (25 cents + 3%) processing charge for payments that aren't wire transfer. This fee plus the cost of a DID in Windsor with "unlimited" minutes (which I think means unlimited minutes that would normally be 1.1 cents) is still under $15/month. That compares favorably with my current phone plan for POTS from Bell. After my payment was processed (why didn't I just use PayPal?), I purchased a DID. I expected the DID to take some time to be activated, but it was basically instant. After that happened I copied a couple snippets that LES.net gives as samples for sip.conf and extensions.conf. The one in sip.conf adds LES.net as a peer. It says that all incoming calls from LES.net use a context that's defined in the snippet for extensions.conf. Next I called the phone number from my cell phone. My Linux box answered and said the phone number I'd called. Checking back at the web interface for LES.net, I could see from the CDR menu choice (it doesn't show until you're logged in) that my call details had been logged. So from the CDR page on the web I can see all calls in and out through my DIDs. Immediately. Sweet. For the next step, I had planned to get VoIP working from home with my normal phones through an ATA. I still plan to do this, but I have to order an ATA (like the Linksys PAP2T-NA or Grandstream GS-286). In the mean time, I can apparently get cheap long distance from my cell phone right now. Some research at voip-info.org helped me to come up with the one line I needed to add to the demo context that for connecting calls from outside over my VoIP peer. Basically the line exten => _9XXXXXXXXXXX,1,Dial(SIP/lesnet_peer/${EXTEN:1}) added to the context allows a very insecure connection from an inbound call to any outside number. It works like this:
  1. Someone (presumably you) calls your DID number.
  2. The call is routed to Asterisk and Asterisk connects the call to the [lesnet_peer] context.
  3. The caller dials 9 followed by a ten-digit phone number (like 9-1-519-250-5000).
  4. Asterisk places a call to the ten digit phone number (1-519-250-5000) using lesnet_peer.
  5. The outbound call is connected to the incoming call.
This works fine for a test but wait until you tell all your friends about it then each of those friends tells a friend. Suddenly you have fifteen strangers calling Bogata on your dime. It's cheap but it's not free. So you need authentication. I haven't set that up yet, but will soon (hint: start here). Notice that there are two connections made with the peer in my example. One coming in from PSTN to VoIP and the other going out from VoIP to PSTN. These calls are both charged separately. If I were making the call from home using a SIP phone or an ATA (for example) then there would only be one outbound call that showed up on PSTN. If someone called my DID and I answered at home with a SIP phone or answered somewhere remote with a VoIP soft phone, then there'd only be one call on PSTN. The ideal is to keep as much on VoIP as you can. The VoIP part is free, it's the PSTN ends that cost. I bought my DID from LES.net at flat rate. For a Windsor DID (one of the more expensive places), that's currently $10.88. The end of my calls that goes to the DID seems to be included in the cost - basically inbound calls are free. A call that goes out over LES.net is charged to my account based on the rates they post. I think I could set up other peers for outbound calls if I found cheaper rates elsewhere. I'm getting all this from reading the report that LES.net provides, so make sure and do your own reality check before making decisions based on my experience. The other really cool thing that I discovered while testing this out is that someone else can call my DID while I'm on the phone and place their own independent phone call. There are conferencing options, but with just the one line I used in the extensions.conf, a bunch of people can all call in then make outbound calls at the same time. I tried it out briefly and the calls both went through my SuSE box without noticeable problems. I'm going to wrap it up here for now, but maybe I'll write some more after I buy an ATA or clean up my configuration some more.
0
Your rating: None

Are you from Windsor, CA? If so, I am too!

Windsor, Ontario, Canada. So, yeah, Windsor, CA but not Windsor, CA. I've spent some time in California but Sonoma is as far north as I've been.