[Asterisk-java-users] Asynchrnous calls
Brought to you by:
srt
From: James H. <jim...@ho...> - 2008-04-22 20:10:25
|
Hi there I am currently working with Asterisk Java and trying to make a dynamic web interface. Within the system from a widget on a web page I call a servlet that begins to make the call this is all working ok but what I need the servlet to do is begin to make the call then return back to the client side immediately. So basically need to make the call to the Asterisk Server to make the call asynchrnously. Does that make sense? So far I have tried an originate action with the following details: originateAction.setChannel("whatever"); //originateAction.setChannel("foo/44444"); originateAction.setContext("context"); originateAction.setCallerId("\"Test Company\" <SOMENUMBER>"); originateAction.setExten("9"+exten); originateAction.setAccount("account"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(15000L); originateAction.setAsync(true); final ResponseEvents responseEvents; final Iterator<ResponseEvent> responseEventIterator; AsteriskChannel channel = null; responseEvents = eventConnection.sendEventGeneratingAction(originateAction,originateAction.getTimeout() + 2000); But this doesn't return to the client UNTIL the call is answered is there something else I need to do other than setting the action to async - if people need to see more of the code please let me know Regards Eggsy _________________________________________________________________ Be a superhero and win! Play the Iron Man Mashup Game http://www.ironmanmashup.co.uk |