怎么没人理啊!
如果有朋友知道可以发E_mail到fineair6loveme@yahoo.com
如果那个朋友有兴趣,可以用jbuilder编译这个
RouteTest Java Source
import java.applet.*;
import java.lang.*;
import java.util.*;
import javax.telephony.*;
import javax.telephony.callcenter.*;
import javax.telephony.callcenter.events.*;
public class RouteTest extends Applet {
Provider myProvider;
Address myAddress;
RouteAddress myRouteAddress;
MyRouteCallback myRouteCallback;
public void init() {
/*
* Create a provider by first obtaining the default implementation of
* JTAPI and then the default provider of that implementation.
*/
Provider myprovider = null;
try {
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
myprovider = peer.getProvider(null);
} catch (Exception excp) {
System.out.println("Can't get Provider: " + excp.toString());
System.exit(0);
}
}
public void start() {
// if Device returned does not implement RouteDN return
if (!(myAddress instanceof RouteAddress))
return;
myRouteAddress = (RouteAddress)myAddress;
try {
// register callback to route calls for myRouteAddress
myRouteAddress.registerRouteCallback(myRouteCallback);
}
catch (Exception e) {
System.out.println("exception occured");
return;
}
}
public void stop() {
if (myRouteAddress != null)
{
// cancel previous registration to route calls for
try {
// myRouteAddress
myRouteAddress.cancelRouteCallback(myRouteCallback);
}
catch (Exception e) {
System.out.println("exception occured");
return;
}
}
}
}
class MyRouteCallback implements RouteCallback
{
// for simplification this code is in the callback thread
// probably we should spawn off one thread per session
public void routeEvent(RouteEvent event)
{
// call function todetermine a destination
String[] routeSelected = new String[1];
routeSelected[0] = new String(getRoute((Terminal)event.getCallingTerminal(),
(Address)event.getCurrentRouteAddress()));
try {
event.getRouteSession().selectRoute(routeSelected);
}
catch (Exception e) {
System.out.println("exception occured");
return;
}
return;
}
public void reRouteEvent(RouteSessionEvent event)
{
// previous routeSelected did not work, ok
// just pick some default route, audix "77777"
String[] routeSelected = new String[1];
routeSelected[0] = new String("77777");
try {
event.getRouteSession().selectRoute(routeSelected);
}
catch (Exception e) {
System.out.println("exception occured");
return;
}
}
public void routeUsedEvent(RouteUsedEvent event)
{
// do something
}
public void routeEndEvent(RouteEndEvent event)
{
// session is over, clear up any objects, data, threads
// associated with this session
}
public void routeCallbackEndedEvent(RouteCallbackEndedEvent event)
{
// callback has been terminated, clear up any objects, data,
// threads associated with this callback
}
public String getRoute(Terminal callingTerminal, Address currentRouteAddress)
{
// look up some database to determine a destination
// based on callingTerminal and currentRouteAddress
// for now return a default "12345"
return ("12345");
}
}
帮我追踪一下看是怎样在内存里转换的
写了