Re: [Asterisk-java-users] Events blocked by Responses?
Brought to you by:
srt
From: Stefan R. <ste...@re...> - 2007-08-24 01:11:36
|
In this case you sould send the originate action asynchronously (i.e. provide a callback to sendAction), then nothing will be blocked. As an alternative you might want to look at the originateAsync methods in DefaultAsteriskServer. =3DStefan Andy Burns wrote: > Using asterisk-java 0.3 to talk to the Manager API of asterisk 1.4 >=20 > I based my code off the tutorial and have expanded from there >=20 > I connect to the manager > add an event handler which just prints out the event > send an originateaction with a callback handler > the callback handler prints out the response > the action has a 30 second timeout set > if the origiated call is connected my extension will play an asterisk > sound file and then hangup > all this works ok >=20 > now I'm trying to track the progress of the call through the response > callback and the events delivered to my listener >=20 > For example when the originate action is sent, I do NOT answer the > external SIP call >=20 > after the timout period I get my callback with an "Error" response and > with "Originate failed" as the message, this is expected. >=20 > However only after the response callback do I get the stream of events > to my listener for > NewChannelEvent,NewCallerIdEvent,NewStateEvent(Ringing) and finally > HangupEvent >=20 > Should events be delivered synchronously, rather than being blocked by > the pending response to my action? >=20 > If so is this a manager API limitation or an asterisk-java limitiation?= >=20 > Thanks for any help >=20 >=20 >=20 > -----------------------------------------------------------------------= -- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser.= > Download your FREE copy of Splunk now >> http://get.splunk.com/ >=20 >=20 > -----------------------------------------------------------------------= - >=20 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |