Trixbox v2.0beta

Complete setup guide for a small business

 

Trixbox v2.0beta is an all-inclusive Asterisk PBX solution that comes on a bootable CD.  It makes the process of bringing up a VoIP PBX solution a piece of cake.  This document details, step by step, how to install and configure Trixbox v2.0beta for a small business.  It includes information on how to set up extensions, incoming and outgoing phone calls, and other useful applications.

 

SureTeq is now an FtOCC authorized Trixbox support vendor.  We can provide remote support and troubleshooting, or we can design, implement and support your company's complete VoIP PBX solution.  Hourly rates and support contracts are available.  For pricing information and contact details, please email us.

 

- SureTeq now has a blog/RSS feed!  Subscribe to our blog for tips, tricks, news, and general information about all things Asterisk/Trixbox.  Click here for the SureTeq blog!

 

To download the PDF version of this document, please click here.

 

Not your version?  Click here to see the index of all SureTeq documentation! - Previous versions and other product documentation.
 

 

Table of contents

 

1.0 - Hardware platform used in the creation of this document

2.0 - Download and install Trixbox v2.0beta

3.0 - Seting up your server

    3.1 - Network configuration

    3.2 - Install Webmin

4.0 - Zaptel driver

5.0 - General Trixbox setup and security

6.0 - Module install

7.0 - Dial plan

8.0 - Configure internal extensions

    8.1 - Zaptel channels

    8.2 - Soft phone extensions

    8.3 - Endpoint Manager

9.0 - Outbound routes

    9.1 - Outbound route with default Zap trunk

    9.2 - VoIP Setup Wizard

    9.3 - VoicePulse

    9.4 - SellVOIP

    9.5 - VoIP Street

10.0 - Incoming calls/IVR setup

    10.1 - System recordings

    10.2 - Digital receptionist

    10.3 - Time conditions

    10.4 - Inbound route

11.0 - On hold music

12.0 - Forwarding calls to a cell phone / IAX2 setup

13.0 - Simple Queue setup

    13.1 Forward to cell phones queue

14.0 - Panel configuration

15.0 - Hud-lite configuration

16.0 - SugarCRM configuration

17.0 - Package manager ** New to v2.0beta

18.0 - Tools

    18.1 - Call Back
 

 

1.0 - Hardware platform used in the creation of this document

 

Installing on a Dell Dimension 9150

Intel 630 CPU (3.0GHz)

1GB RAM

 

Zaptel card:

Digium Developer’s kit (TDM 400P with 4 FXO modules)

Vonage line connected to one of the FXO modules

 


2.0 - Download and install Trixbox v2.0beta

 

*** NOTE:  v2.0beta is a beta version of the Trixbox product.  Caution should be used when placing a beta version of any product into production.  Be sure to test extensively before using Trixbox v2.0beta in a production environment.  For stable release documentation, please see the Trixbox v1.2 Setup Guide.

 

Download Trixbox v2.0 beta from SourceForge:

 

http://sourceforge.net/project/showfiles.php?group_id=123387&package_id=192286

 

Burn the ISO to a CD and boot to it

 

*** WARNING ***

This CD will completely destroy whatever data is on the computer you are booting to.  Make sure this is what you want to do before proceeding.

 

When Trixbox splash screen opens, hit Enter

 

*** NOTE:  Trixbox does not seem to work if you choose the i586 option...instead, just hit Enter and take the default mode.

 

For keyboard type, take default (US)

 

Select appropriate time zone and hit OK

 

Type in your root password twice and hit OK

 

System will now format and install Trixbox v2.0 beta

 

When the install finishes, the CD tray will open.  Remove the CD (or else it will start over).  System will reboot 2-3 times, and then you will end up at the login prompt. 

 

*** NOTE:  If the system does reboot with the CD still in, you can simply remove the CD and press CTRL+ALT+DEL at the Trixbox splash screen...it will continue normally upon the next reboot.

 

*** NOTE:  Sometimes the setup seems to freeze on 'munin-install' or 'munin-node-(version number).'  It is NOT actually frozen, so do not reboot or else the Trixbox install has not completed.  Go grab a cup of coffee because sometimes it takes 10-15 minutes for this part to complete successfully.

 

  Once the install has finished, log in as root with the root password you entered above.

 


3.0 - Setting up your server

3.1 - Network configuration

Set up IP address information by typing netconfig.

 

Select Yes when prompted about setting up networking.

 

Select to use DHCP if you want (not recommended) otherwise, enter in IP information for your Trixbox box.

 

I will use the following information for my home setup:

 

IP:  192.168.200.16

Netmask:  255.255.255.0

Gateway:  192.168.200.254

Primary nameserver:  4.2.2.2 (This is one of AT&T's public name servers.  If you have your own DNS server, enter it in this field).

 

Click OK and restart the network with ‘service network restart.’

 

Secondary nameserver – if you would like to add a secondary nameserver for backup DNS purposes, nano /etc/resolv.conf and add a line ‘nameserver (ip address)’ underneath the primary nameserver information.  My resolv.conf now looks like this:

 

nameserver 4.2.2.2

nameserver 4.2.2.1

 

To exit nano, hit 'CTRL+X' and then 'Y' when asked if you want to save.

 

3.2 - Install Webmin

 

Webmin is a valuable tool used for the configuration of Linux-based servers.  I install Webmin by default on all of my Linux boxes simply due to it's ease of use.  Webmin installs an HTTP-based GUI which you can get to by using port 10000 from a browser.

 

To install Webmin, you need to run the following command in your Linux CLI:

 

yum -y install webmin

Once the install has finished, you can get to your Webmin console by putting the following into a browser that exists on your LAN:

http://192.168.200.16:10000 (obviously, replace my IP with your Trixbox IP)
 

 

4.0 - Zaptel Driver

 

Setting up your Zaptel driver has typically been a problem with Trixbox v1.1 and earlier, however on 2.0, the only issue I ran into was that I had to manually run 'genzaptelconf.'  The genzaptelconf program successfully detected and configured my Zaptel card on the first try.

 

From command line do ‘ztcfg –vv’ – if there are no errors, you should get an output that says:

 

Zaptel Configuration

======================

 

 

Channel map:

 

Channel 01: FXO Kewlstart (Default) (Slaves: 01)

Channel 04: FXS Kewlstart (Default) (Slaves: 04)

 

2 channels configured.

 

Or similar based on your Zaptel hardware configuration.  The above output is from Digium's standard developer's kit TDM400.

 

*** NOTE:  If there are no channels showing up when doing 'ztcfg -vv', try running 'genzaptelconf' at the Linux CLI to see if it will detect your card.

 

*** NOTE:  If you are still having Zaptel driver issues, please follow the steps in my v1.1 Setup Guide, Chapter 4:  http://www.sureteq.com/asterisk/trixbox.htm#4.0_-_Zaptel_Issues

 

 


5.0 - General Trixbox Setup/Security

 

Now it is time to configure Asterisk/Trixbox

 

Using a web browser, connect to your new setup by typing in the IP address.  For my box, I will use http://192.168.200.16.

 

Enable SSL:

 

To enable SSL web browsing to the Trixbox web console, run the following commands from the Linux CLI:

 

yum -y install mod_ssl

service httpd restart

 

You can now connect to https://192.168.200.16.

 

Change default passwords:

 

You should see the Trixbox web console.  If you get ‘Page Can Not Be Displayed,’ go back and verify your IP settings.

 

Click on ‘System Admin.’  Enter the following info:

 

Username:  maint

Password:  password

 

First, let’s secure Trixbox.  On the command prompt, change the ‘admin’ password by typing ‘passwd admin’ and then put in a new password twice.

 

Update maint password by typingpasswd-maintat the command line.  Enter the password twice.

 

Update AMP password by typing 'passwd-amp' at the command line.  Enter the password twice.

 

Update meetme password by typing 'passwd-meetme' at the command line.  Enter the password twice.

 

Update all Cent-OS packages by typing 'yum -y update' at the command line.

 

Securing SSH:

 

This is an ***optional*** step, but I like to allow access via SSH2 only.

 

cd /etc/ssh

nano sshd_config

 

Find this section (should be just below the opening comments...about 12 lines down):

 

#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

 

Uncomment the first three lines and change them to this:

 

Port 22
Protocol 2

ListenAddress 192.168.200.16  #(your asterisk IP address)
#ListenAddress ::  (leave this commented out...unless you are using IPv6...which you are probably not).

 

Type 'CTRL+X' to exit nano and 'Y' to save changes.

 

From the Linux CLI, do:

 

service sshd restart

 

You can now connect to your Trixbox with SSH2 by using an SSH client such as PuTTY:  http://www.chiark.greenend.org.uk/~sgtatham/putty/

 

Changing Verbosity:

 

By default, Trixbox sets the Asterisk verbosity to 1 v.  This is usually not enough for seeing everything that is going on, so I typically prefer 3 v's.  Basically, this means that when starting asterisk, you will have an option for -vvv instead of only -v which allows you to see more of what's going on in your system.  For debugging, I usually set it to 10 v's...but for normal operations, 3 will suffice.

 

nano /usr/sbin/safe_asterisk


About 12 lines down, you will see a line that says:

 

ASTARGS="-v -g -p -U asterisk -G asterisk"

 

Notice that there is only 1 -v.  I will now change this to:

 

ASTARGS="-vvv -g -p -U asterisk -G asterisk"

 

CTRL+X to exit, and 'Y' when asked if you want to save.

 

Now do an 'amportal restart' and when you do 'asterisk -r' to connect to your Asterisk session, you should see:

 

Connected to Asterisk 1.2.12.1 currently running on asterisk1 (pid = 25378)
Verbosity is at least 3

 


6.0 - Module Install

 

Now to get into Asterisk and install some modules.  Modules are different software packages used by Asterisk for different applications.  For instance, if you want voice mail, you would install the Voicemail module.  This allows you to pick and choose your Asterisk features.

 

Click on System Admin and log in as 'maint.'  Then click on 'FreePBX' from the list of options, or choose Asterisk --> FreePBX.  Log in as 'maint' once again.  Once FreePBX has opened, click on ‘Tools’ in the upper right, and then ‘Module Admin’ on the left.

 

Before we do anything, let's update FreePBX to the latest version.  You will know whether or not you need to update FreePBX by clicking on 'Connect to Online Module Repository.'  If the first module available is 'Your freePBX is Out of Date. CLICK HERE' then you need to update it.  In the Linux CLI, do the following:

 

*** NOTE - There may be a newer version of FreePBX out than 2.1.3 by the time you are reading this.  Up to date update instructions are available at http://aussievoip.com.au/wiki/index.php?page=freePBX-Upgrading.

 

cd /usr/src

svn co https://svn.sourceforge.net/svnroot/amportal/freepbx/tags/2.1.3 freepbx-2.1.3

cd freepbx-2.1.3

./install_amp

 

Now reload FreePBX by exiting your browser and going back in.  Click on 'Tools' and then 'Module Admin' again.

 

Lets start with some basic modules (you can add and remove modules at any time).

 

Check the boxes next to Core, Feature Code Admin, Time Conditions, Voicemail, On Hold Music, IVR, Queues, Recordings and Backup & Restore.

 

Make sure ‘Enable Selected’ is in the drop-down box and click Submit.

 

See the red bar that just popped up at the top of the page?  Click on the red bar anytime you make changes.  This reloads the Asterisk configuration.

 

You can now click on ‘Setup’ in the upper right to get to the modules you have just activated.

 


7.0 - Dial Plan

 

Before we start configuring, we need to come up with a dial plan.  Basically, you want to map out exactly what you want your Trixbox to do prior to configuring it.  This will help guide you to the appropriate configuration.  Keep in mind that a Dial Plan is not something you configure in Asterisk...step away from the computer and pull out a piece of paper to design your Dial Plan.

 

I have 1 inbound Vonage line, and three extensions ready to be configured.  I like to use 1xx extensions internally, and for inbound, I want to set up some hours of operation so that I’m not bothered by clients after 7pm.  With this simple setup, my dial plan will look like this:

 

Inbound:

 

8:00am – 7:00pm – Go to main greeting (Thanks.wav).  Greeting states that:

            2 gets me (forwards to my cell phone)

            3 gets my business partner (forwards to his cell phone)

            4 to reach first available representative (round robin between our two cell phones)

 

7:00pm – 8:00am – Go to closed greeting (Closed.wav).  Greeting states that our office is closed, and to please call back between 8am and 7pm PST. 

 

Outbound:

 

All calls should be routed out the FXO port of my Digium TDM400 (my Vonage line).  – I may change this later to include my IAX line if the Vonage line is busy, but let’s keep it simple for now.

 

Internal extensions:

 

101 – Grandstream Budge Tone 100 SIP phone

102 – XTen X-Lite softphone on my Windows computer

111 – Cordless telephone that is connected to the FXS port of my Digium TDM400

 

That’s it for my dial plan…very simple.
 


8.0 - Configure Internal Extensions

 

8.1 - Zaptel extensions

 

I will start by setting up my extensions.  In FreePBX, click on ‘Setup’ and then ‘Extensions.’

 

We’ll start with my cordless phone (extension 111 – connected to my Digium TDM400).

 

Click on ‘ZAP’

 

I used these settings:

 

Extension number:  111

Display name:  Cordless

Direct DID:  <blank>

DID Alert Info:  <blank>

Outbound CID:  <blank>

Emergency CID:  <blank>

Record Incoming:  On Demand

Record Outgoing:  On Demand

Channel:  1

Voicemail & Directory:  Enabled

Voicemail password:  111 (same as extension number…keeping it simple)

Email address: (my email address)

Pager email address:  <blank>

Email attachment:  Yes (since I like getting the messages in my email)

Play CID:  No

Play Envelope:  No

Delete Vmail:  Yes  (this way, the voice mails are delivered to my email inbox only…if set to no, once I delete the emails, I also have to go into the voicemail and delete the voicemail manually)

Vm options:  <blank>

Vm context:  default

 

Hit ‘Submit’

Click the red bar to apply the options.

 

I now get a dial tone on my cordless phone.

 

8.2 - Soft phone extension

 

Next, we’ll set up a soft phone so that I can dial between internal extensions.

 

I use the X-Lite soft phone which can be downloaded from http://www.xten.com/index.php?menu=download.

 

In FreePBX, click on ‘Setup’ and then ‘Extensions.’

 

Click on ‘SIP.’

 

I used these settings:

 

Extension number:  102

Display name:  Soft phone

Direct DID:  <blank>

DID Alert Info:  <blank>

Outbound CID:  <blank>

Emergency CID:  <blank>

Record Incoming:  On Demand

Record Outgoing:  On Demand

Secret:  12345 (can be whatever you want)

Dtmfmode:  rfc2833

Voicemail & Directory:  Enabled

Voicemail password:  102

Email address: (my email address)

Pager email address:  <blank>

Email attachment:  Yes (since I like getting the messages in my email)

Play CID:  No

Play Envelope:  No

Delete Vmail:  Yes  (this way, the voice mails are delivered to my email inbox only…if set to no, once I delete the emails, I also have to go into the voicemail and delete the voicemail manually)

Vm options:  <blank>

Vm context:  default

 

Hit ‘Submit’

Click the red bar to apply the options.

 

Now to configure the X-Lite soft phone.

 

Upon first installing, the SIP configuration pops up automatically, otherwise, you can click on the down arrow at the top of the phone and choose ‘SIP Account Settings.’

 

Click ‘Add.’

 

Display Name:  Soft Phone

User Name:  102

Password:  12345 (my ‘secret’ from above)

Authorization user name:  102

Domain:  192.168.200.16 (your Trixbox IP address)

 

Domain Proxy

Register with domain and receive incoming calls (checked)

Target domain selected

 

 

Click OK.

 

Click Close on the SIP Accounts window.

 

I now try dialing my cordless phone x111 and it works!  From the cordless, I dial my Soft Phone x102 and it works as well.

 

8.3 - Endpoint Manager

 

Trixbox v2.0beta now comes with an endpoint manager which is really slick. 

 

I have a GrandStream GXP-2000 SIP phone on my desk and plugged into the network.  It DHCP'd to IP 192.168.200.101.  First, I connect to the phone's web server at http://192.168.200.101 (I believe the default password is 'admin') and click on 'Advanced Settings.'  Under the 'Firmware Upgrade and Provisioning:' section, change HTTP to TFTP and then change 'Firmware Server Path' and 'Config Server Path' to the IP address of your Trixbox.  In my case, I change it to 192.168.200.20.

 

Click 'Update' and then click 'Reboot.'

 

I now need to create an extension for my GXP-2000.  In FreePBX, click on ‘Setup’ and then ‘Extensions.’

 

Click on ‘SIP.’

 

I used these settings:

 

Extension number:  101

Display name:  GXP-2000

Direct DID:  <blank>

DID Alert Info:  <blank>

Outbound CID:  <blank>

Emergency CID:  <blank>

Record Incoming:  On Demand

Record Outgoing:  On Demand

Secret:  12345 (can be whatever you want)

Dtmfmode:  rfc2833

Voicemail & Directory:  Enabled

Voicemail password:  101

Email address: (my email address)

Pager email address:  <blank>

Email attachment:  Yes (since I like getting the messages in my email)

Play CID:  No

Play Envelope:  No

Delete Vmail:  Yes  (this way, the voice mails are delivered to my email inbox only…if set to no, once I delete the emails, I also have to go into the voicemail and delete the voicemail manually)

Vm options:  <blank>

Vm context:  default

 

Hit ‘Submit’

Click the red bar to apply the options.

 

Now let's set up the Endpoint Manager.  Mouseover 'Asterisk' and then select 'Endpoint Manager.'

 

The Endpoint Manager should have your network already filled into the 'Map Devices' section.  Click 'Go.'  It should come up with a list of your phones.  Click on the desired phone's MAC address and you are taken to the configuration screen:

 

 

For 'FreePBX Device ID:' select the extension you created above and then click 'Submit.'

 

OOPS - I got an error stating that it could not create the config file.  I need to go to the command line and run 'setup-grandstream.'  This will download the latest updates and firmware for my Grandstream phones.

 

Now, reboot your Grandstream phone, and it should get the latest updates from your Trixbox's TFTP server.

 

I select the GrandStream SIP extension I created above (101) and hit 'Submit.'  My GrandStream phone is now configured.

 

For the GrandStream GXP-2000's however, there is one more bit of picky configuration that is optional.  Once configured by the endpoint manager, I realized that there were a couple of annoying problems.  First, the LCD backlight was always on, and did not turn off after a minute or so.  Second, the time was not set correctly and appeared to be set to Eastern time (whereas I am on the West Coast).  To fix this, I had to edit the GrandStream default settings file that resides on the TFTP server of my v2.0 Trixbox. 

 

cd /tftpboot

nano Grandstream_GXP2000_Default.txt

 

Towards the bottom, there is a section called 'End User Time Settings.'  I changed the following:

 

# Time Zone. Offset in minutes to GMT
P64 = 180
 

(Not sure exactly how this works, even though my time zone is -8 GMT, 180 minutes set here made it accurate).

 

# Daylight Savings Time. 0 - no, 1 - yes
P75 = 1
 

# LCD Backlight Always On. 0 - no, 1 - yes
P322 = 0
 

# Display Clock instead of Date. 0 - no, 1 - yes
P123 = 1
 

(This one was simply personal preference...it displays the time large and the date small instead of vice versa).

 

Once changes have been made, reboot the phone to apply them.


 

 

9.0 - Outbound Routes

 

 

9.1 - Outbound route with default Zap trunk

 

Now that we have set up our internal extensions, let’s focus on getting calls out.  To do this, in FreePBX, click on 'Setup Outbound Routes.' 

 

By default, Trixbox has already created a trunk out of my FXO port in the Digium TDM400 card (trunk Zap/g0), and has already created a route which makes the user dial 9 to get an outside line (0 9_outside).  Lets click on the ‘0 9_outside’ route on the right hand side of the screen and add a few more dial patterns for outbound dialing.

 

The only dial pattern so far should be ‘9|.’  Under Dial Patterns, you should see ‘Insert.’  This allows you to insert pre-defined dial patterns for commonly dialed numbers.  I picked the following patterns:

 

Local 7/10 digit

Toll Free

Information

Emergency

 

Click ‘Submit Changes’

Click the red bar at the top of the screen to apply the changes.

 

My Dial Pattern for route 0 9_outside now looks like this:

 

311

411

911

1800NXXXXXX

1866NXXXXXX

1877NXXXXXX

1888NXXXXXX

9|.

NXXNXXXXXX

NXXXXXX

 

I try dialing my cell phone with my cordless x111, and it works!

9.2 - VoIP Setup Wizard

Since I only have a single Vonage line, if I want to be on more than one call at a time I'll have a problem.  To fix this, I'll need to set up a VoIP provider to allow me to make calls through my broadband connection.  Trixbox has two ways to do this...the first is through modules, and the second is with the VoIP Setup Wizard.

Let's go through the process of setting up some of the included VoIP providers in Trixbox v2.0.  There are 3 separate providers included and ready for setup.  VoicePulse, SellVOIP, and VoIP Street.

9.3 - VoicePulse

To set up a VoicePulse trunk, first you need to install the VoicePulse module.  Mouseover 'Asterisk' and choose 'FreePBX.'  Check the box next to VoicePulse in the 'Not Installed Local Modules' section and click 'Submit.'  Your module is now installed.  Click on 'Setup' and then 'VoicePulse.'

First, create an account with VoicePulse by clicking on the 'VoicePulse Connect for Asterisk' link.  Once you have your login information, log into the VoicePulse website and click on 'APIs' in the top navigation bar.  You should see your API key.  Copy it to your clipboard and then go back to the VoicePulse module.  Paste the API key into the 'API Key:' field and click 'Test.'  If all is well, you are now taken to the VoicePulse Connect for Asterisk Auto-Configuration page.  Click 'Configure.'

Click the red bar at the top of the screen when it appears.  The VoicePulse configuration is now complete.  You will notice that VoicePulse added two IAX2 trunks and two SIP trunks in the 'Trunks' section, and a 'VoicePulseOut' route in your Outbound Routes section.  Let's test it out!

I set the VoicePulse trunks as my only outbound route and try dialing my cell phone in 10 digit format (91NXXNXXXXXX), and it works!  But 7 digit dialing does not work by default, so let's fix that.

Click on 'Trunks' and then 'IAX2/VoicePulse1.'  In the 'Dial Pattern' field, I am going to add my local dialing pattern.  My area code is 818, so I add 1818+NXXXXXX.  This tells the VoicePulse trunk to add 1818 to any number dialed in 7 digit format.  Click 'Submit' and then click the red bar at the top of the screen.  Repeat this for the remaining 3 VoicePulse trunks.

I test again with 7 digit dialing and it works!  My VoicePulse trunk is now configured.

9.4 - SellVOIP

To set up SellVOIP first mouseover 'Asterisk' and select 'VOIP Setup Wizard.'  Then click on 'SellVOIP.'

Click on 'SellVOIP' again, and you are taken to their site to sign up for an account.  Once you sign up and receive your account information, click on 'Continue' to proceed.  This will install the SellVOIP module and give you a link for launching that module.  Click on it to proceed.

You are then taken to the SellVOIP Auto-Configuration wizard.

Enter in the Account Portal username and password you received from SellVOIP and click 'Log In.'  Your Account Number(s) will be displayed along with some information on what the module will be configuring within your Trixbox.  Click 'Configure' next to the desired Account Number to continue.  Then click the red bar at the top of the screen to apply the changes.

You should now see that the SellVOIP module created 5 trunks for outbound use as well as a new outbound route called 'SellVOIPOut.'  If you click on the SellVOIPOut outbound route, you will see that it also added the SellVOIP trunks to this route in descending order, and created a dial plan for local, international and toll free calls.  If you purchased a DID number, you should also see that this has been set up as an extension under 'Extensions.' 

Time to start testing.

First, I try dialing my cell phone in 10 digit format (91NXXNXXXXXX), and it works perfectly.  I now try dialing my cell phone in 7 digit format (NXXXXXX), and I get an 'All circuits are busy now' because it doesn't know my local area code!  Let's fix that.

Click on 'Trunks' and then 'SIP/SellVOIP1.'  In the 'Dial Pattern' field, I am going to add my local dialing pattern.  My area code is 818, so I add 1818+NXXXXXX.  This tells the SellVOIP trunk to add 1818 to any number dialed in 7 digit format.  Click 'Submit' and then click the red bar at the top of the screen.  Repeat this for the remaining 4 SellVOIP trunks.

Now when I dial a 7 digit dialing pattern, it works great!

9.5 - VoIP Street

To set up VoIP Street, first, you need to sign up for an account.  To do so, click on the 'Voip Street' link that takes you to their page.  Enter in your information and wait for your email response.  Once you have your email, log in to the Voip Street customer portal and click on 'Menu' on the left-hand side of the screen.  It will expand out.  Click on the '+' sign next to 'Account Settings' and then click on 'Account Home.'

In the 'Quick Launch' menu, click on 'View/Add Devices.'

In the 'Add a New Device' section, enter in the following info:

Friendly name: (can be whatever...I called mine Outbound)
Protocol:  IAX2 Protocol
Codec:  ulaw (g711)

Click the 'Add New Device' button, then click 'OK' on the confirmation screen.

You should now see your new device in the 'Devices Currently Configured' section.  Click on the 'Setup Help' link under 'Config' in your device.  Note the information listed in the Trixbox section and then go back to your Trixbox VoIP Street provider page and fill in the following info:

Desired Caller ID Name:  (Can be whatever you want)
Desired Caller ID Number:  (Can be whatever you want)
Device Username:  (Enter in the Device Username given to you by VoIP Street)
Device Password:  (Enter in the Device Password given to you by VoIP Street)
Device Protocol:  IAX
Device Codec:  g711

Click 'Continue.'

Click the 'Create Trunk Now' button.

When the FreePBX screen shows up, click the red bar at the top of the screen.  You should now have a new trunk called 'IAX2/voipstreet' listed in your list of trunks.  Lets try to make a call with that trunk.

Click on 'Outbound Routes' and then the '9_outside' route.

Under 'Trunk Sequence' make IAX2/voipstreet the main trunk.  (To be extra sure this is working, delete all other trunks listed...but remember to add them back after testing).

I try to dial my cell phone using 10 digit dialing (91NXXNXXXXXX) and it works...but when I try 7 digit dialing (9NXXXXXX), it says 'All Circuits are Busy.'  So let's go back to the VoIP Street trunk and adjust the dial plan.

Click on 'Trunks' and then 'Trunk IAX2/voipstreet.'  In the 'Dial Rules' section, add the following:

1NXXNXXXXXX
1818+NXXXXXX

This means to dial 10 digit calls normally, but to add my local area code (818) to 7 digit dialed numbers.

I try my 7 digit dialed call again, and this time it works perfectly!

 

 

10.0 - Incoming calls/IVR setup

 

Now, I need to tell my Trixbox what to do with incoming calls.

 

 

10.1 - System recordings

But first, let’s take care of the necessary recordings for my Digital Receptionist.

 

I want two different messages…one for during business hours, and one for when we are closed.  The scripts will look something like this:

 

Thanks.wav – “Thank you for calling Schw00d’s Asterisk emporium.  Please press 2 for Schw00d, 3 for Jim, and 4 for the next available associate.  Thank you and have a wonderful day.

 

Closed.wav – “Thank you for calling Schw00d’s Asterisk emporium.  Our office is now closed.  Please call back between the hours of 8am and 7pm Pacific Standard time.  Thank you.”  (click).

 

To get these recorded first clear your throat and put on your best announcer voice.

 

Click on System Recordings.

 

You can either record your greetings as .WAV files in an external application (8-bit mono recordings work best over the phone lines), or straight into an extension.  We’ll record using our extension.

 

Put your extension number into the extension field and click ‘Go.’

 

Pick up the extension that you put into the extension field and dial *77.  You will hear a beep…start your recording.  When you are done, hang up the extension.  Type in a name for your recording (without the .wav extension) and click ‘Save.’

 

Repeat for as many recordings as you would like to have in your Trixbox.

 

10.2 - Digital Receptionist

Click on Digital Receptionist and then click Add IVR.

 

I used these settings for my initial IVR:

 

Change Name:  BusinessHours

Timeout:  10

Enable Directory:  Checked

Directory Context:  default

Enable Direct Dial:  checked

Announcement:  Thanks (my pre-recorded Thanks.wav file)

 

For my options, I will have 3, so I leave the Increase/Decrease default, but if you have more or less options, feel free to add/remove them.

 

Option 1:

 

2 – Core – Cordless <111>

3 – Core – Soft phone <102>

4 – Core – Budge Tone <101>

 

Save

Click on the red bar at the top of the screen.

 

(Note:  I know I said that I was going to have options 2 and 3 forward to cell phones…I’m getting there, but I just want to get this set up and working with local extensions first).

 

Click on ‘Add IVR’

 

Change Name:  AfterHours

Timeout:  10

Enable Directory:  Checked

Directory Context:  default

Enable Direct Dial:  checked

Announcement:  Closed (my pre-recorded Closed.wav file)

 

Option 1:

 

2 – Core – Cordless <111>

3 – Core – Soft phone <102>

4 – Core – Budge Tone <101>

 

(Note:  The options are exactly the same as my BusinessHours IVR except for the name and the announcement…why the heck did I do that?  Well…because my Thanks.wav file lists the possible extensions (2,3,4), and my Closed.wav does not…however I still want specific people to be able to call my extension after hours, so even though the after hours recording does not list the options…the options are still available).

 

10.3 - Time Conditions

Setting up time conditions will be the next step.  Click on Time Conditions.  I used these settings:

 

Time Condition Name:  Incoming

Time to match:

Time to start:  08:00

Time to finish:  19:00

Week Day Start:  Monday

Week Day Finish:  Sunday (we’re open 7 days!)

(Leave the rest blank)

 

Destination if time matches:

IVR:  BusinessHours (my daytime-created IVR)

 

Destination if time does not match:

IVR:  AfterHours (my nighttime-created IVR)

 

Click ‘Submit Changes’

Click the red bar at the top of the screen to apply the settings.

 

10.4 - Inbound Route

Next, we want to add our incoming route.  Click on ‘Inbound Routes.’  You can route based on DID channel, Caller ID Number, Zaptel channel, or if all of those are left blank, it will route all un-matched (by DID, CID or Zap channel) calls to your settings.

 

DID Number:  <blank>

Caller ID Number:  <blank>

Zaptel Channel:  <blank>

Fax Extension:  disabled (for now)

(Leave the rest of the fax stuff default)

Privacy Manager:  No

Alert Info:  <blank>

Set Destination:

Time Conditions:  Incoming (the one we just created)

 

Click Submit

 

A box will pop up asking you if you are sure you want to match all incoming calls to these settings.  Click OK.

 

Click the red bar at the top of the screen to apply changes.

 

At this point, we can simulate an incoming call by dialing 7777 from one of our extensions.  You should hear one of the two recordings we did for the Digital Receptionist.
 

 

11.0 - On Hold Music

 

Next, we will set up our hold music. 

 

Click on ‘On Hold Music.’  I typically delete all of the included mp3’s and choose to upload my own.  You have to always have 1 mp3 available for hold music, so you’ll have to upload at least one song prior to deleting all of the included music. 

 

Browse for a .wav or .mp3 file that you would like to be played as your hold music, and click ‘Upload.’  When a box pops up telling you that you need to wait for the page to reload, click 'OK.'

 

Once the page has reloaded, click on the red bar at the top of the screen to apply the settings.

 

You can repeat this for as many songs as you’d like to upload. 

 

One nice thing about Asterisk is that it only plays hold music while someone is actually on hold.  So, if someone hears 30 seconds of an on-hold song, and then is taken off of hold, the song will pick up where it left off the next time someone is put on hold.
 

 

12.0 - Forward calls to a cell phone

 

Since I only have a single Vonage line out to the Internet, I need to use VoIP to forward an incoming call through the Internet to my cell phone.  For this, we will use one of the trunks that we set up in chapter 9. 

 

Click on 'Extensions' and then click 'Custom.'  Enter the following information:

 

Extension number:  112

Display Name:  My cell phone

 

(leave all of the rest blank until you get to 'dial.')

 

dial:  (SIP or IAX2)/(trunk name)/18185551212 (my cell number on the end there)

 

So, for instance, if you were trying to dial out of your SellVOIP SIP trunk, you would fill in:

 

dial:  SIP/SellVOIP1/18185551212  (NOTE:  Since there are 5 SellVOIP trunks, some may be less congested than others, so you may want to try different trunks such as SellVOIP4).

 

For your VoIP Street IAX2 trunk you would fill in:

 

dial:  IAX2/voipstreet/18187033093

 

Voicemail & Directory:  Disabled

 

Click 'Submit' and then click the red bar at the top to apply the changes to Asterisk.

 

Now, we go back to our Digital Receptionist and change the extension we originally set up to the custom extension we just created.

 

Click on Digital Receptionist, then click on the 'BusinessHours' IVR.  Under ‘2’ which is currently going to Core:Cordless<111>, we want to change that to:

 

Core: My cell phone <112>

 

Now, when a caller calls in and presses '2,' it will automatically forward that call to my cell phone.  In addition, if an internal user dials extension 112, it will also forward to my cell phone.

 

Remember to also change this setting for the 'AfterHours' IVR if you opted to use it.

 

 

13.0 Simple Queue setup

13.1 Forward to cell phones queue

 

I would now like to set up a new queue which routes inbound callers to the cell phone extensions I created in chapter 12.  I had set up extension 112, however lets say that I also have extension 113.  This is the exact same concept for internal extension queues.

 

Click on Queues on the left hand side of the FreePBX screen.

 

I used the following information to set this up:

 

Queue number (extension for the queue):  200
Queue name:  CellRoundRobin
Queue password:  <blank> (since I am going to use static agents, there is no need to have the agents log into the queue)
CID name prefix:  <blank>
Static agents:    112
                        113
 

Agent announcement:  <none> (I don't need one since this queue will end up being an option off of the Digital receptionist that I set up in chapter 10).
Hold Music Category:  Default  (an interesting note...you can set up different hold music contexts for different applications such as standard on-hold, or separate queues...so for instance, if you would like callers to hear perhaps a song followed by an advertisement for your company, you would set that up as a different hold music category...for our purposes however, I will leave it default).
Max wait time:  Unlimited
Max callers:  0 (unlimited)
Join empty:  Yes
Leave when empty:  No
Ring Strategy:  roundrobin
Agent timeout:  15 seconds
Retry:  5 seconds
Wrap-up-time:  0 seconds
Call recording:  No

 

Caller announcements:  0 seconds
Announce position:  No
Announce Hold Time:  No
Voice Menu:  None
Join Announcement:  None

 

Fail Over Destination:
Core:  Voicemail box 111 (my cordless...since this ACD transfers calls to cell phones, this is kind of a moot point for the application).

 

Click Submit Changes

 

Click the red bar at the top of the screen to submit the changes.

 

You should now be able to pop into Panel and see your new Queue.  If you dial 200 from an internal extension, the call will go to extension 112 (my cell phone).  If you dial it again, it will go to 113, and so forth.
 

14.0 - Panel configuration

Now that we have some good extensions, trunks, and queues in our Trixbox box, we should take a look at the FOP (Flash Operator Panel) or simply Panel.  If you mouseover 'Asterisk' and select 'FOP' from the drop-down menu, you will be taken to the Panel.  Once there, you will see your extensions, queues, and trunks all laid out nicely.  If you double-click on any of the green buttons, you will be prompted for a password. 

First, lets set that password to something we can use.  (The default password is:  passw0rd).

Go to your CLI and type the following:

cd /var/www/html/panel
nano op_server.cfg

About 42 lines down, you'll see security_code=passw0rd.  Change the 'passw0rd' to whatever password you would like, and hit CTRL+X and then Y and ENTER to exit nano.

Now, restart the panel with amportal restart from the CLI, and you're good to go.

There are a few useful things you can do with the FOP.  For instance, if a call is in session, you can click on the RED button to disconnect the call.  If you would like to call an extension, you can drag the phone icon located to the right of the extension number to another extension.  This initiates the call to both phones.  To transfer a call, drag the phone icon from the extension you want to disconnect to the new extension, and the call is transferred.  For more information on the FOP, please see http://www.aussievoip.com/wiki/TB-FOP.

15.0 - HUD Lite configuration

HUD Lite and HUD Server are products that are now bundled with Trixbox.  They are another tool for visually controlling what your extensions are doing.

For my Trixbox v2.0 installation, Hudlite-server wasn't installed by default, but I did find a file which did the trick.

I ran:

/usr/local/sbin/install-hudlite

This ran through a quick install routine and started the hudlite service.  I'm not sure if my installation was weird, or if this is how to get it installed with v2.0.  If anyone knows for sure, please email me.

Next, lets configure some extensions in the HUDlite Admin.  Mouseover 'Asterisk' and select 'HUDlite Admin.'  You can delete the default 200 extension that shows up by clicking on the red 'X' to the right of the extension.

Let's add one of our extensions:

Click 'New Device'

Device:  SIP102
Ext:  102
Name:  Soft Phone
Username:  username (this is the HUD username only...can be anything)
Password:  password (this is the HUD password only...can be anything)
Email/IM/Cell Phone are optional

Click 'Save.'

Repeat this for each extension you want monitored.

Time to download and install HUD-Lite.  You can get HUD-Lite at www.hudlite.org.  Download the latest version and install onto your Windows PC using all defaults.

Once inside HUD-Lite, choose File --> Settings.  Click the '+' next to Advanced Settings and enter the following information:

Username:  (the username you used for one of your extensions above)
Password:  (the password you used for one of your extensions above)
Server name:  (the IP address of your Trixbox server)
Password:  (the HUD-Server password - by default it is 'password')
Server port:  6600
Login timeout:  30
Park extension:  9000

Click 'Apply' and 'Close.'

HUD-Lite should now connect to your Trixbox and show you the extensions you set up:



HUD-Lite tells you a few things when calls are in progress with colors:

Green - extension is on an outside call
Purple - extension is on an intra-office call
Orange - extension is on a queue call
Gray - extension is unavailable

You can drag and drop your extension (upper-left corner extension 101) to another extension to call that extension (will dial your phone first and then call the 2nd extension once you have picked up).

You can also drag and drop your call to the 'on hold' section in the upper left to put a call on hold (although this didn't seem to work too well for me).  You can also drag and drop a call into the envelope icon of another extension to send that call directly to the voicemail of that extension.

HUD-Lite also allows you to Barge/Monitor a call in progress by clicking the 'B' next to a call that is in progress.  This will ring your extension and when you pick it up, you will hear the conversation that is going on between the two other extensions, or to the outside world.  Muahahaha...big brother in the house.

16.0 - SugarCRM configuration

SugarCRM is a bundled contact management software very similar to ACT!, but with Asterisk/Trixbox integration.  With a few simple steps, you can get this to work with Trixbox.

First, open the SugarCRM application and put in the default username/password of Admin / password.

The first thing we want to do is change our Admin password for security, so click on 'My Account' tab in the upper portion of the screen.  Then click on the 'Change Password' button underneath 'Users: Administrator (Admin) in the center-left of the screen.  Enter and confirm your new password and click 'Save.'

Now it's time to set up your extension.  Click on 'My Account' again and then click the 'Edit' button.  Change 'Asterisk Phone Extension' to your Asterisk extension.  I am using extension 102 (my Windows XP computer's soft phone).  Click 'Save' to save that information.

Let's add a couple more contacts.  Click on the contacts tab and then select 'Create Contact' from the left hand Shortcuts menu.

I start by adding my other extensions as contacts:

Last name:  Cordless
Office phone:  111

Save

Add another:

Last name:  GrandStream (my Grandstream SIP phone)
Office phone:  101

Save

Add another:

First name:  Chris
Last name:  Sherwood
Office phone:  (my cellular number)

At this point, I try calling one of my extensions by clicking on contacts, and then clicking on the little phone icon next to their name.  It rings my soft phone x102 which I pick up, then dials extension 111.  It works!

I won't go much into SugarCRM, but as you can see, it can be a very powerful tool.  You can add multiple users who will each have their own settings/contacts/etc.  
Upgrading SugarCRM:
Trixbox v2.0beta comes with version 4.5.0d of SugarCRM.  As I am writing this, the latest version is v4.5.0f.  Let's get it upgraded.
First, download the latest patch (v4.5.0f) from the SugarCRM website:  http://www.sugarcrm.com/crm/download/sugar-suite.html
Log into SugarCRM as Admin and click on the 'Admin' tab.  In the 'System' section, you should see the 'Upgrade Wizard.'  Click on it.
The first step is a warning page advising you to back everything up and try this on a test system first...blah blah blah.  What could possibly go wrong?  I'm pushing forward.  Click 'Next.'
It then checks permissions to make sure everything is OK.  Click 'Next.'
Now it wants you to upload the latest patch (the one we just downloaded).  Browse to it on your computer and click 'Upload.'  *** NOTE:  You don't have to unzip the files...just browse to the .zip.
Once uploaded, it should show up in the middle section.  Click 'Next.'
On the 'Preflight Check' step, just take all of the defaults and click 'Next.'
On the Commit Upgrade page, it should hopefully say 'The following upgrades have been installed:' and list the v4.5.0f patch.  If so, then we are successful.  Click 'Next.'
On the Debrief page, simply click 'Done.'  That's it!  Now when you go back to the admin page and check for updates, it should tell you that you have the latest available.

17.0 - Packages

New to Trixbox v2.0 is the Packages section.  It allows you to easily install, update or remove packages installed in CentOS. 

First, log in to Trixbox.org in the upper right-hand corner of the Trixbox v2.0 screen.  If you do not have a logon and password for Trixbox.org, you can click 'Register' to sign up.  Note that both username and password are case sensitive.

Once you are logged in, you will see a list of packages either installed or available to be installed.  Just for fun, let's install package asterfax.i386.  Click the checkbox to the right of the package name and then scroll to the bottom and click 'Install.'  (This is the same process you will use to Upgrade packages, but instead of the 'Install' button, you will click 'Upgrade').

When prompted about whether or not you are sure you want to install the selected packages, click 'OK.'  Your browser will now hang while it installs or upgrades the requested package(s).

Once it has completed, it will display a summary of the package install/upgrade transaction.  If you scroll to the bottom and see 'Complete!,' then you have successfully installed or upgraded.
 


18.0 - Tools

18.1 - Callback

Callback allows a user to dial into the system, hang up, and then have the system call them back directing them to a specific location.  This is helpful if for instance, you are using a cell phone to dial in, but do not want to pay for the minutes used.  The system can call your cell phone back at the cheaper SIP/IAX rates of your trunks.

First, be sure to install ruby.  Go to the Linux CLI and type:

yum -y install ruby

The next step in setting up Callback is that the module needs to be enabled.  In FreePBX, click on Tools --> Module Admin.  Then click on 'Connect to Online Module Repository.'  Once connected, check the box to the left of 'Callback' and click 'Submit.'

Now, click on 'Setup' in the top toolbar and then 'Callback' on the left.  Enter in the following information:

Callback Description:  (whatever you want)
Callback Number:  (enter in a specific number to call back, or leave blank to use the caller's caller ID)
Delay Before Callback:  (the amount of time the system waits before calling the caller back...I put in 10 for 10 seconds)

Destination after Callback:  (select your destination - I chose to have it ring one of my extensions x111 for testing purposes)

Now you need a way to access your Callback.  I will do this through my main IVR as a hidden selection (by hidden, I mean that it will be an option in the menu, but not spoken to the callers in the announcement...I don't want EVERYONE to use this feature).  :)

Click on 'Digital Receptionist' and then click on your desired IVR (I'm using the 'BusinessHours' IVR).  Click the 'Increase Options' button to create a new option...I will make Callback option 8.  Then click the radio button for 'Callback' and choose the Callback that you just set up.

Click 'Save' and then the red bar to apply changes.

There is one more step to the installation...the callback program that was just installed doesn't work properly right off the bat, so you need to do the following in the Linux CLI:

cd /var/lib/asterisk/bin
mv callback callback.old
wget http://www.aussievoip.com.au/storage/users/279/279/images/177/callback.rb
cp callback.rb callback
chmod +x callback

nano /etc/amportal

(add this to the bottom of the file):

CALLBACK_PREFIX=9
CALLBACK_CLI=Callback
CALLBACK_RETRY=1
CALLBACK_INTERVAL=10
CALLBACK_WAIT=10

Note that if for some reason, you don't dial 9 to get out, adjust the CALLBACK_PREFIX accordingly.  Hit CTRL+X to exit nano, and the Y and ENTER when asked to save.

amportal restart

Now, let's test it out.  I call my phone number with my cell phone, and then press 8 when the announcement comes on.  And the stupid computer hangs up on me!!  Just kidding...that is what it is supposed to do.  I can see that it has all of the options set properly, and the system now waits 10 seconds before dialing me back.