Disconnect user after repeating message and no imput

Comment on Asterisk i extension
whitequanda
Joined: Thu 21 of Feb, 2013

Disconnect user after repeating message and no imput

Posted:Thu 21 of Feb, 2013 (20:22 UTC)
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Read(NUMBER,9digit,0)
exten => s,4,AGI(process_nr.agi,${NUMBER})
exten => s,5,gotoif($["${action}" = "nrfailed"]?2)
exten => s,6,Wait(1)

exten => s,1000,Hangup()


okay, i wanna add to this script "set tries" function, if caller enters 5 times the 9 digit number (SSN) faulty, or doesn't enter anything at all, then to transfer the call to exten 1000 (to disconnect user)

can anyone help pls? tnku!