Re: pick up call on CTI routepoint

Jirka Novak <[email protected]>
Newsgroups gmane.comp.java.sun.jtapi
Organization Net-System Liberec
Message-ID <[email protected]>
Hi,

> For a transfer scenario I have to pick up incoming calls on a routepoint. The
> Cisco JTAPI documentation makes me think this is possible, but leaves a lot to
> be desired. Here's how I register my routepoint:
>
> CallCenterProvider p = (CallCenterProvider)prov; // prov is a Provider
> term = (CiscoRouteTerminal)p.getTerminal(name);
> adrs = term.getAddresses();
> CiscoMediaCapability [] caps = new CiscoMediaCapability[1];
> caps[0] = CiscoMediaCapability.G711_64K_30_MILLISECONDS;
> term.register(caps, CiscoRouteTerminal.NO_MEDIA_REGISTRATION); // term is a
> CiscoRouteTerminal
>
> then when I get a CallCtlConnAlertingEv event, I do the following:
>
> TerminalConnection[] tconns = term.getTerminalConnections();
> CiscoTerminalConnection ctcon = (CiscoTerminalConnection)tconns[0];
> ctcon.answer();

I'm not know if you can answer call on route point. So I'm using
differend aproach. I'm using call routing and CTI Port:

CiscoMediaTerminal  mt=(CiscoMediaTerminal)provider.getTerminal("CTI
Port 1");
mt.addCallObserver(this);
mt.register(InetAddress.getLocalHost(), PORT_NUMBER);

/* Caps are empty */
CiscoMediaCapability [] caps = new CiscoMediaCapability [0];
CiscoRouteTerminal rt=(CiscoRouteTerminal)provider.getTerminal("ROUTE
Point");
rt.register(caps,CiscoRouteTerminal.NO_MEDIA_REGISTRATION);

RouteAddress ra=(RouteAddress)rt.getAddresses()[0];
ra.addCallObserver(this);
ra.registerRouteCallback(this);

You have to implement RouteCallback interface. When call income, method
routeEvent will be called:

public void routeEvent(RouteEvent event)
{
   CiscoRouteSession crs=(CiscoRouteSession)event.getRouteSession();
   ...
  /* check Cisco JTAPI for addresses and selectRoute */
  adresses[0]="9001"; /* CTI Port number */

  crs.selectRoute(addresses,CiscoRouteSession.ROUTEADDRESS_SEARCH_SPACE);
}

Call will be redirected to CTI Port which you have to serve and
observing. You will receive ConnInProgressEv where you have to do accept
on Connection. Call will rinnging on calling side and you can work with
CTI port as you need. If you will not accept Connection, route session
will fail in aprox 5 seconds and calling side will get fast busy.

                                        Yours,

                                                        Jirka Novak

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JTAPI-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.