I am looking for a way to dynamically get a list of queues that an extension is a part of as part of an evaluation in my dialplan.
I was thinking I could use the data in the MySQL asterisk.kvstore_FreePBX_modules_Queuestats. Each record seems to list all the extension users and their queues, but there are thousands of records and I am now sure how to pick the latest one?
I tried sorting ascending and descending on id (not a listed field, but query took). Does anyone know how to get the latest entry (which I am hoping would show the latest updates to queue agents)?