Re: [Asterisk-java-users] question about AsteriskChannel in 0.3
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2006-08-30 08:26:49
|
Chris Howard wrote: > I'm doing an originateToExtension using a local channel. I really need > to get the actual channel after the masquerading is complete. It seems= > that the masquerading takes a few milliseconds to complete so a delay > and was added until Local/10101@all_calls became SIP/joe_agent-2jd9.=20 > Can anyone think of a better way to do this. I really need to look at > the code that updates the channel as its fun to debug a channel while > the data values change while you are sitting at a breakpoint (as they > should when the status of the channel changes) You could use originateToExtensionAsync, provide a Callback and once the call is connected (i.e. inside the callback) register a PropertyChangeListener with the channel for the "name" property. This PropertyChangeListener is then called each time the name of this channel changes. Note that you should not do any heavy processing inside the callback and PropertyChangeListener as it's called from the same thread that updates other live objects and will effectivly block any other updates to be propagated (much like what you may be used to from swing). =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... |