The purpose of this document is to provide a step by step installation guide of Trixbox using InPhonex as the VoIP provider.
Author http://www.inphonex.com/support/trixbox-configuration.php
We have only included the information we considered was necessary to perform a basic installation. You can always visithttp://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 InPhonex service in no time!
Table of Contents
What is Asterisk?
What is Trixbox?
1 Pre-Installation Tasks
1.1 Meet the minimum or recommended hardware requirements
1.2 Download the ISO image
1.3 Set up your router/firewall so Trixbox can communicate with InPhonex via SIP through NAT
1.4 Setup for changing (dynamic) Internet IP address
2 Installation
2.1 Installing from an ISO
3 Securing your Trixbox server
3.1 Configure your Trixbox server with a static IP address
3.2 Changing your default FOP password
3.3 Changing your default meetme password
3.4 Changing your default System Mail password
3.5 Changing your default Sugar CRM Password
3.6 Updating patches to CentOS
4 Using FREEPBX to configure your Trixbox server
4.1 What is FreePBX?
4.2 Configuring an extension
4.3 Configuring trunk for inbound and outbound calls
4.4 Configuring Outbound Routing
4.5 Configuring Inbound Routes
4.6 System Recordings
4.7 IVR (Digital Receptionist)
5 Other Tasks
5.1 Install low bandwidth codecs
5.2 Restrict the InPhonex trunk to the above mentioned codecs.
5.3 Restrict Asterisk to use low bandwidth codecs for remote extensions.
6 Routing and managing multiple DIDs
7 Troubleshooting
Who can use Trixbox?
Trixbox can be configured in different ways according to your needs.
Trixbox can be used by:
- Offices
- Call centers
- Cyber Cafes
- Call shops
- Home use
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.
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.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 would suggest you use a PIV CPU, at least 512 MB of RAM and at least a 40 GB hard drive.
Download the latest .ISO from http://www.trixbox.org/downloads and burn it to a CD.
Most burning utilities can burn ISO images in to a CD.
One program you can use for this Alcohol 120% located at:
http://trial.alcohol-soft.com/en/index.php
1.3 Set up your router/firewall so Trixbox can communicate with InPhonex via SIP through NAT
For Trixbox to communicate successfully with InPhonex 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 ISPs do not provide a “private static IP address” which would be recommended to run Trixbox. The average ISP provides Dynamic (DHCP) addresses which makes it 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 is solution can be used for servers connected to ADSL or 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 in the market that have this feature built in which makes unnecessary to install any software in 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.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/PrivateNETWORK 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
If you are using NAT enter the following:
- nat=yes
The [general] context of your sip.conf file should look like this:
- [general]
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g723
allow=g729
externip = home.mydomain.com ;Enter your DynamicDNS domain name
localnet = 192.168.1.0 ;Enter your internal network address
nat=yes
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 user 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
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 InPhonex configuration purposes we will need to enable some of the modules in FreePBX
Please follow these steps:
- Open your web browser and type HTTP://YourAsteriskIPaddressHere
- Switch to Admin Mode. (click on the switch link in the upper right corner)
- Click on the Asterisk Menu
- Select Free PBX
- Click on Tool
- Click on Module Admin
- Enable the following
- Core
- Voicemail
- IVR
- Ring Groups
- Recording
- Call Forward
- Call Waiting
- Do-Not-Disturb
- Info Service
- Open your web browser and type HTTP://YourAsteriskIPaddressHere
- Switch to Admin Mode. (click on the switch link in the upper right corner)
- Click on the Asterisk menu and select FreePBX.
- In the FreePBX menu click setup and select extensions.
5. From the device drop down menu select “Generic SIP device” and click submit.
Example
- Create extension 200 and type in a password for registration like "abc123". Then enter the name of the person using this extension.
- 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.
- 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.
- 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” an ORANGE button will appear at the top of the screen “Apply Configuration Changes”. This button 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
- Connect to your Trixbox using a PC in your network by typingHTTP://YourAsteriskIpaddress in your web browser.
- Select FREEPBX under the “Asterisk” Menu
- Click Trunks then “Add SIP Trunk”.
- Only enter the following information:
Outgoing Settings
Trunk Name = Inphonex
PEER Details
username=xxxxxxx (Replace xxxxxxx with your virtual number)
type=peer
secret=my-password
host=sip.inphonex.com
fromuser=xxxxxxx
fromdomain=sip.inphonex.com
context=inphonex
canreinvite=no
Incoming Settings
User Context = sip.inphonex.com
PEER Details
username=xxxxxxx (Replace xxxxxxx with your virtual number)
user=xxxxxxx
type=friend
insecure=very
host=sip.inphonex.com
fromdomain=sip.inphonex.com
context=from-pstn
*Registration String = DO NOT ENTER REGISTRATION STRING ON THIS SCREEN.
Leave this registration string text box empty. It will be entered in the sip_nat.conf file. - Click “Submit Changes”
- Use a pc on your network that has a web browser and connect to your Trixbox box using HTTP://PutYourTrixboxIpaddressHere.
- Click on the Asterisk menu.
- Click on Config Edit
- Click on sip_nat.conf
- Enter the registration string:
Register=xxxxxxx:my-password@sip.inphonex.com
Replace xxxxxxx with your virtual number.
Replace my-password with your sip password. - Click UPDATE
- Click re-Read Configs located at the top of the screen.
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
- Select setup
- Click on Outbound Routes.
- Assign a name for your route.
- Enter the following Information:
Dial Patterns
NXXXXXX
NXXXXXX
NXXNXXXXXX
1800NXXXXXX
1888NXXXXXX
1877NXXXXXX
1866NXXXXXX
1NXXNXXXXXX
011.
Trunk Sequence
Select Inphonex
4.5 Configuring Inbound Routes
NOTE: YOU WILL NOT BE ABLE TO RECEIVE CALLS IF YOU DO NOT CONFIGURE AT LEAST ONE INBOUND ROUTE
Configuring inbound routes will allow calls from InPhonex go someplace in your PBX.
Using FREEPBX
- Select setup
- Select Inbound Routes.
- Leave the DID number and Caller ID Number boxes empty.
- Under “set destination” select extension 200.
- Click Submit
Call the InPhonex Virtual number or the DID associated to it . Your SIP phone extension should ring.
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
- Click setup
- Select System Recordings
- Select Built-in System Recordings
- From the drop-down menu select the firs file “welcome” and click GO
- 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.”
4.7 IVR (Digital Receptionist)
You use the Digital Receptionist to make IVR’s, Interactive Voice Response systems. When creating a menu option, apart from the standard options of 0-9,* and #, you can also use ‘i’ and’t’ destinations. ‘i’ is used when the caller pushes an invalid button, and ‘t’ is used when there is no response. If those options aren’t supplied, the default’t’ is to replay the menu three times and then hang up, and the default ‘i’ is to say ‘Invalid option, please try again’ and replay the menu. After three invalid attempts, the line is hung up
- Click on the “Unamed IVR”
- Under announcement select “Welcome”
- Do not create any options and click “save”.
In order to finish the basic setup of your Trixbox server let’s route all incoming calls to new system recording “welcome.”
Using FreePBX
- Click setup
- Select Inbound Routes
- Click on the route we created previously that was pointing to Extension 200 (any DID / any CID)
- Change the “set destination” section by selecting “Recordings” and “welcome” from the drop-down menu as shown in the graphic.
- Click Submit.
All incoming calls will be routed to the “Unnamed" IVR allowing callers to select the desired extension.
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:
- Install low bandwidth codecs such as G723 and G729.
- Restrict the InPhonex trunk to use low bandwidth codecs.
- Restrict Asterisk to use low bandwidth codecs for remote extensions.
NOTE: THE STANDARD INSTALLATION OF TRIXBOX DOES NOT COME WITH G723 AND G729 CODECS. IF YOU RESTRICT YOUR TRUNK TO ONLY USE THESE AND THEY ARE NOT INSTALLED YOU WILL NOT BE ABLE TO PLACE CALLS.
5.1 Install low bandwidth codecs
You can find the specific codes for your type of CPU in the following link:
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 you server has. In case you choose the wrong type Asterisk will not load and 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://asterisk.hosting.lv/built-for-asterisk-1.2/codec_g729-gcc-pentium4-no-sse.so
Assuming that the file I need is /codec_g723-gcc-pentium4-no-sse.so
wget http://asterisk.hosting.lv/built-for-asterisk-1.2/codec_g723-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 InPhonex trunk to the above mentioned codecs.
Using FreePBX
- Click Setup
- Click Trunks
- Select “Trunk SIP/Inphonex”
- Make the following changes to the Peer and User details
Inphonexdisallow=all
allow=gsm
allow=g729
allow=g723
canreinvite=no
fromdomain=sip.inphonex.com
fromuser=xxxxxxx
host=sip.inphonex.com
secret=My-Password
type=peer
username=xxxxxxx
sip.inphonex.com
disallow=all
allow=gsm
allow=g729
allow=g723
context=from-pstn
fromdomain=sip.inphonex.com
host=sip.inphonex.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 usingHTTP://PutYourTrixboxIpaddressHere.
- Click on the Asterisk menu.
- Click on Config Edit
- Click on sip.conf
- Make the following changes:
[general]bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
allow=g723
allow=g729
externip = home.mydomain.com ;Enter your DynamicDNS domain name
localnet = 192.168.1.0 ;Enter your internal network address
nat=yes
- Click UPDATE
- Click re-Read Configs located at the top of the screen
6 Routing and managing multiple DIDs
There will be times where you will need to point different DIDs to different contexts, IVRs (voice prompts) or extensions to accomplish the configuration you need. For example, you may need to provide two different numbers to your customers; one for English and one for Spanish.
You may simply want to configure one DID as the main number but provide each extension in your Trixbox its own DID that will work as its direct number. You can even configure two different companies in the same Trixbox and provide a DID for each of them.
This is what you will need to do if you want to configure InPhonex DIDs:
Note: If the DID you want to configure is assigned to a virtual number that already has a registration string in the sip_nat.conf file; you will need to delete it, save your changes and wait until the registration has expired in our sip proxy.
You can see this registration in the control panel under the “Virtual Numbers” screen.
This procedure assumes that your virtual number is not registered in our sip proxy server.
- In FreePbx select edit config
- Edit the sip_nat.conf configuration file.
- Add the following registration string:
register=VN:password@sip.inphonex.com/DIDWhere VN = virtual number
Password = your password
DID = DID to be routed.
Example:
register:1234567:password@sip.inphonex.com/3057256200
Once you verify that the VN was registered in control panel, Configure an inbound route based on the DID.
- Open FreePBX
- Select setup
- Select inbound routes
- Enter the DID number as show in the picture:
Replace xxxxxxxxxx with your own DID number
- Set the destination. For example:
I cannot receive calls.
Check the following:
- Make sure you configured an inbound route.
- Make sure the virtual number configured in your Trixbox is registered in our proxy server. You can verify this from your control panel
- Check that all necessary ports are opened or forwarded in your firewall.
- If you’re restricting your trunk to use only g729 or g723; make sure they are installed properly.
I can receive calls but I cannot make any.
- Make sure an outbound route is configured to use the InPhonex trunk.
- Check if the number you are dialing belongs to the dial pattern configured in section 4.4.
- If you’re restricting your trunk to use only g729 or g723; make sure they are installed properly.
The Virtual number configured in my Trixbox does not show registered in sip.inphonex.com
- If you are using NAT make sure that nat=yes is configured in sip.conf
- Make sure you entered the correct localnet and extenip are configured.
- Trixbox uses sip port 5060 by default; if there is any other sip device in the same network, make sure it is using a different sip port.
My calls do not have good quality.
- Resctrict your inbound and outbound trunks to use codecs g729. g723 and gsm.
- Make sure you have enough bandwidth.
- Determine if you have the same problem calling other InPhonex virtual numbers or if it is just when calling pstn numbers.
When I place calls my caller ID does not show correctly.
When you place IP calls the system will send Toronto, ON and override any name that appears in Account Info (Control Panel settings) for the Virtual Number. This is sent on any call placed via a VN that is not associated with a purchased DID.
When you place PSTN calls via your 7 digit Virtual Number that is not associated to an incoming purchased DID number, the Caller ID will display 6477233283 as the number the call was placed from or it may show 588 + your 7 digit virtual number.
When you place PSTN calls via a purchased incoming DID number the DID will display.
The system will send the display name (from account info in your control panel) as well (PSTN call via DID) but we cannot guarantee the PSTN provider will pass it down. Again, the name sent is not guaranteed. We do transmit the name from the Account Info, however, not all carriers support our transmission of that data and may rely instead on 3rd parties for the name information. There are also areas where the transmission of caller id is not supported by the carrier. It is also rare for the name part of caller ID to show up on any cell phone.
Caller ID cannot be blocked.
Caller ID cannot be manipulated in your control panel or by a calling device.
We have seen cases where Caller ID is sent as unknown, which is resolved when the soft phone is completely uninstalled and reinstalled or in the case of a hard phone, is reset to manufacturers default settings and reconfigured.
We can not guarantee Caller ID. If the callees phone number Provider looks to associate the DID with a Name, the CID will probably be displayed as Unknown, No Data, or just blank.
Author http://www.inphonex.com/support/trixbox-configuration.php