Using Asterisk on a VPS
I’ve been using Asterisk on my VPS from Tektonic for about 2 months now and I’ve been pretty impressed with how it’s been working. I’ve used Trixbox for the past couple of years (running on my home DSL line) but thought, as I was using a fairly minimal spec VPS, that I would just install Asterisk.
I’m on the $15 a month VPS plan which is 256MB ram and 10GB disk space. I’m also running a mail server on there so things were going to be fairly tight. Also, to make my life a little easier, I installed FreePBX which requires MySQL and Apache. I’m running Ubuntu Dapper 6.06 LTS Server.
I’m running version 1.4.13 of Asterisk and version 2.3.1 of FreePBX. Installation was fairly straight forward - there are plenty of resources on the web for setting things up. The only thing I really had to do was tweak the mysql.cnf so that MySQL used less memory than it normally would.
I mainly use my Asterisk box for making and receiving international calls to friends and family in the UK. I dial into the Asterisk box from my Verizon cell phone and then dial back out using one of my other SIP accounts. I have a SIP account with voicestick.com. I’m on their Next-2-Nothing plan which is a pay-as-you-go plan. You get a local DID number which enables me to dial in to my Asterisk box using a local US number. Inbound calls used to be free from Voicestick but they’ve just started charging a minimal amount, they also charge a small amount every month for taxes and 911 service but still very reasonable.
Another possibility may be to use T-mobile’s myFaves. This is where you nominate your 5 numbers and can make unlimited free calls to them. If you used your Voicestick DID number this should allow you to make free (cell phone) calls to you Asterisk box. The only reason I didn’t do this was because I couldn’t get T-mobile reception in a lot of places I go.
Most of my calls are to the UK and for outbound calls I use Sipgate. Again, I’m on their pay-as-you-go plan - which also includes a local UK number. This also allows people in the UK to dial my Sipgate number (at local rate) which connects to Asterisk box, this is then forwarded (via Voicestick) to my Verizon cell phone.
You would think that with all this bouncing round of calls on the Internet call quality would be awful, however, this is definitely not the case. Calls are nearly always extremely clear with very little lag. Most people can’t believe I’m calling from my cell phone - never mind over the Internet.
One issue with running Asterisk on a VPS is that you can’t compile the Zaptel ztdummy driver into the Linux kernel. This will stop you using music on hold and conferences. The only way round this would be to get your VPS from a specialist company (like here) that provide the ztdummy module in the kernel for you.
One nice thing that I can do now that I wasn’t able to when running Trixbox on my DSL line was set the option ‘canreinvite=yes’ on my trunks. This allows the Asterisk server to be taken ‘out of the loop’ when the call has been established. My 2 SIP providers just talk to each other, reducing latency on the call. This relies on the SIP providers using the same codec. All my calls use ulaw.
One obscure problem that I did run into (which nearly made me abandon the whole idea) was, when I first set the box up, after between 5 and 10 minutes of a call being established I would just get a loud, continous tone and the other end of the call would just get silence. I had to hang up and call the person back. There seemed to be no pattern to this and there were no errors being logged (even with very verbose SIP logging). What it turned out to be was that, the week I set my Asterisk VPS up, Sipgate had changed DTMF to rfc2833 (I can’t remember if it was info or inband before). Once I changed the setting of the trunk to rfc2833 the problem disappeared.
I’ve been really happy with Asterisk on my VPS and have saved lots of money (I could never have afforded to be able to stay in touch like I do) and the ability to have a local UK number that rings on my US cell phone is fantastic.
Related posts:
- Cheap international phone calls with Asterisk
- Sipgatge trunk with Asterisk/FreePBX
- Asterisk on Lylix VPS

Leave a comment