provider change event / Cisco

Joerg Wiesmann <[email protected]> Thu, 8 Jun 2006 01:00:10 -0600
Newsgroups gmane.comp.java.sun.jtapi
Message-ID <LISTSERV%[email protected]>
Hi all,

may someone could explain to me, why i do always get those two events, if
someone logs out or in, of his / her phone.

CiscoAddrRemovedFromTerminalEv
CiscoAddrAddedToTerminalEv

I do always get BOTH events. Thats not what i expected.
Someone got an idea?

thx

(Cisco CallManager 4.2)

i also wrote a "mini connect" program, to check whether this is just in our
"big" application, but it wasn´t.
Here some code:


 Condition conditionInService = new Condition();

 Provider provider;

 public static void main  (String args[]) {
  CTITestClass test = new CTITestClass();
  if (test.provider == null) {
   JtapiPeer peer;
   try {
    peer = JtapiPeerFactory.getJtapiPeer(null);
//     String providerString = ControllerServlet.JTAPI_PROVIDER_STRING;
    String providerString = "[....]";
    test.provider = (Provider) peer.getProvider(providerString);
    test.provider.addObserver(test); // this connects the user...
    test.conditionInService.waitTrue();
   } catch (JtapiPeerUnavailableException e) {
    e.printStackTrace();
   } catch (ResourceUnavailableException e) {
    e.printStackTrace();
   } catch (MethodNotSupportedException e) {
    e.printStackTrace();
   }
  }
  try {
   Address address = test.provider.getAddress("532");
System.out.println("connected...");
  } catch (InvalidArgumentException e) {
   e.printStackTrace();
  }

 }

 public void providerChangedEvent(ProvEv[] eventList) {
  if (eventList != null) {
   for (int i = 0; i < eventList.length; i++) {
    System.out.println(eventList[i]);
    if (eventList[i] instanceof ProvInServiceEv)                         {
     conditionInService.set();
    }
   }
  }
 }

===========================================================================
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".