Configuring a Cisco 9951 Phone for Asterisk

Was this helpful? Share it!

    Keep in Mind

    The Cisco Unified IP Phone 8961, 9951, and 9971 phones were not designed to work with any phone system other than Cisco Unified Communications Manager. So, this effort is essentially a hack. If you are OK with certain features not working, like the Contacts button or aspects of Voicemail indication/calling, proceed. If you are looking for tight integration between your endpoints and your Asterisk PBX, you’ll want to consider a phone that supports Asterisk, such as a Polycom, Snom, Grandstream, Aastera, or Linksys device.

    What are the Tricky Parts?

    Cisco phones have never been terribly straightforward to configure. The 9951 introduces a few more curveballs, which I will mention here. Other peculiar aspects, which the 9951 shares with the previous 79XX series of phones have been left out as there are ample resources available elsewhere.

    The 9951 brought these additional challenges:

    • SIP over TCP support only (no traditional SIP over UDP allowed)
    • A particular bug that can cause troubleshooting confusion
    • Seemingly different XML configuration requirements

    Configuring Asterisk for SIP over TCP

    We are using Asterisk 1.8, so adding TCP support is simply a matter of configuration. I believe this is a similar case for 1.6. If you are using Asterisk 1.4, you will need to determine how to add TCP support as it is not native.

    There are two steps to configuring SIP over TCP. The first is to enable it at the global level in Asterisk. Add the following to your SIP configuration. If you’re using vanilla Asterisk, you can put this in your sip.conf file below [general]. If you’re using FreePBX, the most appropriate place is in sip_general_custom.conf.


    Next, make sure that transport=tcp for each extension that you plan to use the 9951 with.

    Once you’ve completed these steps, open the Asterisk CLI and run sip reload to apply the settings.

    Self Call Bug

    We found that calling ourselves from the 9951 and then answering the call resulted in the phone keeping a “dead” call open on the screen. This seems like nothing more than a visual artifact, but it actually causes loss of additional functionality on the phone. During our troubleshooting, we’d SSH into the device and issue reset soft commands to force the device to grab it’s new configuration. Once we had one of these dead calls, reset soft would no longer do anything, adding to our confusion as we tried to get the phone up and running. Beware!

    XML Configuration Files

    Yes, the part that most of you have been waiting for. Here is the configuration that ended up working for us. You will want to modify this configuration and save it to a file named SEP[MAC_ADDRESS].cnf.xml on your TFTP server. Replace all of the bracketed sections with your applicable settings.

    Note: Make sure that the proxy node under the sipLines/line node remains set to USECALLMANAGER. We were unable to get the device to register with Asterisk when we individually added the hostname or IP of our PBX here.

             <timeZone>Pacific Standard/Daylight Time</timeZone> 
                <member priority="0"> 
                      <processNodeName>[YOUR PBX HOST/IP]</processNodeName> 
          <phoneLabel>[LABEL THAT APPEARS AT TOP OF SCREEN]</phoneLabel> 
             <line button="1"> 
                <featureLabel>[LINE LABEL ON SCREEN]</featureLabel> 
                <name>[SIP EXTENSION]</name> 
                <displayName>[SIP EXTENSION]</displayName> 
                <authName>[SIP EXTENSION]</authName> 
                <authPassword>[SIP PASSWORD]</authPassword> 
                <contact>[SIP EXTENSION]</contact> 

    We also found that the dialplan.xml file is respected as it was with previous Cisco phones. Ours looks like this, though yours may vary:

    	<TEMPLATE MATCH="91.........." Timeout="0"/>
    	<TEMPLATE MATCH="911" Timeout="0"/>
    	<TEMPLATE MATCH="\*.." Timeout="0"/>
    	<TEMPLATE MATCH="[1-8].." Timeout="1"/>
    	<TEMPLATE MATCH="*" Timeout="5"/>


    The Cisco 9951 has a Messages button on the front that presumably integrates with a Cisco Communications Manager to provide some form of visual voicemail. We have yet to find a way to reprogram this button to integrate with Asterisk.

    As a workaround, we’ve created a speed dial button that does connect directly to Asterisk Voicemail. We added this config to our SEP[MAC_ADDRESS].cnf.xml file:

    <line button="2">

    Outstanding Issues

    We’d still like to find answers to the following:

    • How can we wire the Messages button to automatically dial *97 (Asterisk Voicemail)?
    • Can we configure the Contacts button to show contacts populated by an XML file? Setting DirectoryURL didn’t seem to do anything.

    Control Apple Devices and Apps

    SimpleMDM allows you to configure, secure, and track iPads, iPhones, and OS X remotely, via the web. SimpleMDM provides advanced functionality usually exclusive to convoluted enterprise offerings.

    Was this helpful? Share it!
      Rating: 4.6/5. From 5 votes.
      Please wait...

      47 thoughts on “Configuring a Cisco 9951 Phone for Asterisk”

      1. I have contacts working pretty well on the 9971 with the latest version of freepbx. I adapted some PHP scripts from an ancient trixbox installation to pick up directory entries from a contacts table in mysql and made that php script available to the 9971 via the XML file using this entry:


        In addition, i used another script that allows searching of contacts and added that to the provisioning section using these config lines:

        Search by Name

        Finally, I set 2 under

        This gives me a very functional contacts button on the 9971 that provides a contact list search function on top and a list of all contacts from the database right below.

        I learnt all of that from lots of googling so very little of this is my original work, except for the customizing of scripts and experimenting with config files to get the contacts button to function just as i wanted.

        Rating: 5.0/5. From 1 vote.
        Please wait...
        1. @Jayant – Thanks for this information. We haven’t had a chance to try it out, but seeing that the 9971 has a lot of similarities with older Cisco phones, it seems that there’d be a good chance that this would work. Hopefully we can get some additional feedback from the community on this.

          Thanks again!

          No votes yet.
          Please wait...
        2. Warum gibt es keine Fotos von der Rückseite mit der Gürtelschnalle ? Völlig undästernvlich.Ausserdem ist die Tasche überhaupt nicht bestellbar, da nur 1 verfügbar ist und die ein anderer bereits im Warenkorb hat. Schade….

          Rating: 2.3/5. From 3 votes.
          Please wait...
        3. May you please share how to configure the button of cisco 7821 as i already create the XML file with below syntax and when press the directory button i got “requesting…” with no result.
          what may be missing in my configureatoin.

          IP Telephony Directory
          People reachable via VoIP



          No votes yet.
          Please wait...
      2. Hi,

        Beware of the loadInformation tag – the file it points to is for a 7945.

        No votes yet.
        Please wait...
      3. The above XML file has worked with inbound and outbound calls working. Just need to tweek the features file, and dial plan files for my needs. I had been working on this for about 18 months on and off, and just as a joke I tried it again, dead tired, and WHAM, worked! Thanks to everyone who put the effort and time in for this, much appreciated!

        No votes yet.
        Please wait...
        1. Thanks for the kind words, Mike. The nature of these phones and their config make it extremely difficult to debug hand-made XML so when we find something that works, we share it!

          No votes yet.
          Please wait...
      4. Spoke a BIT too soon. When there is a missed call, the number is still displayed on the right hand side, and they keep getting listed but only if unanswered. if answered, the number disappears from the list when hung up on, but will leave any missed calls. They cannot be removed until a power cycle, reset or reset all is not available since the phone thinks its still in a call. Conference calls and transfers do not work for some reason either.

        Rating: 5.0/5. From 1 vote.
        Please wait...
        1. I did confirm that the line:
          4 is UDP
          The other options were 1 and 2, one is TLS and the other is TCP, sorry I cannot recall which is which. However this has been documented on other places, google is your friend…
          I am 100 % sure 4 is UDP because only supports UDP

          No votes yet.
          Please wait...
          1. Funny, that “4” was cut and pasted, but that was for TransportLayerProtocol.

            No votes yet.
            Please wait...
            1. Also Note that the Field ” PhoneLabel” has a restriction on amount of characters, with 9 characters (Alphanumeric) it worked for me, even with spaces, with 13 it did not. The problem is that the phone has an issue validating the XML file, and will not load it. This can be seen on the admin/status/staus messages. Having the Cisco 9971 connected to a call manager, the Phone label is my phone number, 10 digits, so this MIGHT be the limit of characters.

              Rating: 5.0/5. From 1 vote.
              Please wait...
              1. PhoneLabel is limited to 12 characters across all the 79xx devices

                No votes yet.
                Please wait...
      5. i was try to register cp-9951 on asterisk but not register. firmware update and others succes but not reigister. i am using elastix. could you help me .thank you for your invitation

        No votes yet.
        Please wait...
      6. Thank you for sharing ! This post was very helpful in resurrecting those “zombified” cisco terminal .

        Merry Christmas

        No votes yet.
        Please wait...
      7. Thanks for this helpful example, unfortunately I’m using FreeSWITCH and doesn’t seem to work for me. I simply copied and pasted your example (with my own settings for sip server etc) and it didn’t work. I also updated my firmware to 9.4.

        FS is listens for TCP and UDP at the same time. I’m assuming there shouldn’t be too much of a change for this to work with FS.

        Any ideas on how I can debug what is happening with the registration ?

        thanks again

        No votes yet.
        Please wait...
        1. It sounds like having some extra debug information would help point you in the right direction. I suggest running a SIP trace (this can be done with a third party software like Wireshark or FreeSWITCH may provide a built-in utility). You could also investigate debug options on the Cisco phone, though I am not familiar with any in particular.

          Hope this helps!

          No votes yet.
          Please wait...
      8. does anyone try to use KEM unit with asterisk,my 9971 working with asterisk well ,but i tried to activate the KEM unit to work with it, unfortunately not succeed…

        No votes yet.
        Please wait...
        1. Hi Cem,

          Can you finally activate the KEM unit?
          Today I get a KEM unit and I’m trying to activate.

          Also, this extra unit need a POE plus port in the swith or an external power.


          No votes yet.
          Please wait...
          1. Yeah I din28#&d17;t actually take that shot, I just ripped it from flickr. It IS nice, isn’t it? Yeah I think that place is a front for money laundering or something dark. I always get creeped out by it. I wasn’t going to eat there anyway, but now I’m DEFINITELY not going to. That place is on my permanent black list.

            No votes yet.
            Please wait...
      9. Any luck with getting the “dead calls” off the screen at all? That seems to be the last piece of this puzzle. I now at least have it registered properly and making AND recieving calls…

        No votes yet.
        Please wait...
      10. Hi, thank you so much for your help and insights. I’m fighting with some 9951 because I can’t get them to show the Call History. The LCD button is greyed out and there’s no Call History app in the Apps menu.

        Any ideas or tips to make this work??

        No votes yet.
        Please wait...
      11. Dear Andres!

        Would be so kind to share your files? eg. dump or config.xml
        thx a lot in advance!

        No votes yet.
        Please wait...
      12. Struggling with this. Trying to get a 6941 running SIP running with FreePBX…..Running a wireshark trace, it appears to pull it’s xml config, and the .loads file via a HTTP GET request, not TFTP as i’d imagine.

        I have tried serving the files to it both by TFTP and HTTP, but it still just says ‘Phone not registered’

        Can upload a pcap if someone wants to take a look but running out of ideas


        No votes yet.
        Please wait...
      13. Good post. I learn something totally new and challenging on blogs I stumbleupon everyday.
        It’s always exciting to read articles from other writers and practice a little someething from
        their web sites.

        Have a look att my web site; Safaris in Botswana

        No votes yet.
        Please wait...
      14. Great info here.

        Is there a way to get the phone to register to user@domain instead of user@ipadd? The phone resolves the domain to an IP address and registers with that. This does not work for multi-tenancy, where the switch uses the domain/subdomain info for registration.

        I tried changing the proxy from USECALLMANAGER to a domain name to no avail. Any ideas?


        – Phil

        Rating: 5.0/5. From 1 vote.
        Please wait...
        1. @Phil,

          Did you ever get this figured out with the domain/subdomain? If so, what did you do? I have several phones that I would like to get setup for this, but running into the same issue as you have shown here. I’ve ran wireshark captures and I see the issue, and have even tried modifying the XML file with the displayName and even the name with the user@fqdn with still no success. Can’t understand why older phones have no issue with this, but newer phones do.



          No votes yet.
          Please wait...
      15. I got a Cisco 9951, the missed/dead call bug is happening even with the latest firmware sip9951.9-4-2SR1-2.
        However it doesn’t happen with the firmware sip9951.9-2-2SR1-9 or older.

        So I guess a workaround for now, is to downgrade the firmware to sip9951.9-2-2SR1-9 or to an older version than that.

        I hope this helps someone.

        Rating: 5.0/5. From 3 votes.
        Please wait...
        1. Could you post your config for the 9951.
          I tried downngrading the firmware to sip9951.9-2-2SR1-9 yet still having the missed call bug.

          btw, here is a wonderfull link covering all parameters in the SEP conf file

          No votes yet.
          Please wait...
      16. please can someone share with me the authentification.php and directory.php file for cisco phone 79XX i will really appreciate thanks in advance

        No votes yet.
        Please wait...
      17. Hello,
        I am trying but does not work. Can you share an example of the config in asterisk for sip.conf?

        No votes yet.
        Please wait...
      18. Thanks a lot, man!

        No votes yet.
        Please wait...
      19. Here there is a script that may help people with the configuration of the cisco files. It is not finished but it can be adapted to modify configuration files aswell as to show important configuration values:

        No votes yet.
        Please wait...
      20. Hello, I managed to register to my local number on a fritzbox and to my asterisk line by writing USECALLMANAGER in proxy node under the sipLine and the ip of fritzbox / asterisk in . The problem is that I can not register the two lines simultaneously as I can just write one ip on processNodeName and the fritzbox and asterisk have different local Ips, anyone know a workaround to connect two lines simultaneously from different ip?

        No votes yet.
        Please wait...
      21. IT WORKED ON CISCO 8941 !!!!!!
        RUNNING FIRMWARE SIP894x.9-2-1-00

        No votes yet.
        Please wait...
        1. Ciao Gustavo,
          avrei bisogno di contattarti per la configurazione del modello 8941?


          No votes yet.
          Please wait...
        2. Hi, you can share your entire xml file.
          I’m with the same problema than Phil (first comment). I need to register with domain name not IP address but even I setup domain (fqdn) the device send ip to my freeswitch server.

          No votes yet.
          Please wait...
        3. Hi, you can share your entire xml file.
          I’m with the same problema than Phil (first comment). I need to register with domain name not IP address but even I setup domain (fqdn) the device send ip to my freeswitch server.

          No votes yet.
          Please wait...
      22. Is there no possibility to config Cisco 9951 via Web? 🙁

        No votes yet.
        Please wait...
        1. As I said above, I’ve started a graphical interface to configurate SIP for cisco. The project is not finished but it is able to show all parameters via browser and as a service that can be seen directly in the cisco screen. I just need to add a form in the service and you will be able to change sip parameters in the telephone itself or a browser.

          Please check the project here:

          No votes yet.
          Please wait...
      23. Hi,
        I am using here Cisco 8961 with Dlink DVX2005f ipbox. still i didnt get any access from 8961 by graphical interface and support.
        I need the help for access this phone with Asterisk. Because this phone for our Boss.

        No votes yet.
        Please wait...
      24. good morning nice people, I have the same issue as ” Mohamed”:

        May you please share how to configure the button of cisco 7821 as i already create the XML file with below syntax and when press the directory button i got “requesting…” with no result.
        what may be missing in my configureation.”

        Also my 7821 keep showing requesting. Has anyone a working example of directory working on a 7821?

        thks in advance


        No votes yet.
        Please wait...
      25. To work messages button and directories


        Missed Calls


        Received Calls

        Placed Calls



        The directory.php file in this link –>

        Works for me

        No votes yet.
        Please wait...
      26. Thank you for sharing this nice XML.

        I just have one last issue. When I call external, I do not hear called people (but he hear me!).
        I do not have this issue for local call
        I do not have the issue with other phones (cisco 303, jitsi)

        No votes yet.
        Please wait...
      27. Pingback: movie review buy
      28. Pingback: Buy Adobe Acrobat
      29. I see you don’t monetize, don’t waste your traffic, you can earn extra cash every month
        with new monetization method. This is the best adsense alternative for any type
        of website (they approve all sites), for more info simply search in gooogle: murgrabia’s tools

        No votes yet.
        Please wait...
      30. @Phil, @Gordon or anybody

        Have you ever found any workaround to this problem?

        Is there a way to get the phone to register to user@domain instead of user@ipadd?

        Please share & thanks-


        No votes yet.
        Please wait...

      Leave a Reply

      Your email address will not be published. Required fields are marked *