Since I seem to be feeling rather talkative today, I figured I'd post a bit on the latest little bit of geekery I committed this week. All noted configuration file examples can be downloaded from here.
I've had a Cisco 7970 running SCCP firmware in the lab for a little, but suddenly it lacked a Cisco CallManager box to talk to when I shipped out some test gear. The 7970 is simply a gorgeous phone (although the SIP code could use some help) and I have a deep-seated requirement to use a cool piece of hardware whenever possible, I decided to hook that phone up to my Broadvoice SIP account instead of my Zyxel 2000W V2 WiFi SIP phone. Theoretically, it should have been simple -- Broadvoice offers a TFTP server for Cisco 7940 and 7960 phones, so it should just be a matter of telling the phone where to find a config file and voila.
The 7970 changed all the rules of Cisco IP phone configurations. The new config format is XML, versus the prior variable=value style configuration. This presented a problem. I could take some time and whack away using guessed values for the phone's configuration until I was able to peer with my Broadvoice account, or I could set up an Asterisk system in the lab to switch that phone and the Zyxel, and peer with Broadvoice for outbound calling.
It certainly wasn't as simple as it should be, but it's all working -- well, most of it. At the moment, if a call comes into the SIP line, both phones (extensions) ring as they should given the call group configuration. The Cisco phone, however, never stops ringing. If left unanswered, it will bleat until someone gets annoyed enough to "answer" the non-existent call. I haven't fleshed that bug out yet, but then, I've spent a total of two hours on this since Tuesday, so I'll consider myself ahead of the game.
There's lots of bits and pieces of 7970 information floating about on the Internet. Kerry Garrison's excellent Cisco 7970 tutorial was brief, but formed the kernel of the working configuration I now have. Configuration file hacking on the 7970 isn't all it's cracked up to be. I've found several interesting tidbits supporting this, such as the fact that the phone will not error noticeably during boot when it fails to parse a configuration file pulled from the TFTP server, it will just use the last config file it had. This gets interesting, since it fails to correctly parse an XML configuration file where the <phoneLabel> tag contains a value with a space character in it. Apparently, you can only name your phone Cher, Prince, or Twiggy. When this occurs, the phone does pull the file from the TFTP server, so packet sniffing will still show the file transfer, but there's no quick way of knowing if the phone is running from a cached or current config. Also, apparently some phones and/or firmware revs will request files with different capitalization from the TFTP server at boot. XMLDefault.cnf.xml, XmlDefault.cnf.xml and xmlDefault.CNF.XML may appear similar to the casual observer, but they're very different files.
I really like the 7970, though. The voice quality is superb, and it just looks fantastic on a desk, but the SIP firmware needs some polish, including a functional message waiting light. Since Cisco isn't so interested in keeping up with the SIP firmware vs. their proprietary SCCP version, that might take awhile.
But back to my PBX build. I downloaded Trixbox 2.0 beta 1 at first, but had problems with the phone connecting to the assigned extension. Backing off to v1.2.3 with Asterisk v126.96.36.199 brought the phone up properly, but that was only after playing with different 7970 SIP firmware revs, settling on version 8.0.3. Trixbox is just dead easy. Download the CentOS-based ISO, install, log in. Beautiful.
Loading firmware on the 7970 is interesting, as the phone will always query a TFTP server at boot, and will load a new firmware image from the same server if the XML configuration file includes a version that the phone isn't running. It's a relatively odd way to do it, but it does work once you've figured out exactly what the phone wants to see in that file, and have determined that the Cisco firmware release .cop file is just a tar.gz. Toss everything in that file into your TFTP root, reference the version.loads file in the phone's XML configuration (without the .loads) and reboot the phone. It should update the firmware on the resulting boot.
So with the mix of Trixbox 1.2.3 running as a VM on a VMware Server host, and Cisco 7970 SIP firmware 8.0.3, I had a functional system. Now, all I needed was to connect with Broadvoice to seal the deal. They do provide instructions on their website for configuring Asterisk, but they appear to either be wrong or outdated. They're close, but not all the way there. My working sip.conf entry for Broadvoice is simple:
The registration line is too:
Their docs refer to an extension designation at the end of the registration string which is puzzling. Using the phonenumber/accountID does the trick. Also, they reference
context=from-broadvoice when it apparently should be
context=from-pstn to permit proper inbound calling to function. I'm not entirely sure of the background here, and my Asterisk experience is limited to the few hours I had this week, so I might be missing something.
When configured as a trunk via FreePBX or manually, this configuration should work -- it does for me. You may need to add the
pedantic=no to the top of sip.conf. Also, if you have a currently registered device with Broadvoice, you might want to leave it off for an hour or more before trying to peer with them from a new device or PBX to let the previous connection timeout. This is pure rumor to me at the moment, however. YMMV.
My working 7970 SIP configuration file, SEP0014DEADBEEF.cnf.xml, is based on Kerry Garrison's example with a few modifications, including NTP sync parameters. It references the 8.0.3 firmware rev in the <loadInformation> tag. Obviously, this file will need to be renamed to use your phone's MAC address.
All told, I'm a little unsure of where to take this from here. I can call between extensions, ring in and out from both, and I will probably add another Cisco phone, probably a 7960, to the mix shortly, but the future is slightly uncertain. I don't trust this setup enough to move production voice lines to it, especially with the little continuous ring problem, but it definitely works well enough for casual use at the moment. I spent 30 minutes chatting with InfoWorld Editor-in-Chief Steve Fox through it the other day and nearly an hour with Oliver Rist tonight, and the call quality was nearly perfect with no discernible lag or dropouts, which was a shame since I can only take so much of Oliver at one go. All this was with no QoS anywhere, least of all my egress points. Not bad at all.
Oh, and if you create a directory off the TFTP root named (at least on this rev) /Desktops/320x212x12 and toss in some .png files and a List.xml file referencing them, you can put custom backgrounds on your phone. Hip.