DTMF detection problem


In my setup, I am calling from a mobile to one extension of Asterisk- My code in extensions.conf is as below.

exten => steve,1,Dial(SIP/steve);
exten => mark,2,Dial(SIP/mark);

exten => s,1,Answer
exten => s,n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, …"
exten => s,n,WaitExten
exten => 1,1,Goto(submenu,s,1)
exten => 2,1,Hangup

exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
exten => s,n,Wait,2
exten => s,n,Background(submenuopts) ; "Thanks for calling the sales ;department. Press 1 for steve, 2 for…"
exten => s,n,WaitExten
exten => 1,1,Goto(call1,steve,1)
exten => 2,1,Goto(call2,mark,2)

There are many things that are not happening for me like:

  1. Background(thanks) does not play
  2. Answer happens and waitExten happens but during wait extension if I dial DTMF digit 1 or 2, nothing happens and the call is hanging.

For my application I want:

  1. Auto answer the incoming call
  2. Wait for 5 digit extension to be dialled
  3. Authenticate the 5 digit extension and route the call to the desired extension.

Please help me in doing this implementation.