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

Created by: Arvind Sharma on 08-02-2013 09:10:32 AM
Looking at the latest JTAPI APIs.
 
I see the CiscoTerminal has states:

CiscoTerminal.DEVICESTATE_ILDE
CiscoTerminal.DEVICESTATE_ACTIVE
CiscoTerminal.DEVICESTATE_ALERTING
CiscoTerminal.DEVICESTATE_HELD
CiscoTerminal.DEVICESTATE_UNKNOWN
CiscoTerminal.DEVICESTATE_WHISPER

And I also notice the events coming in the Observer for the Terminal :

TermConnRingingEv
TermConnActiveEv
 
 
Question:  How much in real time the state of the Terminal is updated with the event I would observe in the observer thread ?  For e.g. If a Terminal is getting a incoming call  (RINGING), I would see the TermConnRingingEv event in the observer thread. If I just want to check the state of that terminal to determine if it is Ringing or not, can I just check for the CiscoTerminal.DEVICESTATE_ALERTING  ?
 
 
Arvind
 

Subject: RE: JTAPI 9.1.1
Replied by: David Staudt on 08-02-2013 10:08:45 AM
Your basic assumptions are good ones: if you just need a snapshot of the device at a point in time getDeviceState will be highly accurate.  If you want to display states dynamically/real-time (event driven) use an observer.

I would say observer/events is 'more robust' in the sense that you can get both static and dynamic functionality that way, but if you just need a snapshot - for example an instantaneous decision to send a call to a device based on whether it is busy or not - then observer/events (and the state machine, threading and handling overhead) may be 'overkill'.

Subject: RE: JTAPI 9.1.1
Replied by: Alexander Anikin on 08-02-2013 09:49:00 AM
Connection states can change in means on milliseconds.
You can check current state through CiscoTerminal.getDeviceState() == CiscoTerminal.DEVICESTATE_ALERTING.
Meanwhile the state of teminal can change already. Not a big deal if you want to show current state to user, but might be not that good if you plan to record missed calls.

Subject: RE: JTAPI 9.1.1
Replied by: Arvind Sharma on 08-02-2013 09:57:12 AM
Okay. So if my application wants to show some kind of UI with dynamically changing Terminal State - it can use the Obsrever events. And if the app just want to show the Terminal state at that point in time, checking CiscoTerminal.getDeviceState() would do the job.
 
Correct ?
 
I guess I am debating which route it will be more robust. The events also change very quick in an active call  (Incoming Call->Alerting-?Ringing etc). Would relying on the Terminal state will be more accurate ??
 
 
Thanks!
 
Arvind
 
 
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