Misc Destination send email

I’m trying to accomplish the following:
We have dynamic agents in queues which log in and off, I want to be able to see who is logged in or off remotely, not by logging in to the PBX GUI.

(Our employees can log in remotely from outside to a queue by dialing IVR, and one of the steps takes them to a Misc Destination which dials 8000* to log in, and one to 8000** to log off.)

I also found the following script online, which sends an email when extension ****100 receives a phone call (the script was tested and works fine):
exten => ****100,1,TrySystem(echo “Call from ${CALLERID(name)} at ${CALLERID(number)} received ${STRFTIME(${EPOCH},%l:%M:%S %p %Z on %A %B %e)}” | mail [email protected])

Question is, Can I somehow connect the 2? Is there a way for a Misc Destination to dial 2 ‘steps’? Like 8000* and also ****100? (which will automatically send me an email that he logged in/off)

Next question is, Whats the context of the agent? eg Caller ID name is ‘${CALLERID(name)}’, What would this be for Queue Agent?

If someone can help it would be great!

Thanks