IVR accept 4 digits input

Dear all,

I have IVR which accepting just 1 input 1-9.
My extensions are 4 digits , due to this if someone from outside reach IVR he needs to be able to dial expl. 8004, 6004,6002…
Currently , i can program IVR 1 Goto 6002, 2 Goto 6002… but I need 4 digit input when caller dial on IVR to be redirected to this number.

CODE:

[call] ; ivr

exten => s,1,Playback(myrecording)
same => n,WaitExten(10)

exten = > 6004,1,Goto(phones,6004,1)
exten => 8004,1,Goto(phones,8004,1)
.
.
.
.
.exten => i,1,Playback(myrecordings)
same => n,Goto(phones,9000,1)

exten => t,1,Goto(phones,9000,1)

It is working well with code below:

exten => 1,1,Goto(phones,6004,1)
exten => 2,1,Goto(phones,8004,1)

Thank you.