I have dialplan like follows
[phones]
exten => 4000,1,Answer()
exten => 4000,1,Background(Welcome)
exten => 4000,1,WaitExten()
Above should be able to take extension information from caller but in my case it is taking input from one who receives the call.
description of WaitExten() is as follows: page 128, Book “Asterisk: The future of Telephony”
Both Background() and WaitExten() allow the caller to enter DTMF digits.