Re: [Asterisk-java-users] DefaultAsteriskManager and queues
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2005-07-14 07:56:00
|
> Doesn't the StatusComplete come before the Queue events event have star= ted > to > arrive, so thus when they come initialized=3D=3Dtrue and the events are= not > handled internally at all but just dispatched to other registered event > handlers. That's my interpretation of the 0.1 code. You are right, the problem is indeed if the StatusCompleteEvent is received before the QueueEvents have been processed they are ignored. > If Asterisk sends out the responses sequentially, ie all Status events > before > the Queue events are even started on, it might work to reorder the two > actions (send QueueStatusAction before StatusAction) or to just send a > third > dummy action that would act as the "we're done with queues" marker. Thi= s > may > be a naive interpretation of how Asterisk works though... The events are sent out asynchronously, I think you will even get mixed Status and QueueEvents but I didn't verify that yet. The clean solution is the QueueStatusCompleteEvent. Yesterday I submitted a patch regarding this (http://bugs.digium.com/view.php?id=3D4694), so no= w we have it in CVS-HEAD asterisk at least. For the 1.0.x Asterisk one solution might be just to wait for a few seconds at startup and asume the initial state to be received then. > Yes, but then when AsteriskManager handles queues internally I end up w= ith > the > same code duplicated in two places, ie. Asterisk-Java Queue:s and my ow= n > Queue:s, both doing basically the same thing but with optionally differ= ent > names. That I'd rather want to avoid I understand... so we need to fix this to work with Asterisk 1.0.x and th= e upcoming 1.2 (with QueueStatusCompeleteEvent) is suppose, right? =3DStefan |