Splitting text (which is what the numbers you speak would be, as all output from the speech recognition engine is) can be done, though to recognize a command consisting of an arbitrary combination of numbers, you'll want to use wildcards (which are a somewhat unsupported feature, but as you mention the longer strings of numbers are recognized correctly, would likely work well enough in this case), and a static keyword that VoiceAttack can match against.
E.G. "enter *", or "numbers *", so that you could speak "enter 0824627". Do note that the speech recognition engine will interpret certain sequences of numbers as a specific format (E.G. a phone number), and may add markup.
If the keys you are looking to press are the regular (I.E. non-numpad) numeric keys, that could be done using the "Quick Input" action (in combination with the "{CMD_AFTER}" token).
Otherwise, something like this could work:
Set text [~input] to '{CMD_AFTER}'
Start Loop : Repeat From 0 to [{EXP: {TXTLEN:~input} - 1}], using indexer [~i]
Write [Blue] '{TXTSUBSTR:~input:~i:1}' to log
End Loop
which will output each character as a log entry. This can be adapted to use a number of conditions instead, to check which number was spoken and press the relevant key using a keypress action.
If each number corresponds to a numpad key, on the other hand, that's only a slight modification:
Set text [~input] to '{CMD_AFTER}'
Start Loop : Repeat From 0 to [{EXP: {TXTLEN:~input} - 1}], using indexer [~i]
Quick Input, '[NUM{TXTSUBSTR:~input:~i:1}]'
End Loop
Information of the actions and features used can be found in the documentation; Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.
These topics may also be of use:
Control flow (If, Else, ElseIf, Loop, Jump) basicsVariables and tokens summed upIf you experience markup getting added, you can use the "{TXTNUM:}" token to strip non-numeric characters, though do note that "-", for example, is interpreted as part of a number if it's next to one.