Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
JTAPI (JTAPI) Developer Center
Overview
Documentation
Community
Wiki
Testing
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to Cisco JTAPI Questions
Call Observer issue
Threads [
Previous
|
Next
]
pjoliet@iptrade-networks.com (simulated)
Posts:
1
Join Date:
5/18/10
Recent Posts
Call Observer issue
Answer
7/9/12 5:10 PM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
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
}
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Mohan Potluri
Posts:
155
Join Date:
7/26/08
Recent Posts
RE: Call Observer issue
Answer
7/10/12 12:11 AM as a reply to pjoliet@iptrade-networks.com (simulated).
Mark as an Answer
Submit
Reply with Quote
Quick Reply
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.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Overview
Documentation
Community
Wiki
Testing