07-18-2005 08:26 AM - edited 03-13-2019 09:50 AM
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.
07-18-2005 09:27 AM
It looks like you're already beyond this, but just in case:
Did you download the Sun Jtapi 1.2 API specs?
http://java.sun.com/products/jtapi/download2.html
Check the callcenter packages...
And of course the Cisco API docs:
specifically:
And the Jtapi interest groups should be useful as well, such as this example from Stephan that might help:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0502&L=jtapi-interest&P=R104&D=1&I=-3
07-18-2005 07:15 PM
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);
}
}
07-18-2005 11:02 PM
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.
07-19-2005 12:41 AM
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
07-19-2005 12:56 AM
i see....hmm the point is that I dont want to stream media, just implement some routing options. But thanks!
07-19-2005 01:06 AM
Bingo! the message chart below seems to be the one! thanxs, I will try it!
07-19-2005 02:16 AM
:'( I can register the route point, but I don't get any route events after registeringcallback. Which exact observers do I need to add?
07-19-2005 03:16 AM
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
07-19-2005 04:06 AM
ok so just like a normal address...and then the route events wont ever be fired? the ones implemented on the routeCallback interface
07-19-2005 06:32 AM
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!
07-19-2005 11:26 AM
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
07-19-2005 11:39 PM
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
07-25-2005 09:02 PM
I think your cti route point device needs to be a device that is controlled by the user when you initialize the provider.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide