[Asterisk-java-users] originateCall in AsteriskManager
Brought to you by:
srt
From: Tony M. <to...@am...> - 2006-05-31 20:43:22
|
Stefan, I've been playing a little bit with the AsteriskManager interface. In my application I have encountered two difficulties: 1) I have a race condition right after originating the call. I originate the call, receive the new AsteriskChannel, and then register a property change listener with it. I have no way of knowing if the channel state has changed after origination but before having registered the listener. I can probably synchronize on the channel and get a safe result, but it feels a bit awkward. 2) There is no way for me to determine the reason for the call failure when the originate returns null. For example if any of the origination parameters, such as an illegal channel, caused the failure. My application code that wraps the AsteriskManager has an interface somewhat like a JTapi API. Call call = pbxService.createCall(.); call.addObserver(myObserver()); call.connect(); Does anybody have suggestions for how to deal with (1) and (2)? Anthony Mowers http://www.amowers.com <http://www.amowers.com/> |