Cisco 7970G + Asterisk

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

  1. Asterisk 1.4.18
  2. Cisco 7970G (firmware: SIP70.8-3-4SR1S)
  3. 2 Cisco 1811 routers (IOS: 12.4(15)T1)

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)

Cisco 7970 Configuration XML

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.

Asterisk Configuration

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.

MWI Fixes

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:

  1. Asterisk adds some extra (and seemingly unneeded information) to the voice mail notices
  2. Cisco decided not to follow the RFC on the SIP protocol and thus it ignores these notices with extra information.

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.

  1. Asterisk 1.4 introduced the “BUGGYMWI” flag for the sip.conf file. When defining an extension simply add the line “BUGGYMWI = true” and it will make the proper adjustments to the notices for Cisco compatibility.
  2. Before compiling the Asterisk source code you can modify a line in the “chan_sip.c” file to remove that extra information permanently.

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(&amp;t, &amp;maxbytes, "Voice-Message: %d/%d%s\r\n", newmsgs, oldmsgs,
(ast_test_flag(&amp;p-&gt;flags[1], SIP_PAGE2_BUGGY_MWI) ? "" : "(0/0)"));

Now all you must do is simply replace the last line with this:

ast_build_string(&amp;t, &amp;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!



10 Responses to “ Cisco 7970G + Asterisk ”

  1. cityguru says:

    I have tried your instructions, line by line, did the never for NAT and yes for Qualify in asterisk. I have even changed network environments where I have a different router and different internet connection. but no luck
    However the template you posted has the following
    I apologize for the above format, i tried to put in the XML tags but they dont make it through

    Does this need to be changed?

    I have also tried the following


    I also did one variation where I put in my external IP, that too did not work

    But that too does not work, is there any other field that is missing that I need to put in?

    Please let me know, so far without VPN or being on same network I am not seeing this phone register remotely. I am even using the same Firmware version on the config file.

    Please let me know if i am missing something

  2. The NAT setting did not appear to make any significant changes in either scenario. I can use the phone on NAT with natEnabled set to “false” and I can use it locally with natEnabled set to “true”

    The reason that my NAT works in this instance is most likely (almost certainly) due to the Cisco 1811 router doing some SIP magic when it processes NAT. In fact, if I enable debugs on the router, it specifically mentions processing for NAT.

    At this point, I would say the only way to get NAT working is on a compatible Cisco router (or other router that is SIP aware).

  3. Roman says:

    I would like to try your instructions. For some reason I dont see the firmware you mention on cisco site. Is is possible you can point me to the right direction on where to get this firmware?

    Thanks in advance,


  4. The software from Cisco can be downloaded at the following locations:
    (NOTE: You must have an active support agreement with Cisco to be eligible to download the firmware or IOS. The links provided below will ask for you to login.)

    7970G Firmware:

    Cisco IOS (for the router):

  5. Josh Noonan says:

    I tried the cnf.xml and it says error verifying config info. I have tried a couple of other firmware and XML files and had them work successfully. Any idea on what should I check? This is the latest version of the XML/firmware I could find out there.


  6. ItsRoy says:

    Josh… try taking out the Nat stuff from your SEP.cnf.xml & you’ll see that your “error verifying info” goes away. Of course, you won’t be nat’ing, but the error goes away. /;)

    I’m pounding on it right now trying to figure out the magical incantantion.
    Did you make any progress?

  7. Bill says:

    Could you possibly provide details of the NAT setup on your 1811?

    I’m particularily interested in the NAT config on the 1811 and how it is “SIP Aware”.

    I’m also interestd in seeing the DMVPN config if you could provide that.


  8. Sean says:

    I’m having this NAT issue… What commands did you issue to IOS to make it play nice and bridge the gap between your asterisk box and your 7970?


  9. Mike Lary says:

    guys im noticing these phones send this sip message:
    Via: SIP/2.0/UDP;

    compared to say the 7940 which sends this and registers fine:
    Via: SIP/2.0/UDP 133.334.556.6:5060;branch=z9hG4bKa9abf37a

    First one sends VIA internal IP the second (working case) send VIA external IP.

Leave a Reply