How to get Dynamic Members from a existing queue?

Hi All,

How can I get the queues on which a SIP extension is a Dynamic member?
I need to develop an macro, but I can find to get this info.
Is this information in some table in the asterisk databse?