Have Asterisk not hangup both channels for a call

I have an Asterisk install running as a call director using queues and agents. Everything works great except for one piece right now. When a call comes in and the menus are traversed correctly, the call enters into a dialplan in the exensions.conf based on the menu options selected. Most dialplans will place the call into a series of queues that will place a call to all agents logged into that queue at that time. When an agent (or agents) picks up the phone, they are greeted with a prompt to press the “1” key to accept the call. If they are the first agent to do so, they are bridged with the other channel and handle that incoming call. In order to have Asterisk play that message and wait for the “1” key, I am using a macro that all agent calls enter when answered. The problem I have is that if the agent hangs up before the call is connected, the original call is hungup as well. I would like to know if there is a way to enter into the “h” context in the macro when the agent hangs up and to somehow tell asterisk to NOT hangup the original callers channel at this time. In essence, I don’t want the hangup of an agent to hangup the call at this stage. Any way to do this?

I think this is a limitation of macro. If you can think of a way to not use macro (goto, gosub, local channel), go for it.