FonoSIP.com
lang world mobile site

Trixbox v 2.0 with FonoSIP.com Trunk


The purpose of this document is to provide a step by step installation guide of Trixbox using FonoSIP.com as the VoIP provider.
We have only included the information we considered was necessary to perform a basic installation.

You can always visit http://asteriskathome.sourceforge.net/ in order to learn about all the features provided as well as additional information you may need.

Just follow this installation guide step by step and you will be able to install and configure your Trixbox with our FonoSIP.com service in no time!

 


Who can use Trixbox?

Trixbox can be configured in different ways according to your needs.
Trixbox can be used by:

  1. Offices
  2. Call centers
  3. Cyber Cafes
  4. Call shops
  5. Home users

What is Asterisk?

Asterisk is an open source PBX that allows regular and sip phones to communicate with each other.
Each phone is configured as an extension in the PBX but the greatest advantage of Asterisk is that the extension does not have to be in the same physical location. This means that you  can have extensions all over the world as long as they are connected to the internet and properly configured with your server’s information.

Like any PBX system, Asterisk has features such as: Voicemail, conferencing, call distribution.
One of the greatest advantages of Asterisk is that it will let you customize its dial plan and code according to your needs.

 

What is Trixbox?

Trixbox is an iso image of a pre-configured Asterisk server which makes installation and deployment easier.

Trixbox contains a full version of Asterisk and other pre-configured applications considered add-ons.

After installing Trixbox , you will have a fully functional PBX which can be customized according to your needs.

 

1 Pre-Installation Tasks

1.1 Meet the minimum or recommended hardware requirements

The faster the system you use to run Asterisk the more simultaneous calls it will be able to handle. A 500MHz PIII with 128 Megs of RAM should easily meet the needs of the average home use. 2Gb Hard Disk minimum.

Keep in mind that these are the minimum requirements. If you are planning to use Asterisk in an office environment where voicemail and call monitoring will be used we suggest you use a PIV CPU, with at least 512 MB of RAM and at least a 40 GB hard drive.

 

1.2 Download the ISO image

Download the latest .ISO from http://sourceforge.net/project/showfiles.php?group_id=123387&package_id=192286
and burn it to a CD. Most burning utilities can burn ISO images in to a CD. One program you can use for this is Alcohol 120% located at:

http://trial.alcohol-soft.com/en/index.php

 

1.3 Set up your router/firewall so A@H can communicate with FonoSIP.com via SIP through NAT

For Trixbox to communicate successfully with FonoSIP.com using SIP through a NAT, you have to make sure your router/firewall forwards the following ports to your LAN/Private IP address assigned to the Trixbox server. Be sure the LAN/Private address is statically assigned to the Trixbox server and it is not assigned dynamically via DHCP.

In your firewall’s configuration forward the following ports to your Trixbox’s IP address:

Name

Port

Type

SIP

5060

UDP / TCP

IAX2

4569

UDP

IAX

5036

UDP

WEB

80

TCP

MGCP

5036

UDP

RTP

10000 – 20000

UDP

Note.-  We do not support IAX or IAX2. We included them in the table as a reference.

 

1.4 Setup for changing (dynamic) Internet IP address

Most ISP do not provide a “private static IP address” which would be recommended to run Trixbox. The average ISP provides Dynamic (DHCP) addresses which make a little more difficult for users to run Trixbox. The work-around for this problem is “Dynamic DNS”.

 

What is Dynamic DNS?

Dynamic DNS allows an internet domain name to be assigned to a dynamic IP address. This solution can be used for servers connected to ADSL or a dial up connection where the address is changed periodically.

Some dynamic DNS providers provide a piece of software that can be installed in the server. This software works in the background and it tracks any change in the IP address and sends it to their database. This way the domain name will be always updated with the correct IP address as soon as it changes.

There are some routers on the market that have this feature built in which makes it unnecessary to install any software on the server. All you have to do is get an account with the provider and configure it in the router.

 

How do I use Dynamic DNS with Trixbox?

You need to edit the sip_nat.conf file. Inside of FREEPBX, click Maintenance ----> Config Edit ----> sip_nat.conf. Inside of sip_nat.conf add the following and click "Update":

  • externip = home.mydomain.com (Enter your DynamicDNS domain name. Obviously it's just easier to get a static IP address and avoid using DynamicDNS altogether.)

  • localnet = internal.network.address.0/255.255.255.0 (put your LAN/Private NETWORK address of your Trixbox server, this is NOT the IP address of the server!!!!)

To determine your local NETWORK address (NOT the IP address!!) you have to know a little about your subnet mask (255.255.255.0 numbers).

  • If the IP address of the Trixbox server is 192.168.1.5 255.255.255.0, then the NETWORK address is 192.168.1.0

  • If the IP address of the Trixbox server is 192.168.7.2 255.255.255.0, then the NETWORK address is 192.168.7.0

  • If the IP address of the Trixbox server is 192.168.100.84 255.255.255.0, then the NETWORK address is 192.168.100.0

 

2 Installation

2.1 Installing from an ISO

Insert the CD you created using the ISO image and make sure that your Bios is configured to boot from a CD-ROM or DVD-ROM.

Boot the computer and press ENTER when prompted. This will erase all the information on the hard drive and install your Trixbox.

Once your Trixbox server is installed, it will have all the applications and the operating system itself with default passwords; that is why it is recommended that you unplug your server from the network in order to avoid any hacker attack.

After Linux has loaded, the CD will eject. Remove the CD from the system and wait for the system to reboot. Booting the system might take a while, depending on the speed of your computer. Once this process is complete, log in to your new Trixbox system with the user = root and the password you created during the installation.

 

3 Securing your Trixbox server

3.1 Configure your Trixbox server with a static IP address

In order to change the default passwords, we need to assign your Trixbox a static IP address.

At the CentOS command line type:

netconfig

A semi-graphical screen appears that can be explored by using the "tab" button. Enter all the requested information and tab to OK once you're done. After returning to the CentOS command prompt, type:

reboot

To reboot the server.

 

3.2 Changing your default FOP password

The default password for the Flash Operator Panel is:

Password: passw0rd

Note that 0 is a “zero”

To change this password, log in to your CentOP server using your userid and password and enter the FOP directory

cd /var/www/html/panel


Using nano as the editor, open the configuration file op_server.cfg

nano op_server.cfg


Go to the line that says security code=passw0rd. Replace the “passw0rd” with the password of your choice.

security_code=whateverpasswordyouwant


Then do a CTRL-X to exit and then a "Y" to save changes. Now restart the FOP server.

amportal restart         

 

3.3 Changing your default meetme password

To change the default type the following into the CentOS command prompt.

passwd-meetme

It will ask you for your new password twice.

 

3.4 Changing your default System Mail password

To change the default password type the following into the CentOS command prompt.

passwd admin


It will ask you for your new password twice.

 

3.5 Changing your default Sugar CRM Password

Access SugarCRM from your web page by typing HTTP://YourAsteriskIPaddressHere  into your web browser.

The default login and password are:

Login: admin
Password: password


To change this, click on My Account in the upper right corner, and then click the Change Password button to change your CRM password.

 

3.6 Updating patches to CentOS

It is recommended that you install CentOP patches. From the CentOS command line, run the following command:

yum -y update

 

 

4 Using FREEPBX to configure your Trixbox server

4.1 What is FreePBX?

Asterisk Management Portal makes Asterisk configuration easier by providing a graphical method (through a web browser). FREEPBX allow you con configure the textual configuration files that Asterisk needs to function.

FREEPBX can configure the following  in Asterisk:

Incoming Calls — Specify where to send calls coming from the outside
Extensions — Add extensions and set voicemail properties
Ring Groups — Group extensions that should ring simultaneously
Queues — Place calls into queues and allow them to be answered in order
Digital Receptionist — Create voice menus to greet callers
Trunks — Set up trunks to connect to the outside world
Outbound Routing — Manage which trunks outbound calls go out
DID Routes — Specify the destination for calls if their trunk supports direct inward dial
On Hold Music — Upload MP3 files to be played while users are on hold
System Recordings — Record or upload messages for specific extensions
Backup and Restore — Create, back up, and restore profiles of your system
General Settings — Set basic dialing, company directory, and fax settings    

For FonoSIP.com configuration purposes we will need to enable some of the modules in FreePBX
Please follow these steps:

  1. Open your web browser and type HTTP://YourAsteriskIPaddressHere  
  2. Switch to Admin Mode. (click on the switch link in the upper right corner)
  3. Click on the Asterisk Menu
  4. Select Free PBX
  5. Click on Tool
  6. Click on Module Admin
  7. Enable the following:
    1. Core
    2. Voicemail
    3. IVR
    4. Ring Groups
    5. Recording
    6. Call Forward
    7. Call Waiting
    8. Do-Not-Disturb
    9. Info Service

4.2 Configuring an extension

  1. Open your web browser and type HTTP://YourAsteriskIPaddressHere  
  2. Switch to Admin Mode. (click on the switch link in the upper right corner)
  3. Click on the Asterisk menu and select FreePBX.
  4. In the FreePBX menu click setup and select extensions.

5. From the device drop down menu select “Generic SIP device” and click submit.

 

Example

    1. Create extension 200 and type in a password for registration like "abc123". Then enter the name of the person using this extension.



2. Select enable, and enter a voicemail password. Use something you can type on a phone keypad like '1234'. Enter an e-mail address where you would like your voice messages sent and click add extension. Then click on the red apply bar at the top of the screen.

3.  Configure your extension in a soft phone for testing. Xlite is the best choice for this test. Remember to use your extension number and password in Xlite. Use your Trixbox  private IP address as the sip proxy.

4a) Make a call from your phone. Try *43 this is an echo test.

NOTE: If the extension you are configuring will connect remotely (outside the Local Area Network) you will need to change the NAT option to yes.

Just create the extension, submit the changes and go back to edit it. You will see NAT=never; change it to NAT=yes

Every time you make a configuration change and click  “Submit” a RED bar will appear at the top of the screen “Apply Configuration Changes”. This bar will reload the . conf files. Click this bar in order for the changes to take effect.


 

4.3 Configuring trunk for inbound and outbound calls

  1. Connect to your Trixbox using a PC in your network typing HTTP://YourAsteriskIpaddress In your web browser.
  2. Select FREEPBX under the “Asterisk” Menu
  3. Click Trunks then “Add SIP Trunk”.
  4. Only enter the following information:

    Outgoing Settings
    Trunk Name = fonosip.com

    PEER Details
    username=xxxxxxx  (Replace xxxxxxx with your virtual number)
    type=peer
    secret=my-password
    host=fonosip.com
    fromuser=xxxxxxx
    fromdomain=fonosip.com
    context=from-fonosip.com
    canreinvite=no





    Incoming Settings
    User Context = fonosip.com

    PEER Details
    username=xxxxxxx  (Replace xxxxxxx with your virtual number)
    user=xxxxxxx
    type=friend
    insecure=very
    host=fonosip.com
    fromdomain=fonosip.com
    context=from-pstn

    Registration String = xxxxxxx:my-password@fonosip.com





    5.- Click “Submit Changes”

4.4 Configuring Outbound Routing

You will need to allow calls from your phones to go out on a specific trunk. When having more than one trunk, you will need to setup dialing rules (dialing patterns) in order to specify which calls should go out on which trunk.

 

Using FREEPBX            

  1.  Select setup
  2. Click on Outbound Routes.
  3. Assign a name for your route.
  4. Enter the following Information:

    Dial Patterns  
    NXXXXXX
    NXXXXXX
    NXXNXXXXXX
    1800NXXXXXX
    1888NXXXXXX
    1877NXXXXXX
    1866NXXXXXX
    1NXXNXXXXXX
    011.


    Trunk Sequence
    Select  fonosip.com



4.5 Configuring Inbound Routes 

Configuring inbound routes will allow calls from fonosip.com go someplace in your PBX.

Using FREEPBX

  1. Select setup
  2. Select Inbound Routes.
  3. Leave the  DID number and Caller ID Number boxes empty.
  4. Under “set destination”  select extension 200.
  5. Click Submit





    Call the fonosip.com Virtual number or the DID associated to it . Your SIP phone extension should ring.

4.6 System Recordings

System Recording will allow you to record your own voice prompts or create one putting several built-in voice prompt files together to create the one you need.

For this example will use the “Built-in Recordings” option to create an IVR that will play “Welcome, please enter the extension number. Thank you for calling.”

Using FreePBX

  1. Click setup
  2. Select System Recordings
  3. Select Built-in System Recordings
  4. From the drop-down menu select the first file “welcome” and click GO
  5. Keep selecting the rest of the files as shown in the  graphic. Select save after selecting each of them.

6. After saving all files your recording will be created with the name of the first file selected. In this case, “welcome.”


In order to finish the basic setup of your Trixbox server let’s route all incoming calls to new system recording “welcome.”

Using FreePBX

  1. Click setup
  2. Select Inbound Routes
  3. Click on the route we created previously that was pointing to Extension 200 (any DID / any CID)
  4. Change the “set destination” section by selecting “Recordings” and “welcome” from the drop-down menu as shown in the graphic.



  5. Click Submit.

All incoming calls will be routed to the “welcome” system recording allowing callers to select the desired extension.

 

5 Other Tasks

Up to this point we have performed a basic installation and configuration of Trixbox.
In order to optimize its performance and utilize limited bandwidth when making and receiving calls, we need to make the following configurations:

  1. Install low bandwidth codecs such as G723 and G729.
  2. Restrict the fonosip.com trunk to use low bandwidth codecs.
  3. Restrict Asterisk to use low bandwidth codecs for remote extensions.

5.1 Install low bandwidth codecs

You can find the specific codecs for your type of CPU in the following link:

http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/

DISCLAIMER:You might have to pay royalty fees to the G.729/723 patent holders for using their algorithm.

 
 
To install the codec move .so file into /usr/lib/asterisk/modules directory in your Asterisk server.

It is very important that you choose the codec according to the CPU your server has. If you choose the wrong type, Asterisk will not load and will give you an error message. All you have to do is remove the file and restart your server.

Here is the command to remove files in CentOS (Linux):

rm filename     (replace “filename” with the name of the codec file)

Once you determine the right file for your server, enter the following commands in your server’s prompt and press enter

Assuming that the file I need is codec_g729-gcc-pentium4-no-sse.so

Enter the command:
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g729-gcc-pentium4-no-sse.so

 

In order to determine if we downloaded the correct file, run the following commands:

asterisk –r  [press enter]
restart now [press enter]
asterisk –r  [press enter]
show translation [press enter]

 

If the file was loaded correctly, you will see the translations under G729.

Perform the same operation to install the G723 codec.

 

 

5.2 Restrict the fonosip.com trunk to the above mentioned codecs.

 

Using FreePBX

  1. Click Setup
  2. Click Trunks
  3. Select “Trunk SIP/fonosip.com”
  4. Make the following changes to the Peer and User details

    fonosip.com
    disallow=all
    allow=gsm
    allow=g729
    canreinvite=no
    fromdomain=fonosip.com
    fromuser=xxxxxxx
    host=fonosip.com
    secret=My-Password
    type=peer
    username=xxxxxxx

    fonosip.com
    disallow=all
    allow=gsm
    allow=g729
    context=from-pstn
    fromdomain=fonosip.com
    host=fonosip.com
    insecure=very
    type=friend
    user=xxxxxxx
    username=xxxxxxx

 

5.3 Restrict Asterisk to use low bandwidth codecs for   remote extensions.

Use a pc on your network that has a web browser and connect to your Trixbox box using HTTP://PutYourTrixboxIpaddressHere.

  1. Click on the Asterisk menu.
  2. Click on Config Edit
  3. Click on sip.conf
  4. Make the following changes:

    [general]
    port = 5060
       ; Port to bind to (SIP is 5060)
    bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
    disallow=all
    allow=ulaw
    allow=g723
    allow=g729
    context = from-sip-external
    ; Send unknown SIP callers to this context
    callerid = Unknown
    nat=yes
    defaultexpiry=120


  5. Click UPDATE
  6. Click re-Read Configs located at the top of the screen

-- FonoSIP.com -- Search Site -- About Us -- Add Credit -- Mobile Site -- Login -- Service Numbers -- Help -- Swag -- Write to us info@fonosip.com -- Voicemail 1-360-226-7665 -- FonoSIP.com © 2010

Powered by BA.net iGames


FonoSIP.com supports Xten / Counterpath SIP softphones for Windows, Mac, iPhone and Linux. Internet telephony equipment such as Linksys PAP2, Cisco, Sipura, Nokia N71. Apple iPhone, iPod Touch, iPad. Android. Codec G729. Fring Mobile. Bring your Own Device BYOD. We also support SIP Trunking, replace your phone lines. Asterisk PBX, TrixBox.