cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
101
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: [email protected] (simulated) on 09-07-2012 12:10:14 PM
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
  }

Subject: RE: Call Observer issue
Replied by: Mohan Potluri on 09-07-2012 07:11:07 PM
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.
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:

Quick Links