You could use a Digits element and set MinDigits to 1 (allowing 1 dtmf)
and MaxDigits to 4 (or whatever length the ext is).
You should also set the interdigittimeout to something like 2s (2
seconds) by going into the Settings tab and configuring
VoiceXML Property Name: interdigittimeout Value: 2s
(Cisco's default interdigittimeout is 10 seconds when using VXMLServer)
I just think about this and realize it might causing issue..
Since the interdigittimeout not working properly on my side (it seems..) and if user press 1 for menu, and need to wait more than 2s, and he/she enter 1 again.. it will go to extension part, not menu part...
I think only way to make it nice is make it two part? One for extension, then if user didn't do anything, then go to menu?