# File lib/adhearsion/voip/asterisk/ami/actions.rb, line 55 def <<(packet) if packet.error? @error = packet.message complete_sync! end # We don't keep every packet, just the important ones. @packets << packet if keep?(packet) # Check if the synchronous portion of the action is done. if completed_by?(packet) # The synchronous portion is done. complete_sync! # We're totally done if it is not asynchronous. complete! if not async? end # Check if this is an asynchronous action, and we have received the last event complete_async! if completed_by_async?(packet) end