cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
85
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Gionata Navarra on 01-03-2010 04:36:23 PM
Good morning,
 
I'm working with a Cisco Cucm version 7.0 and trying to retrieve address events during a call.
 
I've added an observer in this way for each address involved in my call:
 
 
Address addr = provider.getAddress(callParticipants.get(0));
addr.addCallObserver(obs);
addr.addObserver(obs);
 
obs is an object that implements AddressObserver and CallControlAddressObserver, defined in this class:
 
 
public class MyObserver implements CallObserver, AddressObserver, ProviderObserver, TerminalObserver,
        CallControlTerminalObserver, CallControlCallObserver, CallControlAddressObserver {
 
 
   public void addressChangedEvent(AddrEv[] addrEvs) {
       
        for (AddrEv addrEv : addrEvs) {
            System.out.println(addrEv.toString());  
      }
}
 
but I don't receive any events.
 
What's the problem?
 
Thank you.
Gionata Navarra
 

Subject: RE: Problem with observer
Replied by: Mohan Potluri on 01-03-2010 06:29:39 PM
Your observer should implement callChangedEvent( CallEv[] eventList ) method. This will be used as a "call back" to send the call events.
 
public void addressChangedEvent(AddrEv[] addrEvs)  that you implemented allows you to get only Address events like CiscoAddrInServiceEv, CiscoAddrOutofServiceEv etc.

Take a look at the Jtrace sample application available in \program files\jtapitools after you install Cisco JTAPI.

Subject: RE: Problem with observer
Replied by: Gionata Navarra on 03-03-2010 03:52:15 PM
Ok, i've implemented callChangedEvent( CallEv[] eventList ) and it works well.
 
Another question: I have to add an observer to the call object and to every address involved or just to the call to receive these events?
 
now I've added both:
 
call.addObserver(obs);
addr.addCallObserver(obs);
addr.addObserver(obs);
 
Is it redundant?
 
 
thanks
Gionata

Subject: RE: Problem with observer
Replied by: Yohann Barre on 12-03-2010 05:40:58 PM
Hi,
 
You should add an observer and a callobserver from any address you need to monitor.
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