Hangup channel and continue dialing another?

Hi folks,
Little help?

The flow:

  1. Incoming call
  2. AGI script checks destination numbers (the result is more than one)
  3. Dial the first destination and when it answers to require some DTMF input.
  4. If the dialed number entered that DTMF, connect the incoming call to that person and exit.
    4.1. If the destination do not enter the DTMF, hangup the channel and dial the next person.

I’m making an “originate to extention” (meanwhile I’m PlayTones(ring) and then Wait(300) to the incoming channel), when the destination answered it’s redirected to a “Read” application and if it press something the channels are bridged (application “Bridge”). Everything is OK, except for 4.1. Can’t figure it out how to hangup the channel and dial the next person without exiting the dialplan.

Thanks.

Hi.

You could simply set a variable like (hangup-continue=1) and after that just hangup. You will go to h extension in your context and check if the variable hagup-continue is set - if yes, jump to a continue logic; otherwise finish there or made some cleanings before end.

HTH,
Ioan

I’m trying to avoid “h” extension, but I’m running out of options… I’ll make some tests.
Thanks