Tips, Tricks and Features
Cisco 7940 & 7960 IP Phones
- Upgrading Cisco 7940 & 7960 to SIP
We have upgraded 7940G and 7960G to run the SIP firmware images so that these phones can work as SIP phones with trixbox. There is a lot of information to support this process on both the trixbox forum and the voip-info.org wiki. We have put together our own Cisco How-To to bring the various resources together in one place.
- Surviving “Protocol Application Invalid”
We were faced with a Cisco 7960G that would not boot or communicate with the tftp server on our trixbox server. When trying to boot it ended up with an error message “Protocol Application Invalid”. The phone did not appear to be dead but the only keyboard function that worked was a “factory reset”.
Searching the internet showed that this issue had been encountered by lots of other Cisco users. We successfully recovered the phone from the “Protocol Application Invalid” state and have documented the process that worked for us on our Cisco How-To page.
Tutorials
Run trixbox as a Virtual Machine under VirtualBox.
VirtualBox is one of a number of applications that allow you to run “foreign” operating systems as “Guests” on another different “Host” OS. So you can run a Linux Guest under a Windows Host and vice versa. This is often called Virtualization and the Guests are referred to as Virtual Machines (VM). To find out how to run trixbox as a VM under VirtualBox we have put together a VirtualBox Tutorial
Add a better Log Viewer into trixbox and freePBX.
The log viewing option in freePBX and trixbox is limited and LogzMon is an open source / GPLV3 licenced log viewing program that can be easily installed on a trixbox server. A simple hack incorporates it into freePBX. Methodica LogzMon is written by Hans E. Herger
We have written a LogzMon How-To describing the way to install and configure the software on a trixbox server.
The Asterisk Tutorials site has range of online video tutorials covering
- Asterisk
- freePBX
- Hardware
- trixbox
Trixbox
trixboxGraph with Centos5
trixboxGraph is an application that provides a graphical view of a trixbox dialplan. The graphical image is available as gif, png or pdf files. Written to run under older versions of trixbox trxboxGraph is only available in the Centos4 repository of trixbox. This how-to allows you to run trixboxGraph under Centos5 and the recent trixbox versions.
Backup or Clone your system onto CDRom.
Make bootable rescue cd’s of your trixbox system using Mondoarchive. The process is described in this Mondo backup How-To. Whilst it is written for Trixbox and Centos the principles apply to any GNU/Linux system.
Custom Feature Codes
- Custom feature codes to read back the feature status of extensions
- The code on this page can be dropped into extensions_custom.conf and will read back to the caller the status of various features on the caller’s extension (if *108 is dialed) or on any specified extension (if *109+extension is dialed - if you only dial *109 you are prompted to enter the extension).
Comments: tested on trixbox V 2.0
Run system commands from the phone keypad
These code samples can be added to extensions_custom.conf but backup the file first.
- Dial 601 to reload sip with password required of 2222
exten => 601,1,Answer exten => 601,2,Wait(1) exten => 601,n,Playback(system-status-msg) exten => 601,n,Playback(for) exten => 601,n,Playback(restarting) exten => 601,n,Playback(registrar) exten => 601,n,Playback(system) exten => 601,n,Wait(1) exten => 601,n(READsipPIN),Read(PIN,enter-password,,) exten => 601,n,GotoIf($[${PIN} = 2222]?Reloadsip) exten => 601,n,Playback(wrong-try-again-smarty) exten => 601,n,Goto(READsipPIN) exten => 601,n(Reloadsip),Playback(pin-number-accepted) exten => 601,n,Wait(1) exten => 601,n,Playback(now) exten => 601,n,Playback(restarting) exten => 601,n,Playback(system) exten => 601,n,Wait(1) exten => 601,n,Playback(goodbye) exten => 601,n,Wait(4) exten => 601,n,System(/usr/sbin/asterisk -rx "sip reload") exten => 601,n,Wait(4) exten => 601,n,Hangup
- Dial 602 to reload sip with no pin number required
exten => 602,1,Answer() exten => 602,n,Wait(1) exten => 602,n,Playback(for) exten => 602,n,Playback(restarting) exten => 602,n,Playback(system) exten => 602,n,Wait(1) exten => 602,n,System(/usr/sbin/asterisk -rx "sip reload") exten => 602,n,Wait(1) exten => 602,n,Playback(goodbye) exten => 602,n,Hangup
Other system commands can be substituted for sip reload in the section above. Please experiment on a test trixbox system first and not your live PBX.
Check (and Fix) your voicemail directory structure
If you install trixbox and find that the voicemail does not work check the directory structure of the voicemail system. We have found a case (in trixbox V2.2) where the directories were missing. It was still possible to configure voicemail for each phone extension but the voicemail would not work. We found that the voicemail path and its subdirectories were missing. Fixing this cured the problem.
The normal directory structure for voicemail has two paths:
/var/spool/asterisk/voicemail/device /var/spool/asterisk/voicemail/default
subdirectories of the form xxxx exist, where xxxx is the phone’s extension number. These are created in the “device” path when you create a voicemail setting for one of your phones using freePBX. e.g.
/var/spool/asterisk/voicemail/device/xxxx
When you login to the voicemail on an extension for the first time or the extension is dialed for the first time, freePBX creates the INBOX etc in the “default” path, again in the form:
/var/spool/asterisk/voicemail/default/xxxx (where xxxx is the extension number)
However on the system we fixed, the /var/spool/asterisk/ did not contain a voicemail subdirectory and the device and default paths were, of course, missing as well.
The solution was to create the missing directories. We created the voicemail directory and the device and default subdirectories, and gave them all the correct permissions as per a new 2.2 system.
To do this:
- login as root and enter your root password
- change to the /var/spool/asterisk directory
- run the five commands that follow, each line is a new command
cd /var/spool/asterisk mkdir voicemail cd voicemail mkdir default mkdir device
- You should now have paths
/var/spool/asterisk/voicemail/default /var/spool/asterisk/voicemail/device
- all the paths should have the owner and group set as asterisk.
- run this command
chown -R asterisk.asterisk /var/spool/asterisk/voicemail
- /var/spool/asterisk/voicemail should have the permissions 770
- /var/spool/asterisk/voicemail/default should have the permissions 770
- /var/spool/asterisk/voicemail/device should have the permissions 775
- run this command
chmod -R 770 /var/spool/asterisk/voicemail chmod 775 /var/spool/asterisk/voicemail/device
This should do the trick.
Having put the structure in place the voicemail worked. Using freePBX it was then possible to setup an extension, including a voicemail box. Once freePBX had run the red update bar, the voicemail box could be accessed using *97 or *98.
The best way to fix any extensions that had been configured with voicemail before the fix was applied was as follows:
Using freePBX, in turn, select the configuration for each extension and click the grey submit link at the bottom of the extension settings page. Then click the red reload bar at the top. This resubmits and reloads the settings for the phone extension. Do this for each phone extension affected.
Although no changes are made to the extension configuration the update process prompts the system to recreate the correct subdirectories for each of the extensions on the trixbox system.
Each user can then login using *97 (or *98) and run through the first time setup for the new voicemail boxes.
freePBX
AstLinux