Hi Marcus,
JTAPI uses the TSAPI API on AE Services so it is often useful to take a look at "TSAPI for Avaya Communication Manager Programmer's Reference". It includes the following statement in the Forwarding Event section:
"Currently, AE Services does not provide the forwarding destination in the Forwarding event. However, applications may use the cstaQueryForwarding() service to determine the forwarding destination for a device where call forwarding is active."
So this explains why you do not get the destinationAddress in the addressForwarding event. It is simply not provided by AE Services. In fact, I think it is not sent by Communication Manager to AE Services.
You also asked why getForwarding() does not provide the destinationAddress. From what I can see, the JTAPI does not actually make a cstaQueryForwarding() request when the application calls getForwarding(). It simply returns the values it has cached locally. If you change the forwarding state using setForwarding(), getForwarding() will return the correct value.
Your third question was why, after starting a new provider, getForwarding() does return the destinationAddress. When an application puts a listener on a station, JTAPI makes some requests to AE Services to get the initial state of the station. One of these is cstaQueryForwarding(). When you restart the application, it, presumably, also starts a new listener on the station and hence the destinationAddress is available.
Martin
|