NOTE: The system referenced in this article is no longer supported by Nerd Vittles as this version of Asterisk has been phased out. For the latest and greatest, please consider our new PBX in a Flash offering.
Well, the Nerd Vittles staff move is complete, and today we're back in the saddle. So, hello from Charleston, South Carolina! And now there's a brand-new Asterisk@Home: TrixBox 1.0 with a brand-new Asterisk Management Portal: freePBX 2.1.1. So we've got a lot of new ground to cover. These new Asterisk products are designed to support the casual home or home office user's PBX needs as well as gigantic call centers processing millions of calls a month. Everything is free except the hardware on which to run your new system. That can be a $139 refurbished PC or a multi-processor RAID box with mainframe horsepower. For home use, we've had great luck with older refurb units for under $150 each. And, no, we're not on commission. How much commission could there be on this stuff? [Note: Updated TrixBox 1.2.3 tutorial available here.]
What freePBX brings to the table is an incredibly simple yet powerful, upgradeable web-based GUI to totally manage your PBX. And TrixBox adds all of the Asterisk bells and whistles you could ever ask for in an integrated PBX: full-featured database management, simple hooks to high-level application development tools such as PHP and Perl, an Apache web server, integrated voicemail and fax-to-email support, contact management, calling card billing, hardware autoconfiguration for Digium and Cisco phone hardware, Microsoft networking support, an integrated text-to-speech system, and loads of free utility software applications for Asterisk compliments of Nerd Vittles. And, yes, TrixBox 1.0 still fits on a single CD! For those new to Nerd Vittles, be aware that we make slipstream changes to articles as users discover things we've missed. Yes, we're human! So check for Comments before you begin or subscribe to our Comments RSS Feed. And, last but not least, be sure to add yourself to the Nerd Vittles Fan Club Map.
The Game Plan. Because of WordPress article length limitations and our own limited attention span, we're going to divide this Guide into several parts. Today, we'll get your new system running so that you can make your first call. In Part II, we'll cover a number of the bells and whistles that make TrixBox and freePBX such a great combination. Then, in Part III, we'll add some more tips and tricks to help you impress your friends whenever the need arises. And, no we haven't forgotten the other installments in our weather report series. Our updated tutorial for TrixBox 1.1 is now available.
Hardware Setup. You have two choices for hardware to run this new system. The first is to dedicate a machine to TrixBox and download the TrixBox ISO image to burn a bootable CD. Once you create the TrixBox CD, you simply boot your dedicated PC with the new CD. It will erase and reformat your hard disk for use with Linux and the included Linux and Asterisk applications. If you just want to experiment with TrixBox and don't plan to put the system into production other than for one or two simultaneous calls from home, then you may prefer to download the VMware version of TrixBox or VMwarez's enhanced version. With this approach, you install VMware on your existing Windows XP or Windows 2000 system. Then you run Linux and the TrixBox application in a window on your Windows PC. It does not require a dedicated machine. We've found the performance to be virtually identical to running TrixBox on a dedicated PC provided your Windows machine has at least 512MB to 1GB of RAM. See our previous article for step-by-step instructions on the VMware installation process.
For now, however, we're assuming you've opted for the dedicated machine install: pure Linux on a clean machine. So begin by downloading the TrixBox ISO image from here and burn a CD (click here if you need a refresher course). Using your dedicated PC, insert the CD you made, plug your machine into the Internet, and turn it on. Then watch while TrixBox loads CentOS/4.3 and all the Asterisk and Linux goodies imaginable: Apache, SendMail, Asterisk Mail, SugarCRM, MySQL, PHP, phpMyAdmin, SSH, Bluetooth, freePBX, the Flash Operator Panel, Call Detail Reporting, and on and on. We've covered how to use most of the Linux products in our Mac HOW-TO's (see sidebar), and they work exactly the same way with TrixBox so keep reading. And, yes, this install will reformat (aka ERASE) your hard disk before it begins, but it now warns you first. When you're prompted to create your root user password, type in something you can remember ... or write it down!
Upgrading TrixBox from a Prior Version of Asterisk@Home. In a nutshell, YOU CAN'T. But there is a way to put most of Humpty back together again once you've installed the new system. Before you begin, understand that you are doing this AT YOUR OWN RISK. NO GUARANTEES. If that bothers you, don't do it! The real trick is to do a little printing and copying of your old data before you insert that TrixBox installation disk. Step 1 is to make a full backup of your old system to a different server before you begin. If you don't know how, read our step-by-step instructions on the subject here. Step 2 is to make another copy of some of the critical files in your system. Duplicates of all of these will also be part of your backup. We typically build directories on a separate server which match the ones we'll be copying over from the old Asterisk system. Here are the directories (including all the subdirectories therein) that we always duplicate. Before you just blindly copy our list, stop and think whether there are special things you do on your existing Asterisk system or special apps that you run. Then find those files and make copies of all of them, too. The important piece in making a successful copy of some of these files is to shut down Asterisk (amportal stop) and MySQL (/etc/init.d/mysqld stop) before you begin. NOTE to CRM users: There's a new version of CRM in TrixBox so it's unlikely that you can restore the databases. Check your current version of AAH (help-aah) and see if there is an option (bundle-crm) to pack up CRM to move it to another machine. If so, do it and follow the instructions. We don't use Sugar so we haven't tested this upgrade option. Here are the directories you'll want to back up:
/var/lib/asterisk/agi-bin
/var/www/html
/var/lib/asterisk/sounds/custom
/var/lib/mysql
/root
/etc/asterisk
Then there are a couple of individual files that you'll also want to preserve:
/etc/hosts
/etc/crontab
The third step is to take screenshots of every screen you've built using the Asterisk Management Portal (AMP) or a prior version of freePBX. Start in the Setup tab and go right down the list of features. For each option in which you have multiple entries (e.g. Extensions and Trunks), call up each entry and print out the full page. Be especially careful in printing the Trunks entries and make sure you write down every line in the PEER Details and USER Details because those which are out of view will not get printed using a screen print. You'll need to manually fill in the ones that aren't displayed. The same goes for Registration Strings which often scroll out of view on the screen. Finally, using CLI (asterisk -r), make a copy of all your Asterisk database entries: database show. Now save all this information in a safe place until we finish the new install.
Loading CentOS/4 and TrixBox 1.0. Here's how the install went for us, and we'll walk you through getting everything set up so that it can be used as a production server. There is a wrinkle in the installation process because of a Linux kernel upgrade which triggers a bug in Asterisk which triggers a missing component in TrixBox, but we'll get all that fixed up in short order. Once the install begins, you can expect to eat up about 25 minutes with the CentOS 4.3 install. Just be sure to create your new root user password before you walk away, or it will still be sitting there waiting when you return. Once Linux is installed, the TrixBox CD will eject itself, reboot the system, and begin the Asterisk compile and installation. That takes about 25 more minutes to complete.
Securing Your Passwords. When it's finished and reboots, log in as root with the password you assigned. Type help-trixbox for a listing of the other four passwords that need to be changed. Change them all NOW!
passwd admin
passwd-maint
passwd-amp
passwd-meetme
Getting the Latest CentOS Updates. Once your system is secure, load all of the application updates for CentOS 4.3. There now are lots of updates plus a new kernel install so be patient. If you have zaptel cards, read this thread. The command to issue to begin the update process is yum -y update.
Rebuilding Zaptel. Every time there is a kernel update with yum (which is the case here), ZAP device support needs to be rebuilt using the new kernel. Unfortunately, a RedHat bug caused the rebuilding process to fail. Here's the fix. Log into your new server as root and issue the following commands to determine which new kernel was loaded on your system:
cd /usr/src/kernels
ls
You should see the original kernel 2.6.9-34.EL-something and the new one: 2.6.9-34.0.1.EL-something. Depending upon the processor in your system, the something may be different than our machine. Write down the name of the new kernel directory and substitute it below for 2.6.9-34.0.1.EL-i686. Now issue these commands:
cd /usr/src/kernels/2.6.9-34.0.1.EL-i686/include/linux
mv spinlock.h spinlock.h.old
wget http://nerdvittles.com/trixbox/spinlock.h
shutdown -r now
In a perfect world, once the reboot completes, you should have been ready to rebuild ZAP device support. But Andrew inadvertently left out the source code. So here's what you need to do next. Log into your new system as root again and issue the following commands:
cd /usr/src
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.5.tar.gz
tar -zxvf zaptel-1.2.5.tar.gz
mv zaptel-1.2.5 zaptel
cd /usr/src/zaptel
make clean
make install
shutdown -r now
Now we can rebuild support for your ZAP devices or ztdummy if you have no ZAP devices. Log in as root again and type the following command: rebuild_zaptel. Then reboot your system: shutdown -r now. Now log in as root again and type amportal stop and then genzaptelconf. Now, here's one final housekeeping chore. Log in as root again and issue these commands:
touch /etc/fxotune.conf
/usr/sbin/fxotune -s
shutdown -r now
Upgrading to Asterisk 1.2.9.1. Because of a serious security vulnerability in Asterisk, we are modifying this article on June 17 to show how to load the Asterisk upgrade for those that followed this initial tutorial. Log into your server as root and issue the following commands in order:
rpm -del zaptel-modules-2.6.9-34.EL
rpm -del zaptel-modules-2.6.9-35.EL
trixbox-update.sh
trixbox-update.sh update
reboot
rebuild_zaptel
modprobe wcfxo [if you have zaptel hardware]
genzaptelconf
reboot
Now you should be good to go on the software front. Whew!
Activating Bluetooth Support. Once the updates are completed, activate Bluetooth support if you plan to use it with our Follow-Me Phoning proximity detection application. Run setup, down arrow to System Services, press ENTER, down arrow to bluetooth and press the space bar, tab to OK, press ENTER, tab twice to Quit and press ENTER.
Activating Apache HTTPS Support. If you want secure Internet web access to your server, log into your system as root and issue these commands. Once https support is installed, you can access freePBX securely: https://AsteriskServerIPaddress.
yum -y install mod_ssl
shutdown -r now
Restoring Asterisk Info Application. One of the nice applications that previously was bundled in Asterisk@Home was Asterisk Info. It gave a detailed summary of many critical components in Asterisk including a listing of active SIP and IAX peers and registry entries. This is especially helpful when you're setting up new providers and want to see whether you're getting connected successfully. To restore the application, log into your server as root and issue these commands:
cd /var/www/html/maint
wget http://nerdvittles.com/trixbox/asterisk_info.zip
unzip asterisk_info.zip
rm -f asterisk_info.zip
Now you can run the application using a web browser pointed to the correct IP address of your server: http://192.168.0.108/maint/asterisk_info.php
Simplifying SSH Access. If you're going to be connecting to other servers from your new TrixBox system using SSH or SCP, then build your new RSA key pair now. This lets you use SSH and SCP (secure copy) without having to enter a password each time. You can also automate backups and proximity detection scripts as we've explained previously here. Log in to your new TrixBox server as root. From the command prompt, issue the following command: ssh-keygen -t rsa. Press the enter key three times. You should see something similar to the following. The file name and location in bold below is the information we need:
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
1d:3c:14:23:d8:7b:57:d2:cd:18:70:80:0f:9b:b5:92 root@asterisk1.local
Now copy the file in bold above to your other Asterisk servers, Linux machines, and Macs. There's probably a way on PCs as well, but we've all but given up on that platform where security matters so you're on your own there. From your TrixBox server using SCP, the command should look like the following (except use the private IP address of each of your other Asterisk or Linux servers instead of 192.168.0.104). Provide the root password to your other servers (one at a time) when prompted to do so.
scp /root/.ssh/id_rsa.pub root@192.168.0.104:/root/.ssh/authorized_keys
On a Mac running Mac OS X, the command would look like this (using your username and your Mac's IP address, of course):
For user access only: scp /root/.ssh/id_rsa.pub wardmundy@192.168.0.104:/Users/wardmundy/.ssh/authorized_keys
For full root access: scp /root/.ssh/id_rsa.pub root@192.168.0.104:/var/root/.ssh/authorized_keys
Once the file has been copied to each server, try to log in to your other server from your new TrixBox server with the following command using the correct destination IP address, of course:
ssh root@192.168.0.104
You should be admitted without entering a password. If not, repeat the drill or read the complete article and find where you made a mistake. Now log out of the other server by typing exit.
Installing WebMin. We don't build Linux systems without installing WebMin, the Swiss Army knife of the Linux World. You can use it to start and stop services, check logs, adjust startup scripts, manage cron jobs, babysit your SendMail server, and many, many other tasks that are downright painful without it. If you ever need help from others, WebMin is a great tool for letting others help you.
There are lots of ways to install WebMin. WebMin now is part of the TrixBox yum repository so, after logging in as root, just issue the following command: yum -y install webmin.
WebMin runs its own web server on port 10000. To start WebMin, issue this command: /etc/webmin/start. You access it with a web browser pointed to the IP address of your Asterisk box (i.e. replace 192.168.0.108) at the correct port address, e.g. http://192.168.0.108:10000. Note, https support won't work on port 10000 without a bit of additional tweaking! The login name is root. Then type in your root password and press enter. The main WebMin screen will display. We really don't want the WebMin server starting up each time the OS reboots so do the following. Once you're logged in to WebMin, choose System->Bootup and Shutdown and then click on webmin. Click the No button beside Start at boot time, and then click the Save button. To stop WebMin when you're finished using it, issue this command: /etc/webmin/stop. You can restart it any time you need it, and then use a web browser to access it. But there's no need to waste processing resources. For complete WebMin documentation, click here.
If you're going to be accessing WebMin from outside your firewall, you really don't want to be logging in as root over an unencrypted connection so let's enable https support for WebMin. While still logged into WebMin, click WebMin->WebMin Config->SSL Encryption. Now click Install Net::SSLeay Perl Module. Once the module is downloaded, click the Continue With Install button. The make and make install process will take a minute or two. Once you get the completed sucessfully message, click Return to WebMin. Choose WebMin->WebMin Config->SSL Encryption again. At the bottom of the form, click the Create Now button to create your SSL key. Click Return to WebMin again. Then choose WebMin->WebMin Config->SSL Encryption once more. Change the Enable SSL if available option to Yes, leave the other defaults, and save your changes. Henceforth, you can log into your server using HTTPS: https://TrixBoxIPaddress:10000/.
IP Configuration for Asterisk. We need a consistent IP address or domain name both on your internal network and externally if you expect to receive incoming calls reliably. There are three pieces to the IP configuration: (1) setting the internal IP address of your Asterisk server, (2) configuring a fully-qualified (external) domain name for your new server which will always point to your router/firewall, and (3) configuring your router to transfer incoming Asterisk packets to your Asterisk server. Here's how.
First, log into your server as root using your new password. Now type ifconfig eth0 (that's "e-t-h-zero") then enter, and write down both your inet addr and your HWaddr on the Ethernet 0 interface, eth0. Inet addr is the internal IP address of your Asterisk box assigned by your DHCP server (i.e. your router/firewall). HWAddr is the MAC address of your Asterisk server's eth0 network card. To assure a consistent internal IP address, you can either configure your router/DHCP server to make certain that it always hands out this same address to your Asterisk machine, or you can manually configure an IP address for this machine which is not in the range of addresses used by your DHCP server. Almost all routers now make it easy to preassign DHCP addresses so we prefer option 1. It's generally under the tab for LAN IP Setup or DHCP Configuration and is generally called something like Reserved IP table. Just add an entry and call it Asterisk PBX and specify the IP address and MAC address that you wrote down above. Now each time you reboot your Asterisk server, your router will assign it this same IP addreess.
To assure a consistent external address is a little trickier. Unless you have a static (fixed) IP address, you'll want to use a Dynamic DNS service such as dyndns.org and configure your router to always advertise its external IP address to dyndns.org. DynDNS.org will take care of revising the IP address associated with your domain name when your ISP changes your dynamic IP address. Then you can configure your VoIP provider account using your fully-qualified dyndns.org domain name, e.g. windswept.dyndns.org provides access to our beach house network even though Time Warner cable hands out dynamic IP addresses which change from time to time.
Now you'll need to log into your router and redirect certain incoming UDP packets to the internal IP address of your Asterisk machine. If you want external access to the Apache web server on your Asterisk machine, then map TCP port 80 to the internal IP address of your Asterisk system. For WebMin external access, map TCP port 10000 to your Asterisk system. If you want remote access to your Asterisk system via SSH, then map TCP port 22 to the internal IP address of your Asterisk system. If you want external IP phones or other Asterisk servers to be able to communicate with your Asterisk system, then map the following UDP port ranges to the internal IP address of your Asterisk system:
SIP 5004-5082
RTP 10001-20000
IAX 4569
For more details, read our full article on the subject.
Finally, you'll need to tell Asterisk about some of this. Edit the sip.conf file (nano -w /etc/asterisk/sip.conf) and add the following entries in the [general] section of the file using your fully-qualified domain name for your server and the private IP address range used behind your router/firewall (typically 192.168.0.0 or 192.168.1.0 with most home routers):
externhost = yourdomainname.dyndns.org
localnet=192.168.0.0/255.255.255.0
nat=yes
Designing Your PBX System. For those new to the Asterisk world, we'll be using a web-based GUI to configure Asterisk to meet your needs. Step 1 is to get away from your computer and sit down with a piece of paper. Now lay out how you'd like your new system to operate. How many phones will you have? Will they be software-based phones or good old phones you can put on a desktop? Will they be POTS phones (plain old touchtone phones), cordless POTS phones, SIP phones, IAX phones, or cordless SIP phones? How will you make and receive calls? Are you going to use an existing Ma Bell phone line or VoIP trunk lines from one or more VoIP providers? What should happen when incoming calls arrive? Do you want the caller to get an AutoAttendant message ("Hi. You've reached the Mundy's. Press 1 for Mary, 2 for Ward, or 3 to leave a message.") or do you just want all of your phones to start ringing? What should happen when no one answers or the line is busy? Do you want the calls transferred to a cell phone, another POTS phone, or just sent to voicemail? Which voicemail account? Should all busy phones send callers to the same voicemail account, or do you want one for each phone? What should happen once voicemail arrives? Do you want the phone to ring once a minute? Do you want the message waiting indicator to illuminate? Do you want the voicemail message to be emailed to you? Do you also want it preserved so that you can retrieve it from a touchtone phone? Do you want to be paged with the number of the person that called you?
ATTN: "Type A" Males. With apologies to our female readers, let me chat privately for a moment with the guys. If you have a wife (and want to keep her) or if you have teenage daughters (and want to avoid being killed in your sleep), you'd better get most of this PBX design right if you plan to use Asterisk to replace your existing home phone system. Otherwise, the day after you install your new system, a typical discussion with your spouse will begin with something like this: "What was wrong with our old phones that just rang when someone called and I could actually hear what they were saying when I answered?" With that caveat in mind, let's jump right in to freePBX.
Today's Objective. Keeping in mind that there are a million ways to configure and customize a PBX, we're going to walk you through a very simple setup today. Our objective is to get Asterisk and freePBX configured so that you can make a call and receive a call. In our next article, we'll start adding all the bells and whistles. But, for today, we'll show you how to set up an incoming and an outgoing VoIP trunk so you can make and receive free calls (at least in the U.S.) using a free softphone. When no one answers, the call will be sent to voicemail. And, when a voicemail message is left, the message will be emailed to you. We'll leave integration of existing POTS phones and phone lines for another day.
Choosing VoIP Providers. As you will quickly learn, choosing VoIP providers is an art, not a science. And it can be a slippery slope. A provider that is great one day can turn into an absolute nightmare the next. Take BroadVoice, for example. They used to be one of our favorites. Then the CEO left, and the company's business practices, uh, changed to put it charitably. You can read all about it on this forum or at the Better Business Bureau's site. All it takes is a change in leadership or direction at the company headquarters to go from first to worst overnight. So the best advice we can offer about choosing providers is this. Stay Flexible! Don't put all your eggs in one basket. And don't be in a hurry to disconnect your Ma Bell line and transfer your number until you are pretty confident about your provider. Six months is an absolute minimum, and a year is probably better. VoIP providers come and go at about the same pace as fast food restaurants in a new community.
Having said all of that, we have some providers we really like and some that we don't. YMMV! The basic idea in switching to Voice Over IP technology was to save money... not just for the provider, but for you, too. So PRICE MATTERS. There are typically three types of VoIP service: all-you-can-eat at a fixed monthly price, pay-as-you-go at a per minute (or part of a minute) rate, and free. Some providers only offer outbound service, and others offer incoming and outgoing calls. To receive calls, you've got to have an account with a provider that will give you a phone number unless you want to only get calls from other users of that provider's service, e.g. Skype. You don't have to use the same provider for inbound and outbound calls, and you are better off with backup providers for BOTH inbound and outbound calls.
If you select an all-you-can-eat plan, you basically get the right to make (or receive) ONE phone call at a time to a certain geographic area. This may be a state, an area code, or a country depending upon where you live and which provider you choose. The best of these in the U.S. is TelaSIP at $14.95 a month for unlimited U.S. calling. The runner-up is Axvoice which has a broader variety of plans including an unlimited international calling plan at $22.99 a month. Be aware of the fine print with all-you-can-eat providers. Some such as Teliax don't really offer unlimited calling even tough they call it that. What they offer is unlimited calling up to some monthly cap of minutes. For example, with Teliax, up to 1500 minutes a month are "free" and then you pay 2¢ per minute thereafter. They're not really free because you've paid a $24.99 monthly fee for the initial 1,500 minutes. Then there's our old favorite BroadVoice which now offers unlimited calling with a little asterisk. After you drill down to the third level in their web pages, you'll see this in the fine print: "* Significant restrictions apply to Unlimited Plans." If you violate their undefined "normal residential usage patterns", you agree in advance to let them retroactively charge you 5¢ per minute for every call you've made since you signed up... plus $300/hour in in-house legal fees for successful collection. I wonder if they pay their staff attorneys that much? Their terms of use give them unfettered discretion in defining what's appropriate and inappropriate use. And, arguably, even having multiple people in your household use your "unlimited plan" violates their terms of service. So, unless you've recently won the lottery or just enjoy litigation, here's our best advice on BroadVoice: JUST SAY NO!
With pay-as-you-go providers, there typically are no simultaneous call limitations because you're paying by the minute per call. Some of these providers charge in whole minute increments while others round calls to as little as six second billing increments. Some leave their rates the same for six months or more. Others change their rates almost daily. You don't want to have to visit a web site each time your phone rings to determine what it will cost to pick up the phone. So be alert in choosing a pay-as-you-go provider. The best of the bunch in our opinion is Voxee.com at about a penny a minute for U.S. calls and only slightly more for calls to many international destinations.
And then there are the free providers. Here's a good rule of thumb. Enjoy it while it lasts. Don't expect free to last forever. And, most importantly, READ THE FINE PRINT. It costs the provider something to offer the service and, if they're giving the service away, there IS a catch. You just have to be smart enough to figure out what it is. The best freebies at the moment are VoipDiscount.com for free outbound calls to numerous countries including the U.S. at least today, FreeDigits.com for free incoming DIDs, free incoming calls, and free incoming fax service, and Stanaphone.com for free incoming DIDs and free incoming calls. See our complete list of VoIP Provider reviews for additional information and setup instructions.
If you just want to experiment with your new system and don't want to cough up much money, here's a good way to get your feet wet. Sign up for a free incoming DID number and free incoming calls with Stanaphone's Stana-IN service and sign up with VoIPDiscount.com for free outbound calls. You'll need a Windows machine to initially sign up for both of these services. See our tutorials for details. You won't have a phone number in your local area code, but folks will be able to call you. If you want a number in your local area code and you live in the U.S., sign up for TelaSIP's basic service at $5.95 a month which gets you a local phone number and free unlimited incoming calls ... one at a time. Outbound calls in the U.S. are 2¢ a minute which gives you a good backup to your free VoIPDiscount outbound calling service. There are no obnoxious terms of service or hidden fees with TelaSIP. Just use the service for residential calling.
Downloading a Free Softphone. Unless you already have an IP phone, the easiest way to get started and make sure everything is working is to install an IP softphone. You can download a softphone for Windows, Mac, or Linux from CounterPath. Or download the pulver.Communicator or the snom 360 Softphone which is a replica of perhaps the best IP phone on the planet. Here's a new IAX softphone for all platforms that's great, too, and it requires no installation: Idefisk. All are free! Just install and then configure with the IP address of your TrixBox server. For username and password, use the extension number and password which we'll set up shortly with freePBX. Once you make a few test calls, don't waste any more time. Buy a decent SIP telephone. We think the best value in the marketplace with excellent build quality and feature set is the $85 GrandStream GXP-2000. It has support for four lines, speaks CallerID numbers, has a lighted display, and can be configured for autoanswer with a great speakerphone. Short of paying over double for the snom 360, that's as good as desktop phones get. If you want to use Asterisk throughout your home, buy a good 5.8GHz wireless phone system with plenty of extensions such as the Uniden 8866 which we use (see ad below) and then purchase an SPA-3000 to connect up both your home phone line and all your cordless phones. Our tutorial will show you how.
Initial Setup of freePBX. You still access freePBX just as you accessed the Asterisk Management Portal (AMP), by pointing a web browser to the internal IP address of your new Asterisk system. The username is still maint. Just enter the password you assigned to freePBX/AMP when you configured your system. In the old days, AMP came preconfigured with everything they thought you'd need to use it. With the new freePBX architecture, you first have to install and enable the modules you want to use. And now others can write modules to expand the capabilities of freePBX without futzing around in the basic source code. You get to these modules by clicking the freePBX option from the TrixBox main menu. Then choose Tools->Module Admin from the main freePBX menu. Unlike some applications, there's really no reason not to activate all of the available modules since they won't slow down Asterisk. The only performance hit is when you click the Red Bar to reload freePBX. The more modules you've activated, the longer it will take to reload freePBX since it queries each module to see if changes need to be applied. So, in the Module Administration screen, click Connect to Online Module Repository to first download all of the available modules. Then select all of the Disabled Modules and Enable them. Click Submit and then the Red Bar to save your updates. From time to time, you need to revisit this page to upgrade the modules as bug fixes are released.
As you can see, there are two types of Modules: Local Modules and Online Modules. Local Modules are the pieces that make freePBX work on your local machine. Online Modules provides access to modules which are available for download over the Internet. And Online Modules tells you which ones are newer than the ones currently on your system. Before too long, we wouldn't be surprised to see an option to email you notices when new modules are released or older ones are updated. This is nothing short of fantastic for the Asterisk community if we do say so.
Last but not least, for each Module, there now is online documentation. You can read about all the Module pieces by clicking here. Once you complete the above steps, you're ready to set up your new system.
Configuring freePBX Trunks. When you click the Setup tab in freePBX, the first thing you'll notice is there are a lot more options. Start by adding your Trunks. This works pretty much like it always has. Choose ZAP, IAX2, SIP, or ENUM for each trunk and proceed accordingly. Down the road, the grand plan is to have sample settings for each provider on line here. Very cool!
For our sample setup today, we'll configure SIP trunks for Stanaphone, TelaSIP, and VoipDiscount. For each provider, click on the Setup->Trunks tab in freePBX. Then click Add SIP Trunk. After you complete the entries for each provider, click Submit Changes and then the Red Bar.
StanaPhone Trunk Setup. Here are the entries for the Stanaphone SIP trunk. For Outbound CallerID, enter the phone number assigned to you by StanaPhone. For Maximum Channels, enter 1. Leave the Dial Rules and Dial Prefix blank for the time being.
For Outgoing Settings, enter a Trunk Name of stanaphone. For Peer Details, enter the following using your assigned username and password. Be very careful to match the upper and lower case settings in your assigned password.
host=sip.stanaphone.com
insecure=very
nat=yes
secret=yourpassword
type=peer
username=yourusername
For Incoming Settings, enter a USER Context of from-pstn. This tells Asterisk to process incoming calls through this context in your dialplan. For USER Details, enter the following using your assigned username and password:
canreinvite=no
dtmfmode=rfc2833
host=sip.stanaphone.com
insecure=very
nat=yes
secret=yourpassword
type=peer
username=yourusername
For the Registration String, enter the following using your assigned username, password, and 347 phone number:
yourusername:yourpassword@sip.stanaphone.com/3471234567
Click the Submit Changes button and then click on the Red Bar to save your trunk settings and reload Asterisk. To be sure you have properly registered with Stanaphone, run the Asterisk_Info application which we installed above using your correct IP address: http://192.168.0.108/maint/asterisk_info.php. Under SIP Peers, you should see an entry for sip.stanaphone.com showing a state of Registered. If not, check your username and password entries for typos.
TelaSIP Trunk Setup. Here are the entries for the TelaSIP SIP trunk. For your Outbound Caller ID, fill in the local phone number provided by Telasip. For Maximum Channels, enter 1. For Dial Rules, enter the following:
1|NXXNXXXXXX
NXXNXXXXXX
In the Outgoing Settings section, name your trunk telasip-gw and then enter the following PEER details using your TelaSIP-assigned username and password:
context=from-pstn (if that doesn't work use: from-trunk)
dtmfmode=rfc2833
host=gw3.telasip.com
insecure=very
secret=yourpassword
type=peer
username=yourusername
Leave the Incoming Settings User Context and User Details blank. For your Registration string, enter the following: yourusername:yourpassword@gw3.telasip.com using your actual username and password assigned by TelaSIP. Click Submit Changes and then the red bar to restart Asterisk. Use Asterisk_Info as we did with Stanaphone to be sure you are registering successfully with TelaSIP.
VoipDiscount Trunk Setup. Here are the entries for the VoipDiscount SIP trunk. Create a SIP trunk for the service with a Trunk Name of voipdiscount. VoipDiscount doesn't support an outbound CallerID number so leave it blank. The Outgoing Dialing Rules in the U.S. should look like this:
001+NXXNXXXXXX
00+1NXXNXXXXXX
Add the following PEER Details in Outgoing Settings using your own username (in three places!) and password. Leave the Incoming Settings blank.
allow=ulaw&alaw
authuser=yourusername
disallow=all
fromdomain=sipdiscount.com
fromuser=yourusername
host=sip.sipdiscount.com
insecure=very
nat=yes
qualify=yes
secret=yourpassword
sendrpid=yes
type=peer
username=yourusername
For the Registration String, enter the following using your own username and password:
yourusername:yourpassword@sip.sipdiscount.com
Click the Submit Changes button and click the Red Bar to update Asterisk. Use Asterisk_Info as we did with Stanaphone to be sure you are registering successfully with VoipDiscount.
When you have your Trunks set up, you'll need a way to call out (Outbound Routes), to call in (Inbound Routes), and to process incoming calls: a Digital Receptionist, a Call Queue, a Custom Application, DISA, or a phone to ring (Extensions). For today, we'll get the phones to ring. Then we'll tackle the other options in Parts II and III.
Configuring Outbound Routes. Outbound routes are the rules that determine how calls that are dialed from an extension on your system get processed. The idea here is that you set up a list of priorities. Then, based upon the number dialed, the outbound rules figure out how to route the call. We're going to start with a simple Outbound Route called Everything which will process all calls that are not handled by another Outbound Route. Click Setup->Outbound Routes->Add Route and enter the following:
Route Name ... Everything
Route Password ... [leave it blank]
Pin Set ... [leave it blank]
Emergency Dialing ... [leave it blank]
Dial Patterns: (adjust these if you wish to permit international calls!)
1NXXNXXXXXX
NXXNXXXXXX
Trunk Sequence:
0 sip/voipdiscount
1 sip/telasip-gw
Once you've made all the entries, click the Submit Changes button and then the Red Bar to reload Asterisk. You will be able to place calls by dialing either an area code and phone number or 1 plus an area code and phone number. For international callers, our previous articles will walk you through configuring the dial strings to support various countries. Now you should see two Outbound Routes in your route list. We want to delete the other route so just click on it and then choose Delete Route and click the Red Bar to save your changes. Now there should be only the Everything route in your Outbound Routes list. We'll leave it like that for today, but down the road, we'll add options for emergency calls, toll-free calls, in-state calls, and international calls. After we make those additions, the Everything route will be used as our lowest priority catch-all for calls that don't qualify for processing by another route.
Setting Up Extensions. To add a new extension and voicemail account to your system, click Setup->Extensions->Add SIP Extension and enter the following:
Extension Number ... 500
Display Name ... Office
Extension Options
Direct DID ... [your 10-digit TelaSIP phone number if you have one; otherwise, leave blank]
DID Alert Info ... [leave blank]
Outbound CID ... [your 10-digit TelaSIP phone number if you have one; otherwise, leave blank]
Emergency CID ... [your 10-digit TelaSIP phone number if you have one; otherwise, leave blank]
Record Incoming ... On Demand
Record Outgoing ... On Demand
Device Options
secret ... 1234
dtmfmode ... rfc2833
Voicemail & Directory ... Enabled
voicemail password ... 1234
email address ... yourname@yourdomain.com [if you want voicemail messages emailed to you]
pager email address ... yourname@yourdomain.com [if you want to be paged when voicemail messages arrive]
email attachment ... yes [if you want the voicemail message included in the email message]
play CID ... yes [if you want the CallerID played when you retrieve a message]
play envelope ... yes [if you want the date/time of the message played before the message is read to you]
delete Vmail ... yes [if you want the voicemail message deleted after it's emailed to you]
vm options ... callback=from-internal [to enable automatic callbacks by pressing 3,2 after playing a voicemail message]
vm context ... default
Configuring Inbound Routes. Just as we had to tell Asterisk how to process outbound calls, you also have to define what to do with incoming calls from each of your inbound trunks. Be aware that different service providers have implemented SIP and IAX differently. One of the best providers for proper SIP implementation is TelaSIP because you can route incoming calls based upon the DID numbers associated with each trunk. So you could have one incoming trunk from TelaSIP with multiple DID numbers (for each of your children, for example). Each DID then could be routed to a specific extension, and each extension could have its own CallerID number for outbound calls ... even though you might only have one TelaSIP trunk line. So, to outside callers, it would appear that each individual had his or her own phone line even though everyone might be sharing one or two trunks.
For today, we'll get a default inbound route established, and we'll save the gee whiz stuff for the next chapter. To create a Default Inbound Route for your calls, choose Setup->Inbound Routes->Add Route. Then enter the following:
DID Number ... [leave blank]
CallerID Number ... [leave blank]
Zaptel Channel ... [leave blank]
Fax Extension ... disabled
Fax Email ... [leave blank]
Fax Detection Type ... none
Pause After Answer ... [leave blank]
Privacy Manager ... no
Alert Info ... [leave blank]
Destination: ... Core: Office 500
Click Submit and then OK when you're warned that this will create a default incoming route for your calls. Down the road as you add additional incoming routes, the new routes will take precedence unless there's no matching DID in which case this default route will be used.
If you want to create a separate incoming route for your Stanaphone calls just to see how it works, click Add Incoming Route and enter the following:
DID Number ... [your 10-digit Stanaphone number]
CallerID Number ... [leave blank]
Zaptel Channel ... [leave blank]
Fax Extension ... freePBX default
Fax Email ... [leave blank]
Fax Detection Type ... NVfax
Pause After Answer ... 2
Privacy Manager ... no
Alert Info ... [leave blank]
Destination: ... Core: voice mailbox 500
The trick to learn here is that if you want an incoming DID to go straight to voicemail, you need a slight pause to let Asterisk get properly set up for the call or the first couple seconds of your voicemail announcement will be cut off. By adding two seconds of fax detection, everything will work swimmingly.
Allowing Anonymous Inbound SIP Calls. One final step, and your incoming calls should start arriving without a "this number is not in service" message. Choose Setup->General Settings and scroll to the bottom of the page. Under Security Settings, change Allow Anonymous Inbound SIP Calls from No to Yes and click Submit Changes and then the Red Bar. Once this change is made, inbound calls from Stanaphone will work reliably.
Activating Email Delivery of VoiceMail Messages. When you're out and someone leaves you a voicemail message, TrixBox and freePBX will let you forward that voicemail message to your email address as a .wav file which can be played within most email client software. Or you can have the system send an instant message to your cell phone or pager telling you who called, what their phone number was, and how long a voicemail message the person left for you. Or you can do both. In addition, you can tell the system whether to delete the voicemail from your Asterisk server after sending it to your email account. In short, you now can manage all of your incoming email and voicemail from a single place, your email client. In order to send out emails from your server, you'll need to make a few changes.
First, make this adjustment to the /etc/hosts file on the server. Since anonymous emails are blocked by most ISPs, you'll need a fully-qualified domain name for your server. If you don't have your own domain, the easiest alternative is to use the fully-qualified domain name that your ISP assigns to the IP address for your broadband connection. Don't forget to update it when your ISP changes your IP address! To find out what your fully-qualified domain name is, go to a command prompt on your Asterisk server and type: nslookup 123.456.789.001 substituting your public IP address for the preceding numbers. Then write down the name entry without the trailing period. Now edit the hosts file: nano /etc/hosts. Move the cursor to the second line which reads 127.0.0.1 asterisk1.local , and then move the cursor over the first letter of the first domain name shown, usually asterisk1.local. Now type in the fully-qualified domain name you previously wrote down and add a space after your entry. Don't erase the existing entry! Save your settings: Ctrl-X, y, enter. Now restart network services on your Asterisk machine: service network restart.
Next, you need to modify the email message which delivers your voicemails so that it includes your fully-qualified domain name. Don't do this in TrixBox, or you'll mess up the formatting of the email message. You can download a fresh copy here if you need it. Instead, use nano: nano -w /etc/asterisk/vm_email.inc. Press Ctrl-W, type AMPWEBADDRESS, and press the enter key. Delete the word AMPWEBADDRESS and then type either the fully-qualified domain name for your Asterisk server or the private IP address if you only want to read your emails from behind your firewall. When you start typing, the text display may jump all over the place because of word wrap. Don't freak out. You haven't messed anything up. Once you complete your entry, don't erase or change anything else. Save the file: Ctrl-X,Y, then enter.
Now edit vm_general.inc: nano -w /etc/asterisk/vm_general.inc. Change the serveremail entry of vm@trixbox to an email name at the same fully qualified domain you used in your /etc/hosts file above. Then save your configuration and restart Asterisk: amportal restart. If you continue with this setup and still don't receive emails, here's another configuration change that is sometimes necessary. You'll also need to do it if you reloaded settings from an older version of Asterisk. On the Asterisk terminal, log in as root. Switch to the directory where the SendMail configuration file is stored: cd /etc/mail. Make a backup of the config file: cp sendmail.cf sendmail.cf.bak. Then issue the following command: echo CGasterisk.dyndns.org >> sendmail.cf. Substitute the actual domain name of your Asterisk server for asterisk.dyndns.org, but be sure it's preceded by CG with no intervening spaces.Then restart SendMail on your server and try again: /etc/rc.d/init.d/sendmail restart. Finally, if your ISP doesn't permit downstream mail servers (that's you), then take a look at this link which will show you how to designate your ISP as your SMTP smart host using SendMail.
Activating the Nerd Vittles Weather Forecasts in TrixBox. TrixBox now includes the Flite text-to-speech engine as well as the Nerd Vittles weather forecasting system. To use it, just dial 611 from a phone on your system and enter a 3-character airport code to retrieve the weather forecast. We now support about 50 airports. In our next installment, that will be expanded to 1,000 so stay tuned. For complete instructions, read our original article.
Creating Wakeup Calls in TrixBox. To set up a wakeup call from any extension, dial *62 and enter a two-digit hour and two-digit minute for the wakeup call.
Determining the Extension Number of Any Phone on Your TrixBox System. To determine the extension number of any phone on your system, dial *65 from that extension.
Retrieving VoiceMail from Any Phone With TrixBox. To retrieve voicemail for any extension, dial *98 and enter the voicemail extension number. When prompted, enter the password for that account. To retrieve voicemail for the extension from which you are calling, dial *97 and enter the password for the account when prompted. You can also set your voicemail defaults and record your voicemail greetings using these options.
Useful Functions on Your TrixBox System. Here's the complete list of functions that will work out of the box from any extension on your TrixBox system:
Well, that should get you started. We'll tackle the gee whiz features in TrixBox and freePBX in our next article so visit us again soon. In the meantime ...
Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has continued their limited time special on hosting services. For $6.95 a month, you can host up to 6 domains with 15GB of disk storage and 400GB of monthly bandwidth. Free domain registration is included for as long as you have an account. It doesn't get any better than that, and their hosting services are flawless! We oughta know. We've tried the best of them. If you've never tried a web hosting provider, there's never been a better time. Just use this link, and we'll all be happy.
Nerd Vittles Fan Club Map. Thanks for visiting! We hope you'll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don't know the difference in the last two, here's the best definition we've found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We're always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you're visiting as well.
Want More Projects? For a complete catalog of all our previous Asterisk projects, click here. For the most recent articles, click here and just scroll down the page.
Headline News for the Busy Executive and the Lazy Loafer. Get your Headline News the easy way: Planet Asterisk, Planet Gadget, Planet Mac, and Planet Daily. Quick read, no fluff.
Got a PDA or Web-Enabled Smartphone? Check out our new PDAweather.org site and get the latest weather updates and forecasts from the National Weather Service perfectly formatted for quick download and display on your favorite web-enabled PDA, cellphone, or Internet Tablet. And, of course, it's all FREE!
Some Recent Nerd Vittles Articles of Interest...
I love the articles and have been using A@H/trixbox since about 0.6.
I was just wondering why you don’t add your codes into the online repository now that freepbx/trixbox has gone modular. Would this not make it easier for everyone including yourself when typing out your articles.
For home installations, the use of sendmail is becoming more problemmatic. I had an install break recently when a friend switched hosting providers and emailed voicemails were being silently dropped by the new provider. I was already using the smarthost setting in sendmail to send via the local ISP, but that wasn’t even enough.
So I went searching and found MSMTP: http://msmtp.sf.net. This is a sendmail compatible replacement that instead of being a full MTA like sendmail, it acts just like a regular email client and logs in to your favorite email provider and sends the mail. This is also nice because it will do SMTP auth, as more and more providers are requiring and which can be a pain to configure in sendmail. And, further, it will do encrypted auth which uses port 425 (?I think) which avoids port blocks.
Installing msmtp isn’t hard for a person who’s messed with Linux much, and then its a simple change to vm_general to add a line to use it. I’ll try and writeup a full guide soon if anyone is interested.
cheers, michael
[WM: Please write it up. We’re interested!! You’re correct. SendMail is painful. It’s kinda like killing a fly with a hammer for use with TrixBox and Asterisk.]
I have been waiting for this post, thanks so much! I have been putting off trying out Asterisk for a number of reasons, and then when I went to go check it out, TrixBox was out, so I had to wait a bit =) We’ll see where this takes me, as soon as a get a new box set up for it.
I do have a small question, if you could clarify. I would like to set up VoIP for home use, probably only 2 maybe 3 lines to start. I would like to use something like the Snom or Grandstream in my home office, and have both an "office" line and a "home" line on that phone. For the rest of the house, I would like to go with something like the Uniden cordless POTS phone (which would need the SPA-3000), and a 3rd line possibly for a fax machine (probably needs the SPA-3000 also?). My question is, can i use both a SIP phone solution and a POTS solution in combination, or do I have to choose one or the other?
Thanks!
[WM: You can mix and match all types of phones in virtually any combination. That’s probably Asterisk’s strong suit.]
Ward, with regards to 1.2.9.1 ( I am cwombat) it appears to be OK now. There is a work around posted at http://www.trixbox.org/modules/newbb/viewtopic.php?topic_id=276&forum=2 now. I am not really sure what the IAX2 client vulnerability is with >1.2.9.1 but it didn’t sound good to me as I use IAX2 remote clients.
I lifted the fix from http://www.kennonsoft.org/ and other posts on the Trixbox forum.
I find your work here indispensable. Thanks.
Robert.
[WM: Hi Robert. Thanks for your comments. Your parting line in the referenced thread gave me pause: "….and all appears well for now. At the very least Asterisk starts." That didn’t make us overly eager to jump just yet, but it appears we’re all going to need an update soon to resolve the denial of service problem in IAX so stay tuned for more.]
As always: Thank you for your detailed articles.
I wonder why you didn’t mention about the new update engine: trixbox-update.sh that covers yum -y update and more?
A comment that may make upgrading a bit easier. TrixBox is currently using FreePBX 2.1.1. If you are running an old version of AAH, you can use the FreePBX ugprade utitlity to ugprade your currrent install to 2.1.1. Once there, just used the FreePBX backup utility to save its state and then once you have installed TrixBox you can use the restore utility to bring back all the FreePBX configuration, CDR data, voicemails, etc. This is not a substitute for other suggestions about backing up everything that is important, but it is a very efficient way to restore the bulk of your configuration, especially if you have many extensions, trunks, and other settings. FreePBX has been ahead of the curve with excellent thought put into upgradability – here is your change to capitalize on that.
Ward, thanks. At this point I am not finding bugs and even the sixTel trunk registers now. I don’t use Queues or Disa yet so I can’t speak to that features. I have added AsteriDex II and found that I can simply make a different "asteridex" folder in the /var/www/html/ directory and change the callboth.php extension parameters making it available to more than one extension sharing the same DB. I really like that app.
On another note, I am attempting to Gabcast my experiences with this stuff at: http://www.gabcast.com/index.php?a=episodes&id=292 and I would absolutely love to have you as my first real Interviewee. What do you say? I can be reached at rkeller at legoebay dot com. Looking forward to part two.
Robert
For those of you using a TDM400P (or the like) and genzaptelconf won’t generate the proper configuration you need to edit /etc/sysconfig/zaptel and uncomment the approperate module (in this case wctdm). Re-rurn genzaptelconf and all should be well.
[WM: Here’s another link you might want to take a look at if you have one of these cards. It covers the echo problem with the TDM400P as well as the proper way to get the card functioning reliably with TrixBox.]
Thanks for the update for trixbox so soon after you moved! Can you go over the install process for a home configuration where there is a common voicemail mailbox for the house instead of for each extension?
It helps keep the wife happy… 🙂
We really appreciate the work you put into nerdvittles!
Thanks,
Mike
With regards to SCP in a windows environment:
Use WINSCP from
http://winscp.net/ or http://winscp.sourceforge.com
Download and Install. Start it up click on the browse button of the private key file section. Point it to the .pub file that you copied from the Asterisk server (change the files listed to ‘all files’ to see *.pub files). Then type in the host name or IP and a user name (root or admin). Under protocol click sftp (allow SCP fallback). Click login. Type password. Once logged in choose the session menu item and ‘save’. Give it a meaningful name. Done!
Rehan
Re the previous post regarding SSH
Sorry, the SCP client will give you access to a secure file manager. To get remote login use the Putty client from
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Unfortunately I can’t find a way to automate this using these clients. You will always have to type a username and password. Not a bad thing however.
Rehan
Hi Ward, I’ve created a post in the Whirlpool Forum regarding fax to email. Please feel free to use the info for your write ups. Be aware that in my post, Whirlpool’s formatting has inadvertently introduced spaces into a few lines of the ext-fax context, so double proof read if you happen to copy it. Also, it looks like Rob has created & incorporated a perl script to do the tiff to pdf conversion.
Cheers for now!
TB1
On the zaptel configuration with a tdm400 I also had to do a modprobe wctdm before running the genzaptelconf to get the zaptel drivers to see my card.
Rehan
I have A@H 2.4 and I am going to change to TrixBox soon. My question is, What is the best way to deal with a "Receptionist" phone for multiple incoming calls at the same time? We are using a SNOM 360 with a Sidecar.
Re Rehan’s comments regarding WinSCP and Putty: You can point WinSCP to show a shortcut while connected to Asterisk/TrixBox. If you do so, you’ll have an icon in the toolbar that, when clicked, will pass on the session’s credentials to Putty, so you won’t need to type the user and PWD again.
DO NOT use yum update. Not even for the first time.
Andrew has gotten ‘much smarter’ and has scripted the update:
trixbox-update.sh update
The first time you run it, you get a new script.
Then run it again.
Some have noted that first you have to:
rpm -e zaptel-modules-2.6.9-34.EL-1.2.5-2.1001
As there is some problem with the zaptel replacement. I don’t know if Andrew has fixed this one yet.
After that you might then have to do the Centos Zaptel patch explained at: http://aussievoip.com.au/wiki/index.php?page=freePBX-Centos
to wit:
cd /usr/src/kernels/2.6.9-34.0.1.EL-i686/include/linux/
mv spinlock.h spinlock.h.orig
sed "s/rw_lock_t/rwlock_t/" < spinlock.h.orig > spinlock.h
Then proceed with the rebuild_zaptel instructions.
Or if you are going all Internet with no PSTN, you need ztdummy:
http://aussievoip.com.au/wiki/index.php?page=ztdummy
Finally, for faxers there is a new libtiff. I have it up on my website, and would be happy for someone else to make it available until Andrew rolls it into his repro:
http://htt-consult.com/~rgm/Asterfax/
yum localinstall libtiff-devel-3.8.2-2.i386.rpm libtiff-3.8.2-2.i386.rpm
Have fun!
[WM: We’ve held off on the trixbox update shell for the moment. Our yum update recommendations work, and I still read some hedging into your trixbox solution. It’s a wonderful tool, and we’ll be covering it shortly. But, at least when we wrote this article, it just wasn’t quite soup yet. We’ll also get to faxing in a later installment. Pioneers are more than welcome to try your solutions and report back. Pioneers are always welcome here! And thanks for the info.]
Are you missing something in the Telasip setup? You had us set up the Telasip account with a telasip-in context but I don’t remember setting that context up. Should we? And if so will you show us fearless leader?
Thanks for the articles. Congrats on the move.
-William
[WM: Oooops. Change telasip-in to from-internal, and all should be well. Thanks for catching it.]
So here is my setup, which i think is probably similar to some people. I have a DSL line with a router/modem with the asterix box behind it. I have the Trixbox in the "DMZ" but with a private(internal) address. I am outside my internal network and have a softphone on my computer. I can call in over the softphone to the TrixBox, for weather or voice mail, I can hear the propmts but they do not accept my key presses (They can’t hear me). So then I try to make a call via my Telasip account, and then It rings and it will ring for me and the number dialed but once the phone is picked up they can’t hear me and I can’t hear them. Also calls into my Telasip account go directly to Telasip’s voice mail (Not voicemail on my TrixBox) and not to the softphone where I have them set up to be forwarded to. I believe this might be a setting for context, but am not sure maybe ports/firewall?? Thanks again for your articles and help.
-William
[WM: You’ll have better luck with questions like this on either the TrixBox forum or Voxilla. If you can’t hear them and they can’t hear you, it’s definitely a problem with port forwarding. Doesn’t sound like your machine is really in the DMZ which would mean all the ports get forwarded to your DMZ box.]
A note on the ssh discussion. There are two ways you can go about not having to type a password too often.
1. You can create a private/public key using puttygen with no passphrase. As long as you point putty at that key, you will not be prompted for a password, and will just be logged in. This is typically thought of as a bit of a security risk.
2. You can use putty’s key agent (pageant). You need to type the passphrase in once when the agent starts. After that it will automatically pass the validated key on to putty.
Take a quick look around the putty download site. They have tons of documentation that can be useful.
Do you reckon you will be adding a write up on HUD configuration setup. This looks like a very interesting part of trixbox and i can’t find a good setup guide to do specifically with trixbox.
[WM: HUDlite tutorial is coming soon, and you’re right. It’s a fantastic addition.]
I apologize if this is a duplicate. When I posted I just got a blank screen returned so trying from another system:
RE: Installing Webmin
quote:
e.g. http://192.168.0.108:10000. Note, https support won’t work on port 10000 as TrixBox is presently configured!
___
I don’t really understand that part.
I wouldn’t make a habbit of using Webmin with your root password non-SSL. The https support should work just fine in Webmin. It’s unrelated to TrixBox and will work on ports other than 443 with no problems.
By default Webmin comes with SSL disabled.
Login to Webmin and go to Webmin Configuration. Open SSL Encryption. Follow the instructions to install the SSL Perl module. Once it’s installed go back into the SSL Encryption and check the Enable SSL if Available option -this will ensure you’re redirected to https if you forget to add the s.
Then just use https://hostname:10000
TrixBox and Webmin should both work just fine https even with SSL configured for TrixBox.
Thanks for the great site. It made upgrading to TrixBox easy.
First of all thanks for the excellent articles. Not being very tech. oriented I dare to dabble with the support offered here. I am eager to try out Asterisk@Home but living in the Netherlands not sure which VOIP provider to use. Anybody have any suggestions or know of any comparison sites?
Thanks.
Steve.
Can you please provide some knowledge on Trixbox 1.0’s (and FreePBX’s) support for Distinctive Ring (I use BroadVoice) because I am having a devil of a time figuring out what needs to be done (the old AAH 2.8 method for DSR support for BV doesn’t seem to be working for me). Thanks so much – you are a godsend!
FYI, Andrew has included the Asterisk Info part in the latest updates when trixbox-update.sh update is ran.
Robert.
FYI, the weather forecast module works out-of-the-box. The code in your article is already included.
[WM: Right you are. There’s now an /etc/asterisk/extensions_trixbox.conf file which is included in extensions_custom.conf, and the 611 code is in it. Thanks. Learn something every day.]
Do you or anyone else know if there is a weather plugin/script so i can hear forecasts for Ireland. Its a big let down hearing the weather will be sunny in LA (or wherever) when its pi$$ing down outside my door.
First of all thanks for the excellent articles. I took the bite and installed trixbox BUT can’t seem to get "Putting Real Names Back in CallerID" working, has anybody been able to get this working again.
I have tried the changes in the comments of the article but still no success… I have also kept the trixbox updated with all of the latest changes… Thanks!!
Comments and questions on Webmin on Trixbox.
I have no trouble running Webmin over SSL. Just use the steps mentioned above to enable SSL for Webmin.
Now I do edit /etc/asterisk/rtp.conf to exclude ports 10000 and 20000 (encase I decide to add usermin).
But I have had a problem with Webmin and Firefox. I cannot get it to display the Icons, and the file manager does not work. IE no problem. Once I enable SSL via IE, Firefox works just great with Webmin. And I cannot figure out what I have restricted with firefox..
Webmin is in the trixbox repository, so you can just use ‘yum install webmin’ now.
First, thanks. I learn a lot from your articles.
I’d like to ear about anyone’s experience on hosted PBX. I have a kind of messaging service in mind and I’d like to have the server hosted in a farm with good bandwidth, maintenance, backups and maybe quaranteed QoS for VoIP traffic etc.
I know I could rent fresh or Linux boxes and install Asterisk on it and it would do the trick. But I expect a better performance and better support using specialized providers or resellers.
Does anyone know or has experience with one or more such providers? Would a shared server work for an initially small system (I think delay with first access after a long unused time as with Web Hosting)?
I’ve found providers like offShorePBX.com, EasyPABX, VoiceRoute but the all seem to provide a somewhat shielded environment with only GUI access and that is not enough since I’d need to do some custom scripting to provide customized features.
TIA
Port 10000 and webmin – perhaps I am missing a trick here, but surely there is no conflict between webmin and asterix over port 10000? Webmin uses tcp port 10000 and asterisk uses udp port 10000 for the voip traffic – different protocols, so no conflict. Or have I missed something?
[WM: You’re correct. Thanks.]
All,
What exactly is the difference between the first release of TrixBox and the last release of A@H? I have never really seen the differences enumerated.
Also, has anyone had any luck with backing up A@H with the FreePBX option and restoring it after installing TrixBox?
I like TrixBox generally but have found one glaring omission: The Asterisk MP3player command, documented at http://www.voip-info.org/wiki/view/Asterisk+cmd+MP3Player is NOT implemented. It was available in previous versions of Asterisk@Home, but it just doesn’t work in TrixBox 1.0. As best I can determine this is because the program that MP3player calls, mpg123, is not installed as part of the TrixBox installation. Instead, it appears that a different program is used to play Music on Hold, and while this works for that application, it breaks existing applications that rely on the MP3player command. I read on another site that you can SOMETIMES use Playback instead of MP3player if you remove the file extension (usually .mp3) from the argument of the command.
I wonder why mpg123 is no longer being installed – in any case, if you are having problems playing MP3 files to callers after upgrading to TrixBox, that is why. I hope in the future they will either bring back mpg123 or link the MP3player command to whatever’s replaced it.
[WM: You might want to post this on the TrixBox forum and see what type response you get from Andrew.]
Because of a serious security vulnerability in Asterisk, we have modified the original article to show how to upgrade to the the latest version of Asterisk (1.2.9.1). You can complete the upgrade in about 15 minutes by following these steps.
What happens if you have 2 directories under /src/kernels/?
Which is which:
2.6.9-34.EL-i686
2.6.9-34.EL-smp-i686
On the boot loader I see 2 options (even before yum -y updates):
CentOS-4 i386 (2.6.9-34.ELsmp)
CentOS-4 i386-up (2.6.9-34.EL) <--what is the "i386-up" ? I can't see any 34.0.1 kernel version. Would appreciate some feedback. Thanks.
Ward, any chance you will re-visit AsteriDex and Real Caller Names again… (Can’t seam to get real caller names working under Trixbox, if anybody can please post!!!)
Thanks!!!
[WM: It’s already on my list.]
This is great for getting installed. But before setting up all kinds of VOIP trunks, is it possible to simply use X-Lite or something to connect from a PC on the local network to the asterisk box? That would be a great addition to your tutorial as a very first step after installing. Thanks!
Your detailed instructions on how to set up trixbox are so helpful to so many, but those wanting to install on a i586 epia are left to fend for themselves because trixbox does not support the i586 platform. For this reason I wanted to inform you of a very detailed trixbox installation for the i586 epia platform. Here’s the link:
http://www.trixbox.org/modules/newbb/viewtopic.php?topic_id=88&forum=2&%20viewmode=flat&order=ASC&start=10
If you could link to it or post these details on your website, I am sure it would help those wanting to run trixbox on an epia machine.
Thanks,
Trai Davenport
Does anyone know if I would be able to install this on my MAC MINI? I want to dedicate my mini to our home PBX system because of the low power and noise it makes. Running my PC not only costs more, but sounds like an airplane while I am trying to sleep! lol… If its possible, do I just insert the burned CD into my mac? thanks in advance.
One thing I have noticed about Trixbox 1.0 is that the log file /var/log/asterisk/full never seems to get automatically pruned as it did under Asterisk@Home. I could set up a cron job to do that every night but don’t know the command that prunes the log file from a command line prompt (NOT from within the Asterisk CLI). I know that from within the Asterisk CLI you can do a logger rotate and that’s what I’d like to do every night, but cron jobs operate as if you are at a Linux command prompt. Anyone know how to do this?
I just wanted to post a word of warning – while Telasip is definitely the "low cost" provider, I have had significant trouble getting responses from them. Even sales inquiry e-mails are not answered until I send the same message three or four times. Voicemail messages left for them are never returned; I just have to keep calling every few days until I actually catch someone in the office. If you have a "set it and forget it" installation, and your VoIP plan/lines will never change, they may be the one for you. But if you need additional phone numbers, want to change your service, or things just stop working, in my experience they are very difficult to get ahold of. YMMV, just my experience.
I’m sorry Paul Rupp had a bad experience with Telasip. I’ve just finished setting up my first TrixBox (and first linux machine AND first self-build computer) and Telasip support was integral in getting everything working. I usually had a response to my email in far less than 24 hours and the message usually was good help, too. Written by a person to boot! Thanks Telasip and BIG THANKS to Nerd Vittles!
Hardware Question: Can I connect my Trixbox/A@H to some kind of switch and connect several analog phones to that switch and the extension numbers then can be configured based on what port of the switch the phone is connected to? Something similar to LAN?
[WM: What you’re looking for is called a channel bank.]
Ward, Thanks for the great work! Could you tell me how to enter a pause into the callback number using either Asteridex or Web Callme? I have tried t post at Trixbox but think this might be more up your alley.
Thanks – Ryan
I just installed trixbox….now I am trying to access the GUI, I can but when I go to FreeBox –> SetUp I am offered no choices on the left hand side of the page? HELP!!!!! Please 🙂
[WM: You didn’t read far enough in the tutorial. Click here.]
Do i need a firewall with trixbox. What do you recommend
You recommend taking screenshots of every screen built using the Asterisk Management Portal (AMP) for backup. I find just saving each and every web page using File Save As in Internet Explorer much more convenient. All the detail gets preserved and can simply be copy and pasted. Trying to save the same pages usign Opera or Firefox doesn’t work that well as the pages don’t come up the same afterwards for some reason.
Realy thanx for your articles (Rebuilding Zaptel. )
this one realy saves my day.
i did an update on trixbox. and my server did fail afterwards…
i was almost choosing the easyest way and reconfigure the server. (will cost me something like 5 hours to do the complete installation. inc the voice response system.
your article did save me more than 4.5 hours…..
THANX
Raymond
I would like to use normal phones with Trixbox, you know, the $20.00 specials….is this possible???…and, if so, how can this be done….???
[WM: That’s what the Sipura SPA-1001’s are for. Reread that section of the article.]
Greetings all –
First what a wonderful write-up, I got my server up in no time following the instructions here. Keep up the good work.
I have a quick question about international dial patterns with VoIPDiscount. I have configured the dial patterns as suggested here, but can’t seem to dial international numbers. What should I use in the trunk and outbound route sections?
I have the following configured –
Trunk:
001+NXXNXXXXXX
00+1NXXNXXXXXX
Outbound Routes:
011NXXXNXXXXX
1NXXNXXXXXX
NXXNXXXXXX
Is this suffient to dial internation numbers?
Thanks a bunch,
Gibran