cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
918
Views
0
Helpful
14
Replies

Getting a SEP from userID or phoneNumber

venca.zahyb
Level 1
Level 1

I need to get SEP or IP address of device, where is logged a user. I know his phoneNumber and his ID, so how can I get an IP or SEP?

(with AXL or via SQL... - doing it in ASP/js)

1 Accepted Solution

Accepted Solutions

stephan.steiner
Spotlight
Spotlight

All you need is love.. no seriously, the extension mobility service can be queried. You give it a user ID and it tells you on which phones the user is logged in to (yes, it can be multiple but if you allow/disallow that depends on your ccm configuration).

As usual, you can find the documentation here:

http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_reference_guides_list.html

View solution in original post

14 Replies 14

stephan.steiner
Spotlight
Spotlight

All you need is love.. no seriously, the extension mobility service can be queried. You give it a user ID and it tells you on which phones the user is logged in to (yes, it can be multiple but if you allow/disallow that depends on your ccm configuration).

As usual, you can find the documentation here:

http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_programming_reference_guides_list.html

Thanks for reply, it looks like that I want!

BUT, how can I send that request for DTD?

When I send it to "http://xxx/emservice/EMServiceServlet" via POST authenticated (xmlhttp.setRequestHeader("Authorization", "Basic " + authstring);) it doesn't return anything.

ASP... can't help you with that, but Ethereal always comes in handy.. make sure you're really sending the proper XML to the service, check your return codes, etc. The servlet mist give you something back.. at the very least you'd get an error message.

So is it or is it not possible to get this information through asp? I'm looking for the same thing, query an extension and return the SEP

It is most certainly possible from any programming language.. it just has to be properly implemented.

Here's a little trick: if you post questions that include not only a description of your problem, but a detailed account of what you have tried including sample code, that often already solves your problem as in the process of writing it down, suddenly a lightbulb goes off. Perhaps I'm just weird that way (I tend to write novels on my problems but the upside is everybody who bothers to read immediately gets what I'm rambling on about), perhaps this'll do the trick for you, too. Obviously, the success rate isn't what it's cracked up to be but I'd say about 1/3 of everything I want to post I end up not having to because I already found the solution during the process.

And, Ethereal is a necessity in your toolbox when working with phones.. even TAC will ask you for traces every now and then if you have a problem with an application.

While looking at the DB schema something struck my eye:

2.3.20.21. LoginUserid

So there you have another way to get the user ID. Send an sql command like "SELECT Name FROM Device WHERE LoginUserid 'mylogin' to the callmanager via AXL.

@update: I can do you one better. LoginUserid effectively represents the phone user or the currently logged in em user. If the field is null, there's neither an owner nor a logged in user. I'm sure there's a way to tell if em is enabled or not but I don't need to know that right now so I won't go experiment. However, when LoginUserid isn't null, you have a way of telling whether it's an em user or an actual owner by looking at the LoginDuration and LoginTime. If both are null.. the owner user id is set. If neither is null, an em user is logged in. So, in fact querying the DB now looks like the preferable solution since not only can you look up phones and users, but you can also get the "current owner" regardless of whether that's physical owner or em user.

I use http://...../emservice/EMServiceServlet and and...IT WORKS!!! But solution costs a much of time spent on this problem.

And I must say that Cisco support and documentation is for fu*, it was really hardcore coding.

So, my gift for you, who's trying to solve this problem too is attached (it's part from Cisco SDK). This is just a little, simple and WORKING solution which I use for getting UserID by SEP and SEP bz UserID.

How to use it?

var EMP = new EMProvider(callManagerAddr,callManagerAdmin,callManagerAdminPassword,someUserId,someUserPassword);

var xmldom = EMP.sendRequest(1,""+SEP+"");

var uid = xmldom.getElementsByTagName("userID");

........

Dear All

i have a question:

I'd like to search device by Directory Number (i need to get the SEPxxx) BUT i dont have user logged in (extension mobility disabled).

How could i perform it via AXL (executeSQL or other methods?)

Thanks

Problem Solved!

I've found this SQL query (i write here if could help someone):

-----------------------------------

select Device.name from numplan, devicenumplanmap, device

where

(

numplan.dnorpattern like '%123455'

and

numplan.pkid = devicenumplanmap.fknumplan

and device.pkid = devicenumplanmap.fkdevice

)

-----------------------------------

Any idea what I have to do to be able to download attachments from these forums?

All I see is:

Attachment Keywords :

1) emprovider.asp

Thanks

Under Attachments Keywords, there should be another section with the heading "Attachments" followed by a table with a single attachment in it. You may need javascript enabled to be able to download it. Click the picture to the right of the EMProvider.asp attachment name (the picture looks like a page with an arrow pointing into it) and it should ask you to confirm that you understand the agreements etc etc, then you can click it again and it should download.

Even without javascript enabled you should be able to see the atachment table (with an expires column).

Yes, you will need javascript... but if you cannot see the blue arrow for download, just pasted this in your URL address bar (make sure javascript is on) and hit enter

"javascript:acceptableUse(55055);"

w/o the quotes

Hmmm....no table appears and copying and pasting the javascript link does not work either. Javascript is definately enabled on my browsers (firefox and ie). Any idea who I can report this to in order to see if it is perhaps an account issue?

Thanks

Unless what you are doing is strictly in-house (and not even then), you should consider using SNMP or AXL.

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: