Cisco 7965 Phone Directory Setup

The Cisco 7965 has a Directory button, which can retrieve an XML document from a website and format that as a phone directory.  Setting it up is pretty simple.

In the SEPxxxx.cnf.xml for your phone, find the directoryURL tag and set that;


Then, create that file on your web server.  An example appears below;

<Title>Home Directory</Title>
<Prompt>Select a number</Prompt>
 <Name>Pizza Shop</Name>

The items appear in the order they are listed.  I’m sure there’s more cleverness you can do with the directory, but that should get you started.

Cisco 7965 VOIP Phones Standalone (with Asterisk)

My work has a number of older Cisco 7965 VOIP Unified Communications phones, which are being disposed of.  I thought I’d grab one and see if I could make it work.  These phones are intended to be used with a Cisco Unified Call Manager & using Cisco’s proprietary SCCP protocol.  But it’s possible to re-flash them with a SIP-based firmware and configure them without UCM.

Firstly, you will need the following components;

  • A SIP server on your local network (eg, Asterisk).  That SIP server needs to support any of g729, u-law and/or a-law codecs.
  • A DHCP server on your local network, which you can customize DHCP options for.
  • A TFTP server that you can point your phone at.
  • The Cisco 7965 SIP Firmware Bundle.  I won’t link it here, but you can find it by looking through the references at the end of this article.  The exact version I used was (md5 4088c17c622a1e181b1c2b1265349df6).
  • A Cisco 7965 phone (duh) and some way to power it.

And some references.

Let’s get started.

Reflashing the Phone

Extract the entire firmware package (it should contain a number of .sbn and .loads files) into the root of your TFTP server.  Then, in that root, create a new XMLDefault.cnf.xml containing the following;

<loadInformation8 model="Cisco 7965">SIP45.9-3-1SR4</loadInformation8>

In your DHCP configuration, add option 66 and option 150 pointing to the IP address of your TFTP server.

Power up the phone, and hold down the hash (#) button until the line buttons alongside the display start blinking.  Now, enter 123456789*0# on the keypad.  The screen should flash a few times and it should then enter the updater which will reflash the firmware from your TFTP server and do a factory reset at the same time.

Once that’s done, you can verify under Settings->Model Information that the Call Control Protocol is listed as SIP.

Configuring Asterisk

I’m assuming here you are using users.conf to generate extensions into extensions.conf, and have an otherwise normal Asterisk setup.  It’s critical that the extension which the phone is using has specified ‘nat=no’, otherwise it will simply refuse to register.  Obviously change your names, secrets and extensions to suit your setup!

Put this into users.conf;

fullname = My-VOIP-Phone
secret = PASSWORD
context = my-context
qualify = yes
alternateexts = 502

If your Asterisk setup doesn’t support g729, remove it from the codec list.  Reload Asterisk, and you’re nearly there.

Configure Phone XML

Now the hard bit.  You need to create a SEPxxxx.cnf.xml file in the root of your TFTP server where xxxx is the UPPERCASED version of your device’s MAC address.

You must get all parts of this file exactly right.  Even one tiny typo will stop the phone from reading the config.  I’ll put my file here with some adjustments to protect the innocent.  Interesting parts are bolded.

In order to reboot the phone, press Settings and then (quickly) enter **#** .

<device xsi:type="axl:XIPPhone" ctiid="1234567890">
 <!-- FIXME: Set your preferred date format and timezone here -->
 <timeZone>Cen. Australia Standard/Daylight Time</timeZone>
 <!-- NTP might not actually work, but the phone can set the
 date/time from the SIP response headers -->

 <!-- This section probably does not do anything useful. -->
 <member priority="0">
 <!-- Force short registration timeout to keep NAT connection alive -->
 <!-- FIXME: This will appear in the upper right corner of the display -->
 <line button="1">
 <line button="2">

<!-- FIXME: Change this to upgrade the firmware -->

 <!-- For Sunday (1) and Saturday (7):
 Current default is to enable the display 24/7.

Fill in the details as suiting your environment, and reboot the phone.  Cross your fingers.  Changing the timezones is a particular bugbear, you’ll need to dig around to find the correct values for your timezone.  Preferred codecs can be set to g711ulaw, g711alaw, g729a, or none.

The SSH username/password just gets you past the SSH challenge, you still need a login for the phone itself (log/log will show the logs remotely though).

You can configure the six line buttons to be any combination of SIP clients or speed-dials.  An example of each is above.  Now for the one piece remaining, the dial plan.

Configuring the Dial Plan

Create a new dialplan.xml in the root of your TFTP server, containing this;

 <TEMPLATE MATCH="5.." Timeout="0"/>
 <TEMPLATE MATCH="000" Timeout="0"/>
 <TEMPLATE MATCH="106" Timeout="0"/>

 <TEMPLATE MATCH="1831-" Timeout="2"/>
 <TEMPLATE MATCH="1832-" Timeout="2"/>

 <TEMPLATE MATCH="13........" Timeout="0"/>
 <TEMPLATE MATCH="18........" Timeout="0"/>
 <TEMPLATE MATCH="19........" Timeout="0"/>

 <TEMPLATE MATCH="13...." Timeout="0"/>

 <TEMPLATE MATCH="61........." Timeout="0" Rewrite="0........"/>
 <TEMPLATE MATCH="001....-" Timeout="5"/>
 <TEMPLATE MATCH="02........" Timeout="0"/>
 <TEMPLATE MATCH="03........" Timeout="0"/>
 <TEMPLATE MATCH="04........" Timeout="0"/>
 <TEMPLATE MATCH="07........" Timeout="0"/>
 <TEMPLATE MATCH="08........" Timeout="0"/>
 <TEMPLATE MATCH="111" Timeout="0"/>

 <TEMPLATE MATCH="2......." Timeout="0"/>
 <TEMPLATE MATCH="3......." Timeout="0"/>
 <TEMPLATE MATCH="4......." Timeout="0"/>
 <TEMPLATE MATCH="5......." Timeout="0"/>
 <TEMPLATE MATCH="6......." Timeout="0"/>
 <TEMPLATE MATCH="7......." Timeout="0"/>
 <TEMPLATE MATCH="8......." Timeout="0"/>
 <TEMPLATE MATCH="9......." Timeout="0"/>

 <TEMPLATE MATCH="*.." Timeout="0"/>
 <TEMPLATE MATCH="*" Timeout="15"/>

There’s a bit of redundancy and probably errors in this, but this is what I use.  Obviously this is engineered for Australia, so it’s formatted for Australian numbers.

At the very least, that dial plan should get you started.

Hope it worked!

If all has gone well, the C7965 has registered to Asterisk, and you can test a call.  Try and receive a call first, then try and deliver one.  Use the ‘sip show users’ command to check that the phone is registering, and the ‘sip show channels’ command to view the codec that’s being used when in a call.

Good luck!