The Cisco 7970G IP Phone is by far one of the nicest VoIP Phones i have ever used. However, getting it to work outside the standard Cisco Call Manager environment with Asterisk can be a challenge. After weeks of testing various configurations and tweaking settings on both the phone and Asterisk, i was able to finally get a working configuration that works for both local network connections and NAT as well.
As with any setup there are some prerequisites that must be met to perform this setup. It is possible that other configurations and software versions will work, however this is what I have currently working. You are welcome to let me know if you have other setups that work.
My Configuration & Setup
I successfully tested the following configurations with the phone:
The NAT Setup*
7970G <–> 1811 (w/ NAT) <–> Internet <–> 1811 (w/ NAT) <–> Asterisk
The DMVPN Setup (Same as a local network)
7970G <–> 1811 <–> Internet (VPN) <–> 1811 <–> Asterisk
The DMVPN setup was the most trivial as it was essentially a local network with the Asterisk server. The NAT setup was the harder one to get working, however, once I got a configuration file that worked with NAT, the same configuration worked for the DMVPN or local setup as well.
*I believe that one of the keys to getting the 7970G working over NAT was the fact that it was behind a Cisco router (the 1811). Because this router’s NAT implementation is SIP aware, it is able to properly handle SIP messages over NAT from the 7970G. This being said, the 7970G may not function properly over NAT on other routers.
XML Configuration File
Below you will find the link to my XML configuration file (with passwords and IP’s of my private network removed of course)
NOTE: The file should be in the form “SEPmac_address.cnf.xml” when you place it on your TFTP server. where mac_address is the MAC address of your Cisco IP phone.
In order to get the Cisco 7970G to register to asterisk (either over NAT or VPN) the NAT flag in your sip.conf (or in FreePBX) must be set to “never” and qualify must be set to “yes”. I know it seems counter intuitive to keep NAT turned off when you are behind it but for some reason Asterisk’s NAT implementation breaks Cisco phone connections. Qualify is needed because it keeps the NAT translation open between the Cisco phone and the Asterisk server. Should the translation be allowed to close, Asterisk will not be able to reach the Cisco phone.
The second part to this was making sure that MWI worked on the phone. This has become somewhat of an issue due to a couple reasons:
Cisco firmware version 8.0.2SR1 is able to handle the extra information and thus this is the firmware that many people using this phone have stuck with despite the numerous newer releases that have come out. Any version after that must use one of the following methods to get MWI working again.
I opted for option #2 for two reasons. First, it just seemed cleaner to make the change once and not have to worry about it again (until i upgrade that is) and secondly, FreePBX does not provide an easy way to add the “BUGGYMWI” flag into extensions.
In order to remove this from chan_sip.c permanently, go to your asterisk source code and then go to the “channels” folder. From there open up the chan_sip.c file and search for the following:
/* Cisco has a bug in the SIP stack where it can't accept the (0/0) notification. This can temporarily be disabled in sip.conf with the "buggymwi" option */
ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d%s\r\n", newmsgs, oldmsgs, (ast_test_flag(&p->flags, SIP_PAGE2_BUGGY_MWI) ? "" : "(0/0)"));
Now all you must do is simply replace the last line with this:
ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d\r\n", newmsgs, oldmsgs);
And then compile Asterisk.
I hope this guide helps everyone that loves the Cisco 7970G phone to get it working with Asterisk. It can be a difficult task but is well worth the effort once it is working. Please feel free to leave comments with any suggestions to this article and let me know if you have gotten any other configurations working!