#!/bin/bash

echo 0 > queue_bytes.txt
for i in `seq 1 2100`; do
	asterisk -rx "queue show" > /dev/null;
	sleep 0.2
	asterisk -rx "memory show summary" | grep queue | while read a b c d e f; do
		QUEUE_BYTES=`cat queue_bytes.txt`
		if [ $QUEUE_BYTES -ne $a ]; then
			echo "$a $b $c $d $e after $i iterations"
			echo $a > queue_bytes.txt
		fi
	done
done
rm -f queue_bytes.txt
