Cisco Support Community
Community Member

Categorize call from keypad


I am trying to make an application that allows to a phone operator to categorize a call. For an example if is a client that have called, he only have to press key 1, if is an claim he will press the keypad 2.

When I was looking for the information about events that can tell me that the key was pressed, I have found something that it looks to work.

The code is as follows:

Address address = provider.getAddress("355");

Terminal terminal = provider.getTerminal("355");

ComponentGroup groups[] = null;

if (terminal instanceof PhoneTerminal) {

groups = ((PhoneTerminal) terminal).getComponentGroups();


Component components[] = groups[0].getComponents();

System.out.println("Component: "+ components);

for (int i = 0; i < components.length; i++) {

if (components[i] instanceof PhoneButton) {

PhoneButton but = (PhoneButton)components[i];"Phone Button Info: " + but.getInfo());"Phone Button Name: " + but.getName());



} catch (Exception excp) {



But the problem is that I can't convert the Terminal to a Phone Terminal.

It's necessary to configure something in the device settings of CCM Admin? Or am I going on the rong way to this


Ana Soares


Re: Categorize call from keypad

PhoneTerminal is a class from the class - the Terminal returned by the provider is a javax.telephony.Terminal class, or more specifically, Cisco's implementation thereof (so a In the JTAPI documentation, you'll also find a list of what Cisco supports of JTAPI (their provider is an incomplete implementation of JTAPI 1.2) - you'll notice that the entire package has not been implemented.

However, it's easy to get digits via JTAPI.. the developer guide even mentions how - if you search for "digit" you'll find

CiscoTerminal Filter and ButtonPressedEvents?Enables applications to

receive the CiscoTermButtonPressedEv when a digit gets pressed on the


And a whole chapter on

CiscoTerminal Filter and ButtonPressedEvents

Reading that section should help you get started. You just need a terminal listener and process the appropriate terminal event and you'll get your digits.

Community Member

Re: Categorize call from keypad

hi, Stefan

Thank you for your answer, it realy helps.

Ana Soares

CreatePlease to create content