« Back to Cisco JTAPI Questions

Call Observer issue

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,

I'm a newbie in JTAPI app and I'm trying to reuse a JTAPI app I have not written.

Basically this app is supposed to monitor placed/received calls on cisco phone.
The issue is that I can retrieve extensions that has to be monitored but I never receive any call notification.

If someone has a quick idea, it would be helpfull, I'm using a CUCM 8.6.

Thanks

public class ProvController implements ProviderObserver, CallObserver {
private Config param;
static Condition conditionInService = new Condition();

Terminal[] p;
int termIndex = 0;
private boolean done = false;
private Terminal myTerminal;
Calendar timer;
Provider provider;


public void Start(Config param) {

setParam(param);

try {

JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
System.out.println("Récupération des Peers");
String providerString = param.getCucmHost() + ";login=" + param.getCucmLogin() + ";passwd=" +
param.getCucmPassword() + ";";
System.out.println("Contacting:"+providerString);
provider = peer.getProvider(providerString);

provider.addObserver(this);
conditionInService.waitTrue();

Address[] tblAddress = provider.getAddresses();
for (Address a : tblAddress) {
if((Integer.valueOf(a.toString())> Integer.valueOf(param.getCucmExtDebut())) && (Integer.valueOf(a.toString()) < Integer.valueOf(param.getCucmExtFin()) )){
System.out.println("Ecoute de l'extension " + a.toString());
provider.getAddress(a.toString()).addCallObserver(this);
}

}

} catch (Exception e) {
System.out.println("Exception dans le démarrage du provider controller: " +
e.toString());
}
}

public void callChangedEvent(javax.telephony.events.CallEv[] callEv) {
System.out.println("Event received"); //it never happen
}

RE: Call Observer issue
Answer
7/10/12 12:11 AM as a reply to pjoliet@iptrade-networks.com (simulated).
You may want to try jtrace sample app that displays the events in a window. Jtrace sample app is available in Program Files\JTAPITools when you install Cisco JTAPI.