django cisco phonebook
Yesterday I was fooling around with python and trying to serve
some XML to a Cisco 7960 I have. I spent a lot of time getting
my web server set up to serve a dynamic XML page which I could pop
my phone book information into and when I finally got it done it
wouldn’t work. Searching online I found out that the latest
firmwares from Cisco, 9.*, has a couple of bugs in it dealing with
XML. Unfortunately I don’t remember where I found this information
but I can give out the sparks notes on what I saw.
When I was served the page from a web server, if it responded
HTTP/1.0 OK, no good, the phone would only accept if it was
HTTP/1.1 . I was getting some cryptic 404/BTXML errors but I could see
that the files were fine by loading it on to the production
server as a static file. Sure enough the phone was able to parse
it, so I actually moved the dynamic parts to the production
server to see if it would work as well.
After moving it, the phone can read it fine but I am getting some
errors that look like encoding problems. I am going to have to
look into this some more later, but here is what I have tried so
far as well as some notes about my setup which I will release
after I get all the problems worked out.
Set the encoding in the \<xml …\> tag that prefixes the generated
XML for the phone book.
I am using minidom.Document from python to write the XML files
and I have noticed that the ends of the strings are mac like, but
I don’t think this is a problem since apache served the downloaded
file to the phone just fine.
This has potential to be very cool, but until it gets worked out,
its useless.