Least Cost Routing (LCR) with Asterisk and A2Billing

A2Billing is a great piece of call billing software for Asterisk. It can be integrated with FreePBX and used in lots of different ways.

I run my own Asterisk system with FreePBX and use a2billing to do least cost routing. It’s possible to import rate tables from many different voip providers and then let a2billing route the call based on the cheapest route.

One of the things you need to be aware of is that a2billing will route based on the ‘best matching’ rate. So, lets say you are trying to call +17061234567 and you have rate cards for 2 providers. If provider_a has a rate for +17061 at $0.02/min and provider_b has a rate for +1706 at $0.01/min, a2billing will choose the more expensive provider_a as the rate is a better match. This could require some manipulation of the rate tables to get things to work how you want.

As I said a2billing can also integrate with FreePBX so that you can pass all outgoing calls from FreePBX to A2Billing to allow it to do the routing. You also get the benefit of better CDR reports.

So, if you’re looking for something to do least cost routing for Asterisk then it might be worth checking out a2billing!

Updated sip proxy/registrar settings for callwithus.com

If you’re using sip to connect to callwithus then you need to make sure that you’re using the generic address sip.callwithus.com as your proxy/registrar.

From May 1st the other, more specific addresses, that used to work will stop accepting registrations (west.callwithus.com, east.callwithus.com, uk.callwithus.com)

See here for further details – http://www.callwithus.com/configuration

Hacking and securing your Asterisk server

I spent a little while playing with sipvicious today. This is a SIP scanner that can be used for scanning SIP servers – which obviousy includes Asterisk, Trixbox, Elastix, etc…

It’s not surpising that scanning for vulnerable SIP servers is on the increase – these sort of tools are really easy to use, and with the lure of making free phone calls at your expense it’s definitnely worth making sure that your PBX is secure.

Here’s what I did to scan one of my servers. The server is a Trixbox CE 2.6 server and I set up the following extensions for testing –

Continue reading

Using Future Nine with Asterisk in the UK

I’ve added Future Nine to the list of servers whose ping time I monitor. Even though they are a US based company they have a sip server in Europe and incoming numbers in the UK for only $5/month.

So if you’re in the UK/Europe and looking for a voip provider with competative prices it might be worth checking them out.

You can see the current ping from my servers to theirs here – http://sysadminman.net/uk-voip-vps-pings.html

SIP soft phone – using X-Lite with Asterisk

If you’re looking for a softphone to use with Asterisk X-Lite is great.  It works on both Windows and Linux, although the configuration screens are a little different on the different versions.

All you should need to get it working with Asterisk are the following settings  (screenshot from the Windows version) –

Continue reading

What can you do with Trixbox in a couple of hours?

EDIT – these test numbers are no longer functional

As a quick demonstration of what you can achieve with Trixbox in a couple of hours I have put together a demonstration phone system.

Trixbox uses Asterisk and FreePBX to provide a richly featured phone system that you can do lots of interesting things with.

For the demonstration I created a phone system with DDI numbers in the London and New York. These phone numbers are provided by future-nine.com.

If you would like do give it a go you can call the system using the following regular telephone numbers –

  • UK  xxxxxxxxxxxx
  • US  xxxxxxxxxxxx

The system comprises an automated voice menu with the following options –

  • Press 1 – for some music.
  • Press 2 – for a speaking clock that reads the time in the UK.
  • Press 3 – for an echo test. This will echo back everything you say to it, giving you an idea of the delay on the line.
  • Press 4 – to leave a voicemail. This will then be e-mailed to me as an e-mail attachment.
  • Press 5 – for some current news. This is produced by downloading the latest rss news feed from Yahoo and then converting it to speech using software from Cepstral. It’s certainly not perfect but gives an idea of what is possible. The audio is updated automatically every hour. The main IVR menu speech was also created using Cepstral.

The whole process from ordering the phone numbers from future-nine, to having a functioning phone system, took only a couple of hours and the only part that is not possible to perform via the web gui was downloading and converting the news feed.

As FreePBX forms the basis of most of the Asterisk distributions is just as easy to do the same with Trixbox, Elastix or PBX in a Flash.

Please give it a go and add a comment below to let me know how you get on.

If you’d like more information about virtual PBXs from Sysadminman then click here

Getting started with A2Billing – Part 5 Importing a ratecard

When I setup my ratecard here I only created 1 rate to Leicester in the UK. Ok for testing but not much use in the real world! So how are we going to enter all of the rates we need – the answer is to import them. Many ITSP (Internet Telephony Service Providers) publish a rate file that you can download. I’m going to use the callwithus (my provider) rate file that you can download from here.

Continue reading

Getting started with A2Billing – Part 4 Creating a customer and making a call

So we’ve created a trunk to make calls through here, we’ve created a ratecard and call plan here and we’ve created an access phone number here so we’re finally ready to create a customer!

Creating a calling card customer

Click on CUSTOMERS on the left hand menu

Click Create Customers

We get a big list of options but the only things we need to set are –

BALANCE – set the inital balance for the customer

CALL PLAN – ensure the call plan is set to the one we created here

LASTNAME & FIRSTNAME – not required but definitely useful!

Then click on CONFIRM DATA

Continue reading