Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Getting IP address by directory number in JTAPI / DeviceListX.asp

I'm working with CallManager 3.3(2). Is there a way to get the IP address of a phone by the directory number in JTAPI?

If not, where can I get the file DeviceListX.asp?

I would be happy, if someone could send me the DeviceListX.asp to hobbes(a)swissinfo.org...

3 REPLIES
New Member

Re: Getting IP address by directory number in JTAPI / DeviceList

DeviceListX.asp is included in 3.3(3). However I was able to just copy paste this file to 3.3(2) and it worked like a champ. It will not give you IP by directory number but by Phone's MAC or by its description. However some people like to include directory number in description which you might be able to use. Here is what you will get. Notice that extension is included in description in this case.

New Member

Re: Getting IP address by directory number in JTAPI / DeviceList

of course, a directory number could be on multiple phones, so you may get back multiple ip addresses.

just looking through the docs, this should work (haven't tested it yet):

...

Address a = provider.getAddress("123456");

Terminal[] t = a.getTerminals();

for(int x = 0; x < t.length; x++) {

if(t[x] instanceof CiscoTerminal) {

CiscoRTPInputProperties p = ((CiscoTerminal)t[x]).getRTPInputProperties();

System.out.println(p.getLocalAddress().getHostAddress());

}

}

New Member

Re: Getting IP address by directory number in JTAPI / DeviceList

just tested it.

this works, but only when the terminal has a connection. so you can add it to your observer receiving term events, and just keep the ip address it reports.

callum

202
Views
0
Helpful
3
Replies
CreatePlease to create content