I read a book has this example
"
Example 3.1 A Very Simple extensions.conf
[default]
exten => s,1,Answer()
exten => s,2,Background(thank-you-for-calling-conglomocorp)
exten => s,3,Background(conglomocorp-mainmenu)
exten => s,4,Hangup()
exten => 100,1,Dial(SIP/10)
exten => 200,1,Dial(SIP/20)
When a call enters the [default] context, it is answered by Asterisk. Asterisk then starts playing the mainmenu sound file while waiting for the caller to enter digits.At this point, the caller can either enter 100 and be connected to the channel SIP/10 or 20 and be connected to the channel SIP/20. If the menu finishes playing and the user has not entered any digits, the call will be hung up on. "
And I made my dialplan like this:
[test_context]
exten => _30XX,1,Answer()
exten => _30XX,2,Playback(silence/10)
exten => _30XX,3,Hangup()
exten => 201,1,SayNumber(2)
I am thinking that, if I dial a number for example like 3001, Asterisk will play me back a 10 second silence, during that 10 seconds if I dial 201, I am supposed to have a number 2 played back from Asterisk. But The whole dialplan does not work as I expect. if someone could help figure out this question
Thanks