title: Retrieving/making statistics of asterisk queues using asterisk queue_log table or AMI
body: <p>Using PHP asterisk manager interface I am able to query asterisk for current queue status by issuing a QueueStatusAction. This provides me with useful statistics like:</p>
  
  <ol>
  <li>Hold time</li>
  <li>Calls abandoned</li>
  <li>Calls completed</li>
  <li>Average talk time.</li>
  </ol>
  
  <p>As far as I understand, these statistics are calculated only for the lifetime of asterisk process on the server and are lost once the process stops.</p>
  
  <p>In my application, I would like to display the mentioned statistics about queues for the last {day|week|month|year}. Is there a way to retrieve the historic statics via asterisk manager interface or some abstraction on top of it, or is it up to me to program a method for making those statistics from the data in asterisk queue_log table? </p>
  
  <p>If anybody has done this or has some idea of how to go about tackling this problem, please share.</p>