This installation guide has been created using information from: http://asteriskathome.sourceforge.net/
We have included only the information considered necessary to perform a basic installation of Asterisk@Home with VarPhonex as the VoIP provider. You can always visit the above-mentioned link 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 to install and configure your Asterisk@Home with our VarPhonex service in no time at all!
Who can use Asterisk@Home?
Asterisk@Home can be configured in several different ways according to the needs of your or your customer. Asterisk@Home can be used by:
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 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 there are connected to the Internet and properly configured with your server's information.
Like any PBX system, Asterisk has features such as: voicemail, conferencing, and 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 Asterisk@Home?
Asterisk@Home is an ISO image of a pre-configured Asterisk server, which makes installation and deployment easier. Asterisk@Home contains a full version of Asterisk and other pre-configured applications considered add-ons. After installing Asterisk@Home, you will have a fully functional PBX that can be customized according to your needs.
The faster the system being used to run Asterisk, the more simultaneous calls it will be able to handle. A 500MHz PIII with 128MB of RAM should easily meet the needs of 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 the following: PIV CPU, minimum 512MB of RAM, and minimum 40GB hard drive.
Download the latest ISO from http://asteriskathome.sourceforge.net/ and burn it to a CD. Note: this guide was written for Version 2.7.
Most burning utilities can burn ISO images onto a CD. One program we can recommend for this is Alcohol 120% located at: http://trial.alcohol-soft.com/en/index.php
For Asterisk@Home to communicate successfully with VarPhonex using SIP through a NAT, be sure that your router/firewall will forward the ports listed below to your LAN/PrivateIP address assigned to the Asterisk@Home server. Also, verify that the LAN/Private address is statically assigned to the Asterisk@Home server and it is not assigned dynamically via DHCP.
In your firewall's configuration forward the following ports to your Asterisk@Home's IP address:
UDP / TCP
10000 – 20000
**Note.- We do not support IAX or IAX2. We included them in the table as a reference.
Most ISP's do not provide a “private static IP address” which would be recommendable to run Asterisk@Home. The average ISP provides Dynamic (DHCP) addresses, which makes it a little more difficult for users to run Asterisk@Home. 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 connections 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
You need to edit the sip_nat.conf file. To do this you will need to access AMP, click Maintenance ----> Config Edit ----> sip_nat.conf. Inside sip_nat.conf add the following and click "Update":
externip = home.mydomain.com
(Enter your Dynamic DNS domain name. Obviously it's easier to get a static IP address and avoid using Dynamic DNS altogether.)
localnet = internal.network.address.0/255.255.255.0
(put your LAN/Private NETWORK address of your Asterisk@Home 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 Asterisk@Home 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 Asterisk@Home 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 Asterisk@Home server is 192.168.100.84 255.255.255.0, then the NETWORK address is 192.168.100.0
Insert the CD you created using the ISO image and be 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 Asterisk@Home .
Once your Asterisk@Home is installed, it will include all of the applications and the Operating System itself with default passwords; This is why we recommend that you unplug your server from the network in order to avoid any hacker problems.
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 Asterisk@Home system with the following:
At the CentOS command prompt, type in the following command: config
The script is calling two other applications:
redhat-config-date CentOS 3.x
system-config-date CentOS 4.x
redhat-config-keyboard CentOS 3.x
system-config-keyboard CentOS 4.x
In order to change the default passwords, we need to assign your Asterisk@Home a Static IP address.
At the CentOS command line type: netconfig
A semi-graphical screen will appear 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 the follow command to reboot the server: reboot
The default login for your CentOS operating system is:
At the CentOS command prompt enter the following command to change your password for the root user: passwd (You'll be asked to enter the old password and then the new password twice)
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 CentOS server using your user and password and enter the FOP directory:
Using nano as the editor, open the configuration file op_server.cfg:
Locate 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.
To change the default, enter the following into the CentOS command
passwd-meetme (It will prompt you for your new password twice)
To change the default password, enter the following into the CentOS
passwd admin (It will prompt you for your new password twice)
Access SugarCRM from your web page by typing
the following information into your web browser:
The default login and password:
To change this, select ‘My Account' in the upper right corner, and then select the Change Password button to change your CRM password.
Instructions from the Linux command prompt on your Asterisk box:
1.(login of course)
4.tar -xvf admin-ui-2.tar
7.chmod 777 index.dat
Note: For more documentation and the End-User Manual refer to:
It is recommended that you install CentOS patches. From the CentOS command line, run the following command: yum -y update
Asterisk Management Portal makes Asterisk configuration easier by providing a graphical method (via a web browser). AMP allows you to configure the textual configuration files that Asterisk needs in order to function.
AMP 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
1. Open your web browser and type HTTP://YourAsteriskIPaddressHere
2. Click on AMP, then click setup.
3. Click Extensions, then Add Extension.
4. Select the type of extension.
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 Asterisk@Home private IP address as the sip proxy.
4. Make a call from your phone. Try *43 this is an echo test.
NOTE: If the extension you are configuring does not 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 “You have made changes – when finished, click here to apply them”. This bar will reload the .conf files. Click this bar in order for the changes to take effect.
1. Connect to your Asterisk@Home using a PC in your network typing HTTP://YourAsteriskIpaddress In your web browser.
2. Click on AMP (Asterisk Management Portal) and then click setup.
3. Click Trunks then Add SIP Trunk.
4. Only enter the
Trunk Name = VarPhonex
User Context = sip.varphonex.com
Registration String = xxxxxxx :email@example.com
NOTE.- Replace “xxxxxxx” with your Virtual Number and “My-Password” with the sip password for that Virtual Number.
5. Click “Submit Changes”
You will need to allow calls from your phone to go out on a specific trunk.
When having more that one trunk, you will need to setup dialing rules (dialing
patterns) in order to specify which calls should go out on which trunk.
Using AMP (user: admin, pass: password):
1. Select setup
2. Click on Outbound Routing.
3. Assign a name for your route.
4. Enter the following
Change Zap/g0 to varphonex
Configuring incoming calls will allow calls from VarPhonex go someplace in your PBX.
Using AMP (user: maint, pass: password)
1. Select setup
2. Select Incoming Calls.
3. Under the Send Incoming Calls from the PSTN to: section drop down the box next to Extension: and select the extension 200 you created earlier.
Click Submit Changes and then click on the red apply bar at the top of
Call the VarPhonex Virtual number or the DID associated to it. Your SIP phone extension should ring.
The digital receptionist works the same as any auto attendant in a PBX. You will be able to record your own voice prompts and create your own menu with your own options. To configure the digital receptionist follow these steps:
1. Go to the setup-digital receptionist page and enter the extension number you are using to record your voice. In this case you can try extension 200.
2. Name your menu (ex. Main Menu)
3. Dial *77 and record your message. You can listed to your message by dialing *99.
4. Enter the number of options you want in your menu and press continue.
5. Associate the corresponding option with the corresponding action. For example: Option 1 can ring on a specific extension, other voice menu, a voicemail, etc. The option must be a number like 1, 2, 3, etc not extension numbers. Placing extension numbers as options is incorrect.
6. Click continue and save your changes.
Now go to setup-incoming-call and associate this digital receptionist to
wanted incoming calls.
Here is an example of a Digital Receptionist:
Thank your for calling VarPhonex. Dial the extension number if you know it or dial 1 for customer service, 2 for technical support, 3 for accounting or 0 for the operator. Thank You.
Up to this point we have performed a basic installation and configuration of Asterisk@Home.
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 VarPhonex trunk to use low bandwidth codecs.
· Restrict Asterisk to use low bandwidth codecs for remote extensions.
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 the .so file into the /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. 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://kvin.lv/pub/Linux/Asterisk/codec -file-you -need
Replace “codec-file-you-need” with the actual file name
In order to determine if you 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.
Restrict the VarPhonex trunk to the above mentioned codecs.
1. Use a PC on your network that has a web browser and connect to your Asterisk@Home box using HTTP:// YourAsteriskIpaddress .
2. Click on Asterisk Management Portal and then click setup.
3. Click Trunks, then on the VarPhonex SIP Trunk.
4. Change the following:
1. Use a PC on your network that has a web browser and connect to your Asterisk@Home box using HTTP://PutYourAsterisk@HomeIpaddressHere
2. Click on Asterisk Management Portal and then click setup.
3. Click Maintenance.
4. Config Edit
5. Click on sip.conf
6. If not present, add these lines shown in red
port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
context = from-sip-external ; Send unknown SIP callers to this context
callerid = Unknown
7. Click UPDATE
8. Click re-Read Configs located at the top of the screen