[Asterisk-java-users] question about AsteriskChannel in 0.3
Brought to you by:
srt
From: Chris H. <ch...@as...> - 2006-08-30 05:04:18
|
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. 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) Thanks again! ------------------------------------------------------------------------ -------------------------- String device = "Local/"+agentExten+"@all_calls"; int loops = 0; channel = myServer.originateToExtension(device, "all_calls", remoteNumber, 1, new Long(30000)); while (channel.getName().startsWith(device) && loops < 1000) { loops++; Thread.sleep(10); } ------------------------------------------------------------------------ -------------------------- |