Hi,
If we take the PSDK Java as an example you add a ChannelListener
[code]
channel = new TServerProtocol(new Endpoint("PSDK-Sample-App", "<Not Specified>", 7000, options));
channelListener = new ChannelEventsListener();
channel.addChannelListener(channelListener);[/code]
[code] /**
* Implements ChannelListener. Handles channel Open, Close events and
* Channel Errors.
*/
private class ChannelEventsListener implements ChannelListener {
/**
* Change model state to connected.
*/
public void onChannelOpened(EventObject arg0) {
}
/**
* Change model state to disconnected.
*/
public void onChannelClosed(ChannelClosedEvent arg0) {
setConnected(false);
displayControlMessage("Connection closed! \n" + printThrowable(arg0.getCause()));
}
/**
* Display channel errors on the main panel.
*/
public void onChannelError(ChannelErrorEvent arg0) {
displayControlMessage(printThrowable(arg0.getCause()));
}
}
}[/code]
This will tell you if the TServer is down, there are also EventLinkConnected and EventLinkDisconnected events that indicate if the PABX CTI link has gone down.
Even though the TServer will handle the HA failover itself you will need to implement some logic at startup in the scenario where the Primary TServer is down and you need to connect to the Backup TServer. I would recommend that you use the WarmStandby Application block to handle HA.
Thanks,
Pete.