logo putting VoIP to work

Cisco 7940 & 7960 IP Phones - How To Upgrade


This How-To summarises our experiences in upgrading 7940G and 7960G to function as SIP phones with trixbox®. These phones are originally supplied with Cisco Call Manager (CCM) firmware.

We also survived a “Protocol Application Invalid” issue that potentially makes the phone unusable. As far as we know this results from an upgrade that has gone wrong. If you have more info on when this error occurs please let us know.

This page brings together prior information that we found on the trixbox® forums, and generally on the internet and is a tribute to everyone who has previously posted on this subject combined with the ability of a certain search engine to dig through the many voip and telephony forums to find references that were useful for us.

We have only tested our How-To in the circumstances described below. If you find these pages useful or find errors we would love to know, use our Contact page.

Upgrading Cisco 7940 & 7960 to SIP


We have upgraded 7940G and 7960G phones to run the SIP firmware images. We have used the same process for upgrading both models and they use the same firmware. The following section describes the process that we followed:

Before you proceed you need to setup the basic Cisco configuration files using trixbox® & freePBX.

 Run setup-cisco 
 Setup an extension number for your Cisco phone with freePBX
 Read the mac address off the base of your phone
 Using freePBX go to the endpoint manager and edit the Default Configuration 
  for the Cisco phone if necessary
 Using freePBX and the endpoint manager, select "add phone", select the phone model, 
  enter the MAC address and the extension number that you previously created. If you 
  want to enter additional line info, or change the time zone use the advanced 
  option. This will create the SIP_macaddress_.cnf for your particular phone.
 These files will be located in /tftpboot on your trixbox server just check them 
  over to make sure they are what you want.

Copies of the files generated by trixbox V 2.0 are here: Cisco 79X0 files


Summary: If you have a phone with an early firmware image you can’t immediately go to a recent firmware revision. You need to upgrade in small revision steps as we have done below. The process below takes you to release 3 and then to 4.4, 5.1, 6.3, 7.5 and then 8.2.

Please read the how-to carefully if you have problems please let us know via our feedback form on the contact page.

To carry out the upgrades you need a tftp server. trixbox® has one installed and running already.

 Using winSCP or some other means copy the firmware files to /tftpboot 
  on your trixbox machine
 Just to be sure, set the mode of the files you have copied to 777
 chmod -R 777 /tftpboot 
 This changes the permissions on ALL the files in /tftpboot to 777  
  if you don't want this use, chmod in a more limited way.

The tftp program running on Centos / trixbox® is “atftpd” a Trivial File Transfer Protocol Server and it should be running by default.

It is very useful when atftpd is serving files to a phone to monitor the logs so that you can see what is happening “live”. To do this you need to watch the atftpd log file. For this run

 tail -f /var/log/atftpd.log 

This displays the last 10 lines of the log file and automatically refreshes the display. To exit this ctrl^C

^ Top of Page ^

Upgrade process

Check the existing firmware on your phone to find out what version and protocol you are starting from. With very early firmware you may need to do a downgrade as we did.

 e.g.  P003AM30  This version has an upgrade problem that needs resolving

Here is the Cisco field notice that describes the issue. This link on the forum also has more information.

One phone was running P003AM30 and the process was as follows:

 Downgrade from the stock P003AM30 to POS30203 and this requires P0S30203.bin

The firmware is referenced on check for the download links near the top of the page. Older images are under the heading “Archived Images”.

 Note that up to this version the phones will only download files with filenames in 
  the old DOS 8.3 format so that newer files with longer filenames cannot be used. 
 Note the file OS79XX.txt should contain just P0S30203
 Once upgraded the reboot sequence is * 6 settings (all keys together)
 The unlock / lock sequence is still **#
 Then upgrade to P0S3-04-4-00  this is the contents of OS79XX.txt
 The file needed is P0S3-04-4-00.bin
 I used the SIPDefault.cnf generated by trixbox, you run 
 I removed all comments and some blank lines because of a suggestion that this 
  (early) version would not work if a file padded with comments was used.
 The first line of SIPDefault.cnf was - image_version: "P0S3-04-4-00" 

Release 5.0 is functionally equivalent to release 4.4. but is the first firmware to contain signed binaries. So PLEASE NOTE once you have upgraded beyond 4.4 (e.g. to 5) you CANNOT downgrade below 5 because the binary files are signed for V5 and above. It’s recommended that you upgrade to 4.4 FIRST and if that works then go to 5.0 or 5.1 and above.

 Upgrade to version 5.1 using P0S3-05-1-00 with a compacted Sip default file
 Upgrade to version 8.2 made public by Cisco.
 This failed so we downgraded to P0S3-06-3-00  (contents of OS79XX.txt)
 This worked and the phone showed SIP 6.3, we then moved successfully to Sip 7.5
  and on to Sip 8.2 (image_version: "P0S3-08-2-00") and finally 8.60.

To upgrade (or downgrade) to a particular version you need to make sure that the first line of SIPDefault.cnf is edited to show the correct image version

 e.g. image_version: "P0S3-08-6-00"

Don’t forget that any other Cisco phones that reboot on the same network will try to use the same image settings.

As far as we could tell, to change the image version it was only necessary to include the contents of the in /tftpboot and edit the image version in SIPDefault.cnf as mentioned above. Even the OS79XX.txt seemed unnecessary. However, other posting dispute this, so you may be wise to edit the version in this file as well. We will try this on more phones later.

However, changing the image_version set in SIPDefault.cnf to a higher or lower version and on the next reboot the phones would up- or down- grade as necessary.

^ Top of Page ^


  Main thread exiting


^ Top of Page ^

Surviving "Protocol Application Invalid"


One Cisco 7960G that we tried, would not boot or communicate with the tftp server on our trixbox® server. The only feedback from the phone was 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”.


Our firewall runs Smoothwall and this has a log file for the DHCP server that supports our network. By viewing the log when the phone tried to boot we could see that the phone was getting an IP address assigned but that was about it.

The phone would do a factory reset and ask for “1” to save network settings or “2” to clear network settings. So it was clear that the phone was not dead (bricked), just unusable!

Fixing the problem

Using the error message in a search engine we found this cisco link suggesting that you need to set option 150 as a setting in DHCP server.

However, this was the main link that helped solve the problem.

It describes how to set up dhcpd.conf to supply this “option 150”. It proved difficult to add the option to the Smoothwall dhcp server, so we stopped the dhcpd server on our firewall and started up the one on our Centos / trixbox® server.

 This generates a skeleton dhcpd.conf and sets DHCP to start at the next boot. 
 It does not start the dhcpd server. See below. 
 You then need to edit /etc/dhcpd.conf to reflect your network settings 
  and add the option 150
 we added the following two lines into dhcpd.conf
 option voip-tftp-servers code 150 = ip-address;
 option voip-tftp-servers 192.168.x.x;
 Note: ip-address is a variable for this option leave it written the way it is.
 Obviously make sure that the IP addresses match your local needs
  you can view it by running 
 cat /etc/dhcpd.conf
 Note:   is our Smoothwall firewall, acting as the gateway is our trixbox server and the IP for the tftpd server through is the IP range offered by DHCP
 Our final file looked like this:  
 ddns-update-style interim;
 ignore client-updates;
 option voip-tftp-servers code 150 = ip-address;
 option voip-tftp-servers;
 subnet netmask {
  option routers        ;
  option subnet-mask    ;
  option nis-domain               "";
  option domain-name              "";
  option domain-name-servers;
  option ntp-servers    ;
  option tftp-server-name         "";
  range dynamic-bootp;
  default-lease-time 3600;
  max-lease-time 7200;

^ Top of Page ^

Start / Stop DHCP server on Centos / trixbox

 If you are already running the DHCP server on your trixbox server 
 You may need to restart it
 /etc/rc.d/init.d/dhcpd restart
 If you just want to run it for this upgrade task and it has not run before
 /etc/rc.d/init.d/dhcpd status
 will tell you whether it is running or not
 /etc/rc.d/init.d/dhcpd start
 /etc/rc.d/init.d/dhcpd stop
 work as expected and will start or stop the dhcp daemon

^ Top of Page ^


Once the DHCP server was running with the option 150 added to the config a reboot of the troublesome 7940G immediately obtained a suitable IP address and then contacted the tftpd server.

The phone pulled the appropriate firmware and configuration files down, and successfully completed an upgrade to SIP 8.60.

Of course you need to have the correct firmware on /tftpboot together with SIPDelault.cnf and a SIPmacaddress.cnf to match the MAC address for your particular phone.


 /etc/rc.d/init.d/dhcpd stop
 stops the dhcp daemon
 running setup-dhcp  changes the boot time options for the DHCP daemon.
 you can show the current status by running 
 chkconfig --list dhcpd
 you will get an output such as:
 dhcpd           0:off   1:off   2:off   3:on   4:on   5:on   6:on
 if you do not want DHCP running at the next reboot
 chkconfig --level 123456 dhcpd off
 you should end up with 
 chkconfig --list dhcpd
 dhcpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

^ Top of Page ^

Useful Links for Cisco 7940 & 7960

We have gathered and recorded here links to web resources that helped us with our setting up our Cisco phones to run with trixbox®.

^ Top of Page ^