getdeviceip() maybe there is a solution!!!

Unanswered Question
Jun 18th, 2007

I finally think of a way to get a around it. It is not very efficient, but it kind of work.

what I did was I save the text from cisco devicelistx to an xml file in my computer. I wrote a function the load that xml file and parse the ip out and return it. Here is my version of getIP()


function getIP(phone){

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

var IPaddr

xmlDoc.async = "false";


var xmlObj = xmlDoc.documentElement;

for(var i=0; i<xmlObj.childNodes.length; i++){

//look for the correct phone

if(xmlObj.childNodes(i).getAttribute("n") == phone){

//find the phone. "i" holding the position of where the phone is in the filelist

IPaddr = xmlObj.childNodes(i).getAttribute("i");

return IPaddr;



return false;



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
stephan.steiner Tue, 06/19/2007 - 01:21

A solution for what? You'll still have to update that XML file regularly or your getIP method returns stale data.


This Discussion