Showing results for 
Search instead for 
Did you mean: 
This document was generated from CDN thread

Created by: Aaron Ragheb on 27-04-2010 10:44:26 PM
I am trying to get the name of the logged in user to a line that I am monitoring.
I start monitoring by issuing a provider.createTerminal(macAddress)   (I am monitoring a super provider).
There is no call on the line, therefore I am unable to use the CiscoCall.get* methods.
I thought perhaps the getAsciiLabel for the CiscoAddress might be what I want, however, I am unable to register the terminal with CUCM.  The developer's guide says to:
however, I am unable to see that CiscoProvFeatureID has any thing other than MONITOR_CALLPARK_DN  defined.
I am using jtapi 7.1.3.
So, I don't really care how I get the user name associated with the line (when not in a call) there a recommended way of doing this?

Subject: RE: Trying to get caller ID type info
Replied by: Mohan Potluri on 28-04-2010 06:54:00 PM
To confirm that you are using the correct version run, 'java CiscoJtapiVersion'.  Let us know the full version number.
7.1.3 version should have TERMINAL_REGISTER_UNREGISTER_EVENT_NOTIFY defined in CiscoProvFeatureID.
You indicated that you are unable to register the terminal. Are you seeing exceptions when createTerminal API is called? The parameter for this API is the device name as seen on CUCM admin (typically SEPmacaddress).
If you know the DN, you could do (assuming that it is not a shared line with different display names on each line)
CiscoAddress adr = (CiscoAddress)provider.getAddress("DN");
System.out.println("name = " + adr.getAsciiLabel(null));
Tracking the terminal register and unregister events using registerFeature(CiscoProvFeatureID.
TERMINAL_REGISTER_UNREGISTER_EVENT_NOTIFY) would be useful/needed if display names get changed frequently.
Let us know how if the above pseudo code is useful.

Subject: RE: Trying to get caller ID type info
Replied by: Mohan Potluri on 29-04-2010 09:51:59 PM
CiscoAddress.getAsciiLabel() will return what is configured in ASCII Display (Internal Caller ID) field of the line in CUCM admin. if nothing is configured null will be returned.
To get the EM user you need to use CiscoTerminal.getEMLoginUsername().  When a user EM logins to a device, Cisco JTAPI applications will see CiscoProvTerminalUnRegisteredEv and CiscoProvTerminalRegisteredEv events if registerFeature() API is used to register for these events. After seeing CiscoProvTerminalRegisteredEv, application can call CiscoTerminal.getEMLoginUsername() to get the userid. A null return value indicates that there is no active EM login.

Subject: RE: Trying to get caller ID type info
Replied by: Aaron Ragheb on 29-04-2010 08:32:42 PM
Hi Mohan,
   I am indeed using 7.1(3.100000)-1.  It compiles now; I must have had a stray 6x jtapi.jar.
If we call CiscoAddress.getAsciiLabel() with null, we get: No registered terminals or active
or, if we call it with the terminal in question: SEP001D4595845D is not registered
This is when using a super provider.  If I add the device to to list of controlled devices for my application user, I then get a "null" back from the call.
Is this label supposed to be the logged in user name?
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:

Quick Links