Re: SV: [Asterisk-java-users] Lot of timeouts when sending actionsrepetedly
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2006-01-31 01:39:17
|
On Mon, 2006-01-30 at 14:29 +0100, Mattias Malmquist wrote: > Thanks a lot! That worked like a charm. But why? > It seems more intuitive to use the event generating method in this case the event generating method collects all events send in response to the event generating action until the corresponding action complete event has been received. (which event is the action complete event is determined by a call to getActionCompleteEventClass() on the action) it then returns a ResponseEvents object containing the received response and all received events. in your case you are handling the events by yourself and you are not even interested in the response to your action so using sendAction() with a null action event handler is the best way to go (it will be non blocking as Asterisk-Java doesnt have to wait for any response from Asterisk). > The questions never seem to end... >=20 > Are there any (easy?) way to get the same information as I can get from t= he > getQueueMemberStatus() method in Asterisk 1.0.7? I earlier explained my p= roblems > with migrating to 1.2, so sadly, that is not an option right now. no good one. you can use a command action with "show queues" and try to parse the result - but thats rather ugly. Example: CommandAction commandAction =3D new CommandAction("show queues"); CommandResponse response =3D (CommandResponse) c.sendAction(commandAction); for (String line : (List<String>) response.getResult()) { System.out.println(line); } Result: mainq has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime), W:0, C:0, A:0, SL:0.0% within 0s Members:=20 Agent/@1 (Not in use) has taken no calls yet No Callers =3DStefan |