cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
414
Views
1
Helpful
2
Replies

JTAPI Getting Conference parties

mervkwok1
Level 1
Level 1

HI guys,
I'm trying to get a list of conferenced parties from CiscoConferenceEndEv by calling the cev.getFinalCall().getConnections() method.

The problem I'm hitting is, sometimes I'll get the entire list of participants, sometimes I'll get a NullPointerException. (Stack below)

Does anyone have an idea why this happens?

 

java.lang.NullPointerException: null
at com.nexlabs.iptel.misc.TerminalLogger.callChangedEvent(TerminalLogger.java:782) [classes/:?]
at com.cisco.jtapi.ObserverProxy.Z(CTQF) [jtapi115.jar:11.5(1.18900)-2 Release]
at com.cisco.jtapi.ObserverThread.messageReceived(CTQF) [jtapi115.jar:11.5(1.18900)-2 Release]
at com.cisco.cti.util.MessageThread.append(CTQF) [jtapi115.jar:11.5(1.18900)-2 Release]
at com.cisco.cti.util.MessageThread.CTQF(CTQF) [jtapi115.jar:11.5(1.18900)-2 Release]
at com.cisco.cti.util.MessageThread.run(CTQF) [jtapi115.jar:11.5(1.18900)-2 Release]

2 Replies 2

dstaudt
Cisco Employee
Cisco Employee

In general you will want to avoid performing JTAPI operations during the course of a JTAPI event callback - the best practice would be to return as quickly as possible, processing the event information separately, i.e. in another thread/message queue.  Not sure that's what's happening, but a thought...more here: Threaded Callbacks
My first guess at what's happening is some kind of race condition, where your app thinks the conference is fully established, but the JTAPI library is not yet ready.  It would be interesting to put a small (non-blocking) delay in before getConnections() - if that reduces the occurrence of the null pointer exception, then you may need to look at which event your app is using as a signal of conference 'ready' state (and ensure JTAPI has a chance to fully process its threads - see above).
Another thing to keep in mind is that call signaling events and media events are somewhat de-coupled in CUCM - they may not always arrive in the same order (i.e. media start events for the conference could arrive before the conference signaling events do).  Make sure you are awaiting the right kind of events - media vs. signaling...call/address vs. terminal- to update the JTAPI library state before making requests. 

Thanks! Out of curiosity, is there a best practice/method for querying for conference parties during a call?