cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
493
Views
0
Helpful
5
Replies

How to get the Phones-IP in ASP?

Trepper73
Level 1
Level 1

Hi, does anybody know how to get the IP of the Phone in ASP from which i am working and how to get the IP of any other Phone, possibly identified by the user, logged in on that phone?

Thank you very much and best regards,

Thomas

5 Replies 5

aaronw.ca
Level 5
Level 5

Check out the DeviceListX functionality, available in CallManager 3.2(2b) and 3.3+. It allows you to get a list of devices (name, ip, description, calling search space, device pool, status) registered with CallManager.

Note that you can only call this at 60 second intervals (preferably longer), so you may need to cache the data returned by this for use by your applications.

Information on this function is available in the latest IPPS SDK.

carlson
Level 1
Level 1

I can't tell you how to get the user information from the phone without the DeviceListX function, but I do know how to get the IP address. Just use the PhoneIP = Request.ServerVariables("REMOTE_HOST") in your ASP page to get the address.

What you do with it from there is up to you.

hi carlson!

could you explain this method to get the ip-address of a phone in more detail? you said "PhoneIP = Request.ServerVariables("REMOTE_HOST")", but which "remote_host"? for example, i have the mac-address and the dn of the phone and want to get the ip? how could i accomplish that with your way?

thx jochen

Hi Jochen,

If you just want the IP Address of the phone calling your service, here is the source for a sample service that illustrates this:

<%@ Language=JavaScript %>

<%

Response.ContentType = "text/xml";

sIPAddr = Request.ServerVariables("REMOTE_HOST").Item;

%>

IP Address

The IP Address of the calling phone is: <%=sIPAddr%>

hi,

thanks for the source, it works fine but isn't what i'm looking for at all!

i'm developing a ani-service and must have the ip of the called phone! it seems that i have to use the devicelistx-function! but my problem is, that i connect to the devicelistx.asp through a java-urlconnection and don't know how to get the info's back in java?

another idea is, that i synchronize the ccm-sql-db with a second db-system and than make a db-query with java odbc! sure, it's not the best way, but i'll try it!

jochen