Trixbox 2.0 install guide for dummies

From New Zealand VoIP Users Group

Jump to: navigation, search
Request for cleanup: This page has been marked as requiring cleanup. Please see its talk page for details of why. You can help the project by cleaning up all or part of this article. If you clean this article up in full, please remove this notice.

Contents

Overview

This tutorial will set up the following voice services on Asterisk under Trixbox 2.0:

  • A plain old New Zealand landline
  • WorldxChange's VFX VoIP service
  • A freecall.com SIP line, giving free calls to landlines in many countries*
  • A gizmoproject.com SIP line (recieve calls to your Gizmo ID name)
  • You will be able to call USA toll-free numbers (1800, 1866, 1877)
  • You will be able to directly dial SIP numbers on many networks**

And yes, thanks for the feedback already, I know this is a big long guide - but it is pretty much a complete walkthrough to get a very capable system going, and designed to allow just about anyone to get this up and running, regardless of experience. You could just as easily have any combination of supported providers and equipment - for instance, you could have 2 x iTalk SIP trunks, and freecall.com, and not need any trunk cards (that scenario would work totally in a VM). Good luck :-)

WHEN YOU SEE A PERIOD/FULLSTOP/DOT (ONE OF THESE " . ") IN A LIST OF THINGS TO ENTER IN A CONFIG, YOU NEED TO ENTER IT. ITS AN IMPORTANT WILDCARD CHARACTER IN TRIXBOX.

  • Australia, USA, New Zealand, United Kingdom / England, Austria, Belgium, Canada (+free mobile), Czech Republic, France, Germany, Hong Kong, Hungary, Ireland, Italy, Luxembourg, Malaysia, Monaco, Netherlands, Norway, Panama, Portugal, Puerto Rico, The Russian Federation, Singapore, South Korea, Spain, Sweden, Switzerland & Taiwan. The quality, availability and reliability of free calls can be low. For anything more than occasional personal use, a provider like Gizmo project or VFX is worthwhile for international calling. Gizmo charges only 2c USD a minute for USA national calls.
    • 1101. (IdeaSIP numbers), 1288. (Earthlink numbers), 1393. (FWD numbers), 1477. (iptel numbers), 1488. (Globalvillage numbers), 1577. (Naturalvoice numbers), 1588. (InPhonex numbers), 1677. (StealthTele numbers), 1700. (Iaxtel numbers).

This tutorial is written around use in New Zealand, but can easily be applied to any country. It is written assuming a user wants to use two x100p trunk cards, and a couple of SIP providers. It can easily be adapted to work with any combination of trunk cards and/or SIP trunks.

By ignoring the sections relating to POTS lines, wall jacks, x100p cards and VFX, and just following the SIP trunk instructions, you could configure any old PC without specialised equipment to work with any open SIP provider, including Freecall.com to get free calling to the above destinations. Its also relatively trivial to set up iTalks VoIP service on Asterisk.

On the Trixbox download page is a pre-made VM of Trixbox (requiring the free VMWare player) - this is great for SIP only setups, and will run on an existing Windows machine. Alternatively, the free Microsoft Virtual PC software will allow you to install Trixbox on a Windows machine too. Remember - if you run Trixbox/Asterisk in a Virtual Machine of any kind, you can ONLY use SIP trunks (freecall.com, iTalk). You cant use your normal landline under a VM, and at the time of writing, VFX is unable to be used directly via SIP in a VM (though they are working on it).

Despite the fact that there is a small amount of Linux commandline work to do, I will walk you through it STEP BY STEP - so dont let that put you off.

Requirements

For the standard lets-dedicate-a-machine-to-the-task approach, you will need...

  • Trixbox 2.0 ISO image burnt to CD http://www.trixbox.org/downloads
  • A PC dedicated to Asterisk/Trixbox with following minimum (recommended)
    • 400MHz (500MHz +) CPU
    • 128MB (256MB +) RAM
    • 2GB (6GB +) HDD
    • Network card
    • A connected & working VoIP connection using an ATA*
    • Trunk cards (2 x x100p or compatible) (**optional)
    • Monitor/Mouse/Keyboard (temporary)
    • Bootable CD-ROM (temporary)
    • An unlocked 'extension' ATA *** (to plug your home telephone into!)
    • A telephone (your normal home phone)
    • 2 x RJ11 to RJ11 telephone cords ****
    • 1 x standard telephone line cord *****


  • An ATA is the device your VoIP provider requires you to use to connect to their service, for example, a Linksys PAP2T. This tutorial will make Asterisk think the ATA is a plain ol telephone system.
    • An x100p card or similar, is required to plug into your telco provided wall jack, to get your POTS line (landline) working with Asterisk. For this exercise, I will also use an x100p card to plug into my VoIP providers (VFX) ATA. At the time of writing, VFX does not support a direct SIP trunk into Asterisk, without the use of intermediary hardware.
      • A Linksys PAP2T, even if locked to a provider, can be unlocked very easily, and is great for using with Asterisk to plug your phone ('extension') into. I put my Asterisk PC in the garage, and my PAP2T in the lounge. The calls to my phone travel over my home network (making a couple of WiFi hops along the way!)
        • These cords often come with modems or laptops, or can be bought at DSE cheaply (or online at TradeMe or similar). One is required to plug your telephone into the unlocked 'extension' ATA, and one is required to go between an x100p card and your VFX provisioned ATA.
          • The standard cord to plug your telephone into the wall will now be used to plug one of the x100p cards into the wall jack.

On your desktop or laptop (typically your everyday Windows/Linux/Mac PC), you should also install the Xten Lite softphone - its free, and its great as a software-based extension phone for testing internal calling, and troubleshooting problems.

Make sure your Trixbox PC can boot unassisted without a keyboard attached, most PCs have an option in the BIOS to enable boot without a keyboard, but some older ones cant.

You want a good working system, so dont use any parts that are known to be dodgy. Good cheap gear can be had online on auction sites, and you should be able to throw together a box for well under $100 NZD. I am running an AMD Duron 850MHz, 320MB RAM & 6GB HDD.

Make sure the hard drive has no valuable information on it. It will be completely wiped.

Hardware Preparation

  • Unplug the power cord from the PC.
  • Install all hardware, including x100p cards.
  • Plug an RJ11<>RJ11 cable from one x100p card into line 1 of your connected & working VFX ATA (could be a provisioned PAP2 or a WAG54GP2 or an SPA3102 or similar) (only required for service providers that use a 'locked down' device to connect to their network).
  • Plug a standard telephone cable from the other x100p card into your landline wall jack.
  • Plug all cables in (ethernet, monitor, keyboard, mouse, phone cords, power)
  • Insert the Trixbox 2.0 CD into the drive.
  • Boot the PC from the CD-ROM.

Software install

  • At the Trixbox prompt, press enter to install.
  • Accept all defaults offered.
  • Write down the 'root' password you are asked to enter.
  • Wait for the install (can take some time).
  • The PC will normally eject the CD, at which point you should reboot the computer. If you come back to it to find the orginal Trixbox screen asking you to install, just remove the CD, and reboot the PC. The first boot can take quite a long time as well.

Initial config

  • You will be presented with a login prompt, your login name is 'root' and your password is written on a piece of paper next to you.
  • Login. Note that the Linux password prompt stays blank as you type - this is a security measure.
  • Type 'netconfig' and enter a valid static IP address on your LAN. If your modem is 192.168.0.1 you could choose 192.168.0.100, netmask 255.255.255.0, gateway is 192.168.0.1 (or whatever your modems address is). Your primary nameserver would also normally be your modems address.
  • Type 'yum -y update' and press enter. This will update and patch the underlying CentOS Linux system. This may take some time, and requires your internet connection to be working.
  • Type 'trixbox-update.sh' and accept any prompts.
  • Type 'genzaptelconf' and press enter (only if you have x100p cards installed)
  • Type 'passwd-maint' and enter, create master password for web-gui (same as root password is okay if you are the only person logging in).
  • Type 'passwd-amp' and enter, create password for the Asterisk management portal (AMP).
  • Type 'passwd-meetme' and enter, create password for the Web Meetme function.
  • Type 'passwd admin' and enter, create password for checking system mail.
  • Lets reboot for good measure - type 'shutdown -r now' and press enter (the '-r' tells the system that it should reboot).

Thats basically it for initial install, and you no longer need your monitor, mouse and keyboard. If you ever need to log into the commandline interface again, you can just use an SSH client like 'Putty' (which is free!, just download, run, and enter your Trixbox IP address, login as 'root'), and everything you saw just now, can be seen and done from your PC desktop.

The rest of our setup will be done with a web browser.

Logging into the web based GUI

  • On your desktop PC, start your weapon of choice (IE6, IE7, Firefox, Safari, whatever).
  • In the address bar, enter the static IP address you assigned to your Trixbox. (Mine was 192.168.0.101), and press enter.
  • Top right of the screen says 'User mode' - click 'switch'. Username is 'maint', password is whatever you defined earlier for passwd-maint.
  • Click Asterisk > FreePBX.
  • Click Tools > Module Admin
  • Click Ring groups > Install > Process > Confirm > Return
  • Note the bright red 'Apply configuration changes'. Whenever you make a change, no matter how minor, it wont affect anything until you have clicked this box to commit the changes into the system. [TAKE NOTE OF THIS!!!]
  • Click Setup

Configure your trunks

Telecom New Zealand PSTN (landline, via a trunk card)

  • Click 'Trunks'.
  • Click 'Trunk ZAP/g0' (on the right hand side)
  • Outbound caller id - [your telecom landline number**]
  • Max channels - '1'
  • Click 'Submit changes'

WorldxChange VFX VoIP Service (via a trunk card AND a connected working VFX device)

  • Click 'Trunks'.
  • Click 'Add ZAP Trunk'
  • Outbound caller id - [your VFX number**]
  • Max channels - '1'
  • Zap Identifier - 'g1'
  • Click 'Submit changes'
    • You may find that these are round the wrong way! Some outbound calling to your mobile to establish caller id will soon let you know - you may just have to swap the outbound caller id numbers, and take note of which trunk (g0 or g1) is your Telecom or your VFX trunk.

Freecall.com VoIP Service

  • Go to http://www.freecall.com
  • Download their free software (only to gain an account - installing is the only way to get one)
  • Install their software, sign up for a free account, uninstall their software (if desired).
  • Click 'Trunks'
  • Click 'Add SIP Trunk'
  • Max Channels - '1'
  • In PEER DETAILS enter:
o host=sip.voiparound.com
o secret=YOURPASSWORD
o type=peer
o username=YOURUSERNAME
  • Delete 'USER Details'
  • Click 'Submit changes'
  • The service is limited to 300 free minutes in any seven day period (thats 5 hours a week free calling!).

Gizmoproject.com VoIP Service

  • Go to http://www.gizmoproject.com
  • Install their software, sign up for a free account, uninstall their software (if desired).
  • Login to the website with your new login details, and find your SIP number ('1747something')
  • Click 'Trunks'
  • Click 'Add SIP Trunk'
  • Outbound caller id - [your '1747xxxxxxxx' number]
  • Max Channels - '1'
  • In Dial rules, enter:
  • *+1866.
  • *+1877.
  • (If you have a positive account balance with gizmo project, then leaving the above dial rules empty will result in a higher quality call to those prefixes, for a minimal charge.)
  • In PEER DETAILS enter:
o allow=ulaw&alaw&ilbc
o canreinvite=no
o context=default
o disallow=all
o dtmfmode=rfc2833
o host=proxy01.sipphone.com
o insecure=very
o secret=[your gizmo project password]
o type=friend
o username=174xxxxxxxx
  • User context 'default'
  • In USER DETAILS enter:
o secret=[your gizmo project password]
o type=friend
o context=from-pstn
  • Click 'Submit changes'
  • Register string - '1747xxxxxxx:password@proxy01.sipphone.com' (e.g. '17471234567:banderainte89@proxy01.sipphone.com')

Configure your extensions

  • Click 'Extensions', choose 'SIP', click 'Next'.
  • User extension - '100' (then 101, 102, 103, etc etc)
  • Display name - 'desktop' (or lounge, or bedroom etc etc)
  • Secret - [choose a password for this extension].
  • Click 'Submit'.
  • Click 'Apply configuration changes' (the big red box!).

Repeat this for as many extensions as you want, including softphones, and real telephones. Having a softphone running on your PC is great, as every time you get a phone call, your desktop softphone will show you the caller id (even if you actually answer your calls on a normal telephone).

I have these extensions:

  • desktop (100) (for my desktop PC softphone)
  • dualphone (101) (my Cordless Dualphone plugged into the PAP2T ATA - line 1)
  • doro (102) (my Doro cordless phone plugged into the PAP2T ATA - line 2)
  • server (103) (a softphone on a server in the garage - always handy if out there and need to test things)
  • laptop (104) (a softphone on my laptop)

Configure X-Lite Softphone (freeware)

  • Download and install X-Lite http://www.counterpath.com/index.php?menu=download
  • Add a new SIP account.
  • Display name - [display name for that extension - e.g. 'laptop']
  • User name - [extension number - e.g. '104']
  • Password - [duh!]
  • Authorisation user name - [same as extension number - e.g. '104']
  • Domain - [static ip address of Trixbox - e.g. 192.168.0.100]
  • Domain proxy - tick 'register with domain and recieve incoming calls'
  • Select 'proxy' and enter Trixbox static ip address [192.168.0.100]
  • Click 'Ok' - Thats the softphone all set to go. Repeat this on any other PCs you want.

Configure a PAP2T to use as extensions in the home

  • Plug the PAP2T into your network with an ethernet cable.
  • If you need to reset or unlock it, plug a phone into line 1 on the back, and pick up and dial '****RESET#' ('****73738#'), and press '1' to confirm, then hangup. THIS WIPES OUT **ALL** SETTINGS ON YOUR PAP2T AND RENDERS IT FULLY UNLOCKED.
  • Pick up again, and dial '****110#' and note down the IP address given, then hang up.
  • Enter that IP address into your web browser.
  • Click 'Admin login'.
  • DHCP - 'no'
  • Static IP - [choose something free on your network - mine is 192.168.0.102]
  • Gateway - [your gateway/modem - mine is 192.168.0.1]
  • Netmask - '255.255.255.0' (unless you know yours is different).
  • After about 30 seconds, enter the new static IP you just created into your web browser. You should be logged into the PAP2T again.
  • Click 'Admin login' then 'Line 1'
  • Proxy - [Your trixbox IP address - mine is 192.168.0.101]
  • Display name - [the text name of the extension you want this line to be - mine is 'doro']
  • User ID - [the extension number that matches the name - mine is '102']
  • Password - [duh!]
  • Click 'Save Settings'
  • Click 'Admin login' then 'Line 2'
  • Proxy - [Your trixbox IP address - mine is 192.168.0.101]
  • Display name - [the text name of the extension you want this line to be - mine is 'dualphone']
  • User ID - [the extension number that matches the name - mine is '101']
  • Password - [duh!]
  • Click 'Save Settings'

Configure a Ring Group in Trixbox (to make all your phones ring at once on incoming calls)

  • On your desktop PC, start your weapon of choice (IE6, IE7, Firefox, Safari, whatever).
  • In the address bar, enter the static IP address you assigned to your Trixbox. (Mine was 192.168.0.101), and press enter.
  • Top right of the screen says 'User mode' - click 'switch'. Username is 'maint', password is whatever you defined earlier for passwd-maint.
  • Click Asterisk > FreePBX.
  • Click Tools > Module Admin
  • Click 'Ring Groups'
  • Ring Group Number - '600'
  • Description - 'everyone'
  • Ring strategy - 'ringall'
  • Extension list - [all your extension numbers, one per line]
  • Ring time - '60'
  • Destination if no answer - [choose where the call will go]
  • Click 'Submit Changes'

Configure an Inbound Route

  • Click 'Inbound Routes'
  • Scroll to 'Set Destination' and select 'everyone <600>'
  • Leave all other fields here blank!

A huge cause of inbound calling not working is not having a valid inbound route! You should always have at least one inbound route set to catch any call on any line with any CID that hasnt been picked up by another inbound route. (e.g. a blank rule, with a destination which hits at least your main extension!)

Configure some outbound routes

Heres where Asterisk really starts to get interesting. We will configure some basic outbound routes here, but you can really send any call anywhere based on simple rules (e.g. if I dial 091234566, use the VFX trunk, the free trunk, or the Telecom trunk, in that order. Or, if I dial '111' only use the Telecom trunk or the VFX trunk in that order.)

Emergency Dialling Outbound Route

  • Click 'Outbound Routes'.
  • Route name - '111'
  • Dial patterns - '111.' This will pick up any dialling sequence starting with '111', your Trunk sequence should include only lines that support 111. Mine is my Telecom landline, followed by my VFX VoIP line.

Local Outbound Route

  • Click 'Outbound Routes'.
  • Route name - 'local'
  • Dial patterns - '8.' the 8 picks up any local numbers (all my local area numbers start with '8' you might have a couple of lines with different numbers to enter here, dont forget the period '.' after the number to act as a wildcard). All local calls therefore, will now follow this route, unless another route EARLIER IN THE ROUTES LIST matches the dialling sequence.
  • For the trunk sequence, select lines that support free local calling for you. Mine is Telecom, then VFX (both are free, it doesnt matter to me which one gets used).

National Outbound Route

  • Click 'Outbound Routes'.
  • Route name - 'national'
  • Route password - (enter a numeric password to prevent flatmates, visitors making national toll calls without you dialling a password for them).
  • Dial patterns -
  • 03Z.
  • 04Z.
  • 06Z.
  • 07Z.
  • 09Z.
  • The 'Z' equals any number between 1 and 9, therefore, this route will ignore 0900 numbers among other things.
  • Under trunk sequence, choose the order you want a trunk to be tried for this route (if at all). If freecall is working well for you, you might have freecall first, VFX's 5c a minute service second, and your landline third. If call quality is really important, you might have Telecom first, with VFX as a backup (unless you have QoS then VFX might be just as good, if not better.)

International Outbound Route

  • Click 'Outbound Routes'.
  • Route name - 'international'
  • Route password - (enter a numeric password to prevent flatmates, visitors making international toll calls without you dialling a password for them).
  • Dial patterns -
  • 00.
  • This will pick up any number starting with '00' (i.e. an international outbound call).
  • Under trunk sequence, choose the order you want a trunk to be tried for this route (if at all). If freecall is working well for you, you might have freecall first, VFX second, and your landline third. If call quality is really important, you might have Telecom first, with VFX as a backup.

0800 Outbound Route

  • Click 'Outbound Routes'.
  • Route name - '0800'
  • Dial patterns -
  • 0800.
  • 0508.
  • Under trunk sequence, choose the order you want a trunk to be tried for this route (if at all). You might have Telecom first, with VFX as a backup.

1800 Outbound Routes

  • Click 'Outbound Routes'.
  • Route name - '1800'
  • Dial patterns -
  • 1800.
  • Under trunk sequence, choose only 'freecall'. This will now allow you to pick up your home phone, and dial any USA based 1800 (toll free) number. (Just pick up and dial '1800whatever' - way cool!!)


  • Click 'Outbound Routes'.
  • Route name - '1800-alt' (this is lower quality 1866 and 1877 USA tollfree calls that freecall.com cant handle)
  • Dial patterns -
  • 1866.
  • 1877.
  • Under trunk sequence, choose only 'freecall'. This will now allow you to pick up your home phone, and dial any USA based 1866 or 1877 (toll free) number.
  • Note that we are going to add a command to the Gizmo trunk to allow these calls to be free, instead of Gizmos minimal charge, but the tradeoff is a generally lower quality of calls to these two prefixes! See the instructions in the Gizmo trunk setup for more info.

0900 outbound route

  • Click 'Outbound Routes'.
  • Route name - '0900'
  • Route password - (enter a numeric password to prevent flatmates, visitors making 0900 calls without you dialling a password for them).
  • Dial patterns -
  • 0900.
  • This will pick up any number starting with '0900'
  • Under trunk sequence, choose the order you want a trunk to be tried for this route (if at all). You might have Telecom first, with VFX as a backup.

Other routes

Lets say that you normally have national calls going through freecall, and the quality and latency is mediocre, but acceptable. But whenever you call your mom in Wellington, she cant deal with the latency, and the conversation is awkward. You could create an outbound route just for her number, and specify that it must use the VFX and/or Telecom trunk only. Place this rule BEFORE the 'national' route, and it will come into effect. You can move rules by clicking the arrows next to their names.

Here an example:

  • Click 'Outbound Routes'.
  • Route name - 'mom'
  • Dial patterns -
  • 042345678
  • This will pick up only your moms phone number.
  • Under trunk sequence, choose the order you want a trunk to be tried for this route (if at all). You might have Telecom first, with VFX as a backup.


Another route might be Telecoms freedom service. Lets say you normally route all outgoing mobile calls through VFX, but you have got freedom set up to call your partners mobile on the cheap ($10 a month flat rate), but it only works through the Telecom trunk.

Heres an example outbound route to handle that:

  • Click 'Outbound Routes'.
  • Route name - 'sallysmobile'
  • Dial patterns -
  • 0272345678
  • This will pick up only sallys mobile phone number when its dialled.
  • Under trunk sequence, select only the Telecom trunk.
  • Make sure this route appears BEFORE any other route that handles cellphone calls.


Outbound route for Gizmo project SIP calls

  • Click 'Outbound Routes'.
  • Route name - 'gizmo'
  • Dial patterns - (do not enter the bracketed comments)
  • 1101. (IdeaSIP numbers)
  • 1288. (Earthlink numbers)
  • 1393. (FWD numbers)
  • 1477. (iptel numbers)
  • 1488. (Globalvillage numbers)
  • 1577. (Naturalvoice numbers)
  • 1588. (InPhonex numbers)
  • 1677. (StealthTele numbers)
  • 1700. (Iaxtel numbers)
  • Under trunk sequence, select only the Gizmo trunk.


Catchall Outbound Route

  • Click 'Outbound Routes'.
  • Route name - 'catchall'
  • Dial patterns -
  • .

This will pick up any number at all [('.') is a wildcard that matches anything], that a preceding outbound route has not handled. Under trunk sequence, choose the order you want a trunk to be tried for this route (if at all). You might have Telecom first, with VFX as a backup. Always make sure that this route is the LAST ONE IN THE LIST of outbound routes.

Make sure you click the 'Apply changes' box (nothing will work right until you do!)

You should now have a fully working system. Time to go and test your incoming and outgoing calling and other features. There are quite a few good guides on the net for various aspects of Trixbox, and the user forums here on Geekzone yield lots of information and enthusiasts willing to help out.

This guide creates a basic system that rings all your phones whenever any incoming call comes in, but its very easy to do things like:

  • If a call comes in on VFX during office hours, divert it out to my cellphone, and after hours, make it ring the lounge phone, but not the bedroom phone.
  • If a withheld id call arrives during the day, ring all phones in the house, but in the evenings, send these calls straight to voicemail.
  • If my cellphone rings in, pickup without ringing the home phones, and offer me a dialtone to call out on a cheap or free VoIP line (great way to abuse Telecoms freedom service).
  • If my best mate rings, ring all the home phones, and ring out to my cellphone at the same time - I dont want to miss that call!
  • If calls between 10pm and 7am arent from certain numbers, send them straight to voicemail.

Thats just a few examples of things you can EASILY set up with Trixbox! The limit is your imagination and your requirements.

Backup your fully working system before you go and start playing around too much!!

Please feel free to point out any factual, technical, or other errors!

Good luck, and feel free to ask for help!

This article was originally contributed by Tony Hughes

Personal tools