cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
578
Views
3
Helpful
15
Replies

Personal Service

Mike-1985
Level 1
Level 1

Hi all!

I want to make a service that identifies the device to generate the right content. I know how to get the device's IP (given with the request) and MAC-adres. But this is not good enough, I want to get the phone-number. So that when I move to an other location and log into the IP Phone over there (other IP and Other MAC-adres, but same phone-number), i still recieve the content related to my phone-number.

How will I do this? If there is an other (better) way, i'm listening ;)

15 Replies 15

Sascha Monteiro
Level 6
Level 6

well, there is a really easy way,

create a parameter on the ipphone service called extn, so when users subscribe to the service, they need to enter their extension number...

This way it follows the Extesnion Mobility profile

eww. The proper way to do this is add ?device=#DEVICENAME# to the service url, which'll get your service the device name for the first request. Based on that, you can query the EM service to get the user id of the user currently logged in, and from that you can show the proper content. The advantage is that you are extension independent, so any changes as well as multi extension configuration won't pose a problem.

?device=#DEVICENAME# will give me the MAC adres of the IP Phone. But then i need it's current IP adres...

/ccmadmin/getdeviceip.asp?devicename=

Or is there an better option? When using DeviceListX i'll have to cache the results because it can only be accessed once a minute. I don't want to use this because it is not realy up-to-date.

Thanks for the replies

I'd be very surprised if the programming language you're using wouldn't allow you to extract the source address of your request (and that address is the IP of the phone that is calling your service). Hence supplying the IP address isn't necessary, you get that for free.

And just so that we don't understand each other: an IP phone service is something that the user requests from his phone. If you have some application sitting on a server just pushing out content without phones ever requesting it, that's an application and that's a whole different ballgame.

When I push out information, I do so via JTAPI so I don't have to worry about IP addresses.

You are right on the first part... But as you sugested, i'm trying to make an server application with C# that pushes xml to a particular IP Phone. I'm using TAPI (http://www.julmar.com/) to monitor all the phones. And when some event happens i want to push xml to that phone.

The only way i know of how to push xml is with an POST request to the phone using it's IP. How is this possible with TAPI without it's IP?

Thanks in advance!

Well, you need to study the TAPI documentation. I only use JTAPI and Cisco has extended JTAPI to permit the sending of XML data to any phone.

If you cannot do that via TAPI, then you will have to access the DeviceListX report periodically to get the IP addresses - or in CCM5 use AXL Serviceability.

You can only access DeviceListX once a minute. Would this be the best you can get without AXL? i've seen also this:

https://172.16.200.1/ccmadmin/getdeviceip.asp?devicename=SEP00059A3C7800

I could use that every time i want to push xml or maybe cache de DeviceListX report. What would you suggest to do?

Thanks for you time :)

If you don't want to use AXL, you can save the results from devicelistx.asp in your application (I just save it as XML file and query it using xPath, really easy to do). You can also have your application regularly pull devicelistx.asp (like once an hour) to make sure you have the latest list of phones. By the way, you don't necessarily need TAPI or JTAPI to push to phone. You can push to phone using the simple HTTP push. If you are using Java, check out Apache HTTP Client library. You can push an XML object to a specific IP with a few lines of code.

I'm using c#. I allready know how to push xml via POST to a phone :) Got the TAPI working with my c# application. The onlything i'm looking for is the best way to push xml to a phone: POST request or TAPI...

If this can be done by using TAPI this will save me some time and coding (then i don't need to get the devicelistx etc etc).

I haven't found anything yet about pushing xml via TAPI, via JTAPI i did instead.

At this moment i've a proper solution:

Every 30 minutes my c# application gets an xml document with phone ip's (via DeviceListX). This file will be cached on the server. And i'm using a HTTP POST request to push xml data to the phone.

Yet an other question:

I've got the MAC-adres (via TAPI) and IP (via DeviceListX). How can I receive the current user logged onto the device?

Thank for any help!

Use AXL. Send a getPhone request and look for the 'currentProfile' or 'currentProfileName' elements.

Or use the EM Service directly.. you can give it a device name and it'll tell you the user id of the currently logged in user. Or access the DB via axl by sending this sql query:

SELECT LoginUserid FROM Device WHERE Name = '" + deviceName + "' AND LoginTime IS NOT NULL

Those just gets you EM logins. If you also want to catch static device owners, modify the query so that it'll look like this:

SELECT LoginUserid FROM Device WHERE Name = '" + deviceName + "'

thanks for you replies!

I've been doing some research on the AXL-service. But haven't found a good documentation with some examples. Do you might know where i can find some more information? Also about 'using the EM Service directly'

Thanks again!

I think the AXL programming guide (http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_usage_guide09186a008071edcb.html) should help you get started with AXL. Also download the IP Phone Services SDK.. it contains sample java classes that use AXL (http://www.cisco.com/cgi-bin/dev_support/access_level/product_support)

As far as EM goes, here's the link for CCM 4.2: http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_usage_guide_book09186a008071c16c.html

And this is THE page that you should add to your bookmarks: http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_reference_guides_list.html

It contains all programming guides for Cisco voice products.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: