a little something i should point out...
keep in mind that a transfer isn't THAT different than a call... (i.e. you can't transfer to a number that isn't even in the same context... that is... if your phone is in context qm_internal and my phone is in my_internal -- you can't dial or transfer to me if one context isn't included in the other)... so maybe look into evaluating the length of the calling number (assuming you're using an internal ext scheme of say four numbers) and possibly assigning a variable of 'transfer' and then passing that to queuedial.agi...
seems to work fine for me... i.e. QM picks up the transfer etc.

but then again who am I to say what should and should not be done.