Asterisk Channel Redirect After AMD Verification

Dear,
Experts I need your helps to reach my goal… below I share my dialing plan

[AmdStart]

exten => _X.,1,Ringing()
same => n,Dial(SIP/${EXTEN}@VerifySIP,30,U(checkAMD^s^1^${EXTEN}))
same => n,Hangup

[checkAMD]

exten => s,1,Progress
same => n,Set(DialNo=${ARG3})
same => n,Background(en/silence/1)
same => n,AMD
same => n,NoOP(The Answering Machine status is ${AMDSTATUS})
same => n,GotoIf($["${AMDSTATUS}" = "HUMAN"]?NextDP:Unverified)
same => n,Hangup()
same => n(NextDP),NoOp(Your Call Is sending to next route)
same => n,Goto(NextRoute,${DialNo},1)
same => n,Hangup()
same => n(Unverified),NoOp(Your Call Was Not Reaching Or Received By Machine.)
same => n,Background(telemarketercalling)
same => n,Hangup()

[NextRoute]
exten => _X.,1,Progress()
exten => _X.,n,Dial(SIP/${EXTEN}@CN_NCLI,60)
exten => _X.,n,Hangup()

I want to test/verify first callee/outbound/B Party LEG is real human or machine by using AMD & ones its verified it will redirect to another route/trunk by hanging/redirect AMD or previous channel, by above dialplan its verifying perfectly,

AMD_Verify*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/testpin-0000003f 8601818103900@AmdSta Ring    Dial(SIP/8601818103900@VerifySIP
SIP/VerifySIP-0 s@checkAMD:4         Up      AMD()
2 active channels
1 active call

but issue is its not hanging up or redirect previous dial, its started another dial like below.
After verify when channel go to next dialing plan channel is like below.

AMD_Verify*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/testpin-0000003f 8601818103900@AmdSta Ring    Dial(SIP/8601818103900@VerifySIP
SIP/VerifySIP-0 8801818103900@NextRo Up      Dial(SIP/8601818103900@CN_NCLI
2 active channels
1 active call

I want that it will hanging up or redirect previous channel & dial channel like below

AMD_Verify*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/testpin-0000003f 8601818103900@AmdSta Ring   Dial(SIP/8601818103900@CN_NCLI
1 active channel
1 active call

I hope I make clear my question & understandable, Thanks for your attention. Waiting for your feedback.

You seem to be dialling the number that you just decided was unacceptable, so I’m not certain I’ve put together what you want to achieve properly, but if you are talking about redirecting the caller to a different number, see this part of the documentation of the dial application:

NOTE: You cannot use any additional action post answer options in conjunction with this option. Also, pbx services are run on the called channel, so you will not be able to set timeouts via the TIMEOUT() function in this routine.

GOSUB_RESULT
    ABORT - Hangup both legs of the call.
    CONGESTION - Behave as if line congestion was encountered.
    BUSY - Behave as if a busy signal was encountered.
    CONTINUE - Hangup the called party and allow the calling party to continue dialplan execution at the next priority.
    GOTO:[[<CONTEXT>^]<EXTEN>^]<PRIORITY> - Transfer the call to the specified destination.

Than you very much David for your reply

I already clearly mentioned my goal & number is not related to it, no I am not talk about redirecting the caller to a different number, I am talking about redirecting the caller to a dial by different trunk/gateways ones its verified.

I exactly want this
CONTINUE - Hangup the called party and allow the calling party to continue dialplan execution at the next priority.

Ones is verified called party it will Hangup the called party and allow the calling party to continue dialplan execution at the next priority.

Hope you understand what I mean to say. & now you able to guide me proper way… T.I.A

You seem to have answered your own question. However calling through different next hop isn’t fundamentally different from calling a different final number, as far as Asterisk is concerned. You can, for example, encode the next hop in routing digits or in the context.

Your answer is really complicated for me… I didn’t even understand how did I answer my own question, if I was knew answer for sure I wasn’t asked for help.

I hope I make clear my question enough if you understood, please help me with easiest way.

This is what I interpreted be you answering your own question:

Yes but how can I do that, you never guide me about that or not any example to archive it.

I don’t do paid consultancy, which would be necessary to give you a complete and tested solution. I simply try to provide hints as to information you may have overlooked.

Well I love to pay for it, But I guess here is not possible to pay, shall we join somewhere else & make it done?

You may find there are other people here who are prepared to take on consultancy work, or even do it pro bono, but this isn’t primarily a marketplace for consultants and I don’t know of anywhere that is.