How to execute diaplain code when queue member was timeout

Dear all,
I was designing the IP PBX that have implemented some features from SwitchVox. One of features were to forward callers to another extensions (or external phones) if callee don’t answer.
How do I do the feature with calls have come from Queue ?
Support I have a queue ‘abc’ with two members SIP/300, SIP/301. I have setup a rule that If SIP/300 don’t answer callers in 3 ring cycles, forwarding callers to the voicemail of SIP/300. How do I do with calls come from Queue? I can’t control call processing logic of Queue.
Please help me.
Thanks very much

you can set timeouts on queues.

Thanks for you reply, david55
Yes, I must use timeout options of Queue application. But what I need was how to know which SIP phone (or queue member) will ring? Because I need execute some logic on the SIP member before Queue application ring it. I have used to use Local channel for queue member, but I can’t send some informations from “Local context” to “Primary context”. In addition, there are some problems regarding Local channel. Ex: Queue application have detected incorreectly SIP phone (queue members) states
Please help me,