cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
495
Views
0
Helpful
13
Replies

JTÀPI and CTI route points

aleja
Level 1
Level 1

Hi,

i have been reading around about how to control CTI route points with JTAPi. Is it right that you must first register the api by:

routeAddress.registerRouteCallback(callbackRouteImpl);

Anything else? I don't seem to be able to register.

thanxs!

alej

ps.- the routecallbackImpl implements the routecallback interface.

13 Replies 13

ckatene
Level 3
Level 3

No, i don't think this is right - or rather, i do it another way. create 3 observers - a TerminalObserver, a CallControlCallObserver and an AddressObserver. use addObserver() and addCallObserver() to add it to the CiscoRouteTerminal (which is what a route point is), then get all the terminal's addresses and add use the address's addObserver() and addCallObserver() to add the observers. finally, use the register() method of CiscoRouteTerminal.

c

Terminal[] t = prov.getTerminals();

for(int x = 0; x < t.length; x++) {

System.out.println("Disa: Adding observers to "+t[x].getName());

t[x].addObserver(terminalObserver);

t[x].addCallObserver(callObserver);

if(t[x] instanceof CiscoRouteTerminal) {

System.out.println("Disa: " + t[x].getName() + " is a CiscoRouteTerminal. Registering");

CiscoRouteTerminal crt = (CiscoRouteTerminal) t[x];

CiscoMediaCapability[]cmc={CiscoMediaCapability.G711_64K_30_MILLISECONDS};

crt.register(cmc,CiscoRouteTerminal.NO_MEDIA_REGISTRATION);

}

//now add the observers to all the addresses

Address[] a = t[x].getAddresses();

System.out.println("Adding observers to addresses of " + t[x]);

for(int y = 0; y < a.length; y++) {

a[y].addCallObserver(callObserver);

a[y].addObserver(addressObserver);

}

}

thanxs! but I dont understand something, why do we need to go through the RouteTerminal? for normal address unless for terminal specific functionality you dont need it.

I can't answer your question. I have always tried to use the classes and interfaces from the JTAPI 1.3 specification (while including the cisco jtapi jar in the classpath somewhere), but to get anything more than basic functionality, you need to use the specific Cisco classes. the register() method of CiscoTerminal is a good example. Reading the JTAPI 1.3 spec, you would assume that you would use a RouteAddress, but I have never been able to make that work, like you. Maybe we've just been using it incorrectly ...

The following url shows the message sequence charts, which is where I picked up on how to register a route point. c

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

i see....hmm the point is that I dont want to stream media, just implement some routing options. But thanks!

Bingo! the message chart below seems to be the one! thanxs, I will try it!

:'( I can register the route point, but I don't get any route events after registeringcallback. Which exact observers do I need to add?

You need a TerminalObserver, an AddressObserver, and a CallControlCallObserver, which is a subinterface of CallObserver. Add the TerminalObserver and the CallControlCallObserver to the Terminal, and the AddressObserver and CallControlCallObserver to each of the Terminals Addresses.

It must be a CallControlCallObserver (not just CallObserver) or you will not be notified of any Call Control Events.

All the work is done in the CallControlCallObserver. Look out for CallCtlConnAlertingEv or CallCtlConnOfferedEv, which indicates a call is being presented to the route point.

c

ok so just like a normal address...and then the route events wont ever be fired? the ones implemented on the routeCallback interface

still not clear, it doesn't work. Even if I try the JTrace example my CTI route point is unreachable, no events of any kind are fired. I added the code to register the route terminals, so the address appears as in service, but still nothing. Any ideas? thanxs!

I would forget RouteAddress and RouteCallBack, and use the CallControlCallObserver interface. Maybe you could post your code?

What are you trying to do, exactly?

c

Well I cant forget about routeAddress because I want to route calls on the cti route point. Anyway, the message sequence is ok, I had a ccm problem and now it works. I would like to clarify to those interested that if you only want routing functionality, you don't need to add any call observers to the routeAddress.

cheers,

alej

I think your cti route point device needs to be a device that is controlled by the user when you initialize the provider.