Clustering SIP servers with Asterisk

I’ve been considering I should make my VoIP systems more redundant. At present its just a single Asterisk installation on a Jumba Virtuzzo VPS account. While many have laughed at me for doing this, the reality is this Asterisk rig has supported about 50 users for several years with very few hiccups. If Jumba for what ever reason fall over, my pure VoIP telephone goes offline. In an ideal world I’d have auto-failover with hosting from several different providers in Sydney (so latency remains really low while redundancy is really good).

I’ve been considering how this can be pulled off, but I think playing with it over the Christmas period will be the best plan so any downtime doesn’t affect business (as business is closed anyway).

My thoughts are that multiple Asterisk installs would run with a few different tasks. One task would be SIP registration where 1 to 3 machines would continually register to SIP providers like Exetel and Pennytel, and when any inbound call is received, try to dial it locally, if not use IAX to try dialling on every other Asterisk node. Another task would be SIP registration with end users where a number of nodes would be mentioned in DNS A and SRV records.

The real magic I’ll have to work on is a macro for the Asterisk dial plan, so that we can replace Dial(SIP/somedestination) with a routine that will attempt that destination on every node in the cluster before producing a failed result. But I can’t see any reason as to why this isn’t possible.

The complicated thing with day to day administration will be duplicating the same configurations on every node in the cluster. Perhaps at a later date the development of some scripts to assist would be beneficial. Naturally I’ll be blogging about this adventure as it progresses.

Another note on VoIP – today I changed my POST 15 VoIP plan with Exetel to the $5 per month plan. I also recharged my Pennytel account and am now using Exetel as a primary provider with the alaw & ulaw codecs and Pennytel for calls to mobiles and 1300 numbers with the g729 codec. I noticed there are some decent differences in price with this operation.

The disadvantages of Exigent VPS accounts

I signed up for a $10 VPS account and put Exigent through a few runs and I must say I’m not very impressed.

First of all there are a couple hidden charges with Exigent. If an invoice goes overdue, they’ll suspend your VPS just the same as any provider, but charge you a $35 late fee.

Last night there was also a scheduled outage as Exigent planned a reboot of their VPS servers. That all went to plan ok. But it would have been nice if Exigent restarted VPS containers, instead waiting for me to action a boot of my VPS.

And finally there is the memory weirdness. Fair enough, at Jumba my VPS with 512MB of memory did not offer enough to run LAMP (Linux + Apache + MySQL + PHP) and a full fledged e-mail server with amavisd-new and spamd for filtering. The moment I setup amavisd-new I found the Jumba VPS would frequently have killed processes and crashed services etc. So I got the Exigent account simply for running an e-mail server. And guess what, with 1GB or double the memory, I still can’t run a full fledged e-mail server. Comparing the memory consumption between the Jumba and Exigent accounts demonstrates that the Exigent account requires more memory to run the same services with the same software versions. I’m yet to find an explanation as to why.

Over the Christmas period I’ll have to either figure out the memory issues I have with Exigent, or discontinue them.

eCommerce Inspiration

The launch of my eBook store in the past week has inspired me about a few other future projects.

A primary goal of the eBook store project wasn’t even to turn over a profit, it was to test and operate a store with very basic needs on its eCommerce package in order to gain experience.

Because of this experience I’ve realized quite a few things about Zen Cart and how I can make it work for my computer hardware business.

I’ll have to test a rig on how I can easily maintain thousands of products by using supplier pricelist files, over the Christmas break. If that works out well then I’ll just have to spend a stack of time photographing and writing descriptions on products.

I may even have to buy something like StoreManager for Zen Cart for the huge job of product data entry.

The launch of my eBook store

I launched my eBook store a few days ago that I blogged about previously. Today I had my very first sale. Sure it was only $20 but I’m still excited because every sale is just profit, and the entire sale is automated. My only cost is developing the site.

I feel the project is working as planned because in a week I’ve gone from no website to achieving quite a few tasks:

  • Installed Zen Cart
  • Found a template and modified the crap out of it with my own logos, favicon.ico, etc.
  • Setup up the PayPal modules to automate the payment process easily
  • Inspected the product download systems to ensure security of the products
  • Figured out how to provide product images to Zen Cart
  • Submitted an XML sitemap to Google which ultimately was the only links to the website
  • Several days later after getting indexed in Google, having several specific keyword hits from Google where my website appears in the top 3 results for those search terms. Additionally for those keywords my website is certainly the most relevant result Google returns so I’m predicting the ranking will only go up

So far I’ve only added about one third of the total product range. I plan on investing all profits from this project for at least the first 6 months in product expansion. However it seems the challenge with this project is it may quickly become a full time occupation. Then again it may not, because I don’t really know the depth of the market and probably nobody does due to how unique the market actually is.

Depending on how sales actually unfold I may even invest in some online advertising but at this point that seems unnecessary due to the extremely good search ranking I’ve achieved very quickly at no cost. Perhaps with some of the products I intend to expand my range with, I may need to invest in advertising in order to bust into these markets.

I did actually manage to track down a single competitor. They also run Zen Cart except with a default theme and have quite a clunky website. Running the same scripts I’ve quickly out-ranked them on Google through the use of good design and the XML sitemap likely made a significant dent.

I should also make it clear that I won’t mention the name of this website because the topics I discuss with that business could potentially be useful to competitors, but I am trying to blog about it in a way that inspires thinking outside the box for new business ideas.

Get 10GB of Dropbox free for life

dropboxMany people use Dropbox these days because its a handy file sync tool. However the paid service is quite pricey at either $10 per month or $100 per year for their 50GB package.

The free 2GB package is well used. You can get 250MB of extra space for every person you refer, up to 8GB. In other words, you can have up to 10GB of space for free through referrals.

And it also happens that Google Adwords are giving away $75 free advertising coupons like they’re candy.

Combine the two, and you can run an Adwords campaign for Dropbox using your referral link for free. As people sign up, you get bonus space.

I just did it myself, and for about 2 days nothing happened. Then tonight all of a sudden 10 referrals have rolled in as Google have activated my ad campaign. I guess I’m staying up until I get up to my 8GB which should be very soon.

The following video is a good guide on how to do this yourself:

Exetel Hardware Store strangeness

It came to my attention today that the Exetel hardware store has some unusual pricing for agents right now.

Exetel became my primary supplier for Netcomm hardware as they could offer me a price far better than any other supplier. Like every other supplier of Netcomm hardware, they don’t handle warranties themselves, but Netcomm when contacted directly can handle any warranty issues.

Exetel were operating under the idea that offering lower priced modems to agents will reduce the technical support required by customers as the agent can take care of these issues.

However right now the agent pricing is in fact higher than the retail pricing. So a customer is more inclined to buy modems directly from Exetel instead of their agent. Either way the agent will likely see the customer for technical support. So its probably the latest example of Exetel cutting back on their revenues offered to agents.

I don’t mind if Exetel really need to do this – but some notification & discussion on the issue, and not just dictation of "how it is”, would be more preferred.

Formatting images for Zen Cart

I found it hard to get my head around how to do this mainly because the Zen Cart documentation on the subject really sux.

Adding images to products is a very standard thing – every product should have at least one image to represent the product. However because the image is displayed in a number of different sizes, you need to provide several different images in the appropriate sizes.

Product images are displayed in 3 forms. Small, Medium & Large. Small images should be no more than 100×80 pixels. Medium images should be no more than 150×120 pixels. Large images can really be any dimensions however for consistency I make them no larger than 500×400 pixels.

The images should be JPG, GIF or PNG.

The best method to upload is via FTP into your /images directory. The Zen Cart admin page can upload images however it’ll only do one and not the 3 formats required. It also won’t do multiple images for a product (on top of the 3 different formats).

When you upload your small image the path should be prefixed with /images. When you upload your medium image the path should be prefixed with /images/medium. When you upload your large image the path should be prefixed with /images/large. Medium and large images should also have _MED and _LRG in their file names.

So, a complete set for the file product.jpg would look like:

/images/product.jpg – 100×80 pixels
/images/medium/product_MED.jpg – 150×120 pixels
/images/large/product_LRG.jpg – 500×400 pixels

Also for reference, categories and manufacturers have their own dimensions. Categories should only have a single image sized to no more than 100×57 pixels. Manufacturers should only have a single image sized to no more than 100×80 pixels (same size as a small product image).

Zen Cart is really awesome

zen-cartSometime between now and the next week I’ll be launching a new ecommerce site. Over some time I’ve collected a bunch of eBooks that are not subjected to copyrights and are in fact very rare and difficult to obtain. The author refuses to sell them to people, however gives me free access to these eBooks and allows me rights to resell these eBooks to my customers.

So in order to make the most of this I thought I’d do what nobody with access to these eBooks has done, and sell them online.

I used Zen Cart for this project.

Out of the box Zen Cart has PayPal Express Checkout and support for downloadable products. I then found a template, modified it a bit with my own logo etc., modified a few pages in Zen so they had all the appropriate information, and now finally I’m working on submitting all these eBooks as products. It would also be nice to get some XML sitemaps up so Google can crawl the site a bit better, and SEO friendly URLs.

I really like this running an eBook store idea because it means that every purchase is pure profits. The actual expenses of hosting the website are already there as I pay hosting for other websites and the same infrastructure can run this new project – so the only real costs is the domain name which will easily be paid for by the very first sale.

Expanding the business seems easy too. I have a couple of thoughts on where to obtain some rare books where I have rights to redistribute them in eBook form – and buying these rights will only cost me around the same amount I’d charge to sell the eBook format anyway.

So essentially there are no costs to operating this business, and the business should always cover its own expenses for expansion.

Also because I haven’t actually operated an eCommerce site, this project serves as a good test case for eCommerce sites, as its needs are essentially all included in the Zen Cart package.

Exetel’s new small business offering on Optus ADSL2+

Exetel sent me an e-mail on Wednesday about a new product they have for small businesses in areas serviced by the Optus ADSL2+ network. At the time pricing hadn’t been published however now it is.

The plans start at $59 per month and include a Netcomm device that is NBN capable, VoIP capable & has failover to Wireless Broadband with a 1GB service included in the package.


Date: Wed, 30 Nov 2011 09:30:24 +1100
Subject: New Small Business Offering
From: Exetel Agent Sales <agentsales@exetel.com.au>

We are in the late stages of offering a small business plan for those businesses that can get an Optus ADSL service.

We will base it on the Netcomm box that has both an ADSL and a fibre connection port and has the capability of housing a wireless broadband (low cost) dongle and has ATA capability built in.

The new Optus plan will be designated as B33and will provide unlimited ADSL downloads with the ability to switch to wireless if the ADSL service fails and to operate over wireless at no charge while the ADSL service is non-functional.

There will be an option to acquire the Netcomm box, dongle, SIM and VoIP handset at no upfront cost on a 12 month or 24 month plan and the ability to switch from Optus ADSL to NBNCo fibre when/if it becomes available for whatever is the, then, published NBNCo install cost with no retail markup from the NBNCo wholesale published price.

We would welcome any suggestions on how to make this business service as attractive as possible