cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
610
Views
0
Helpful
0
Replies

Unstable getting results from CiscoProvider.GetCall(int callLegID)

I have code:

CiscoJtapiPeer peer = (CiscoJtapiPeer) JtapiPeerFactory.getJtapiPeer(null);
  CiscoProvider provider = (CiscoProvider) peer.getProvider(host+";login="+ login +";passwd=" + pass);
  provider.addObserver(new ProviderObserver() {
  @Override
  public void providerChangedEvent (ProvEv [] eventList) {
  if (eventList == null) return;
  for (int i = 0; i < eventList.length; ++i) {
  if (eventList[i] instanceof ProvInServiceEv) {
  inService.set();
  }
  }
  }
  });
  inService.waitTrue();
  System.out.println("In servise.");
  CiscoAddress srcAddr = (CiscoAddress) provider.getAddress(dn);
  srcAddr.addCallObserver(new MyCallControlCallObserver(dn, provider))

and observer on address:

@Override
public void callChangedEvent(CallEv[] evlist)throws Exception{
  for (CallEv evlist1 : evlist) {

  if (evlist1.getID() == CiscoTermConnRecordingEndEv.ID) {
  call = provider.getCall(callid);
  if (call != null) {
  System.out.println("From: " + call.getCallingAddress() + " To: " + call.getCalledAddress());
  }
  else {System.out.println("Call is null");}
  }
  }
}

function provider.getCall(callid) returns the object is not stable. Like this -

From: 4403 To: 5215
Call is null
Call is null
From: 4403 To: 5215
From: 4403 To: 5215
Call is null
Call is null
From: 4403 To: 5215

The interval between calls 5 - 15 seconds and the duration of 3 - 7 seconds. I tried to change to handle the event - the same result.I tried to use two provider(on each node cluster) - the same result. What am i doing wrong?

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: