[Asterisk-Users] Collecting dialed digits

John Todd jtodd at loligo.com
Thu Apr 24 12:36:15 MST 2003


>I am trying to set up an auto attendant for the first time, and am having
>trouble getting to the submenu.  My extensions.conf file looks like this:
>
>[incoming]
>
>exten=> s,1,Background,menu1
>exten=> s,2,Wait,20
>exten=> s,3,Goto,s|1
>
>exten=> 1,1,Playback,option1
>exten=> 2,1,Playback,option2
>exten=> 3,1,Playback,option3
>
>It is my understanding that asterisk treats the digits entered by the
>caller at the first menu as an extension.  When I run asterisk and call in
>and enter a number for my option, I am not passed on, rather I just loop
>through.  Is there something more that I need to set up.

No, that should work.  Make sure you've reloaded the changes into 
your running system ("reload")

>Also, is there a way to store dialed digits as a variable?  I am interested
>in writing a calling card/debit card application, and I think storing the
>digits as a variable would be something that I would need to do to
>accomplish that.  If anyone as experience with that I would appreciate your
>advice as well.

You can set a variable to be equal to ${EXTEN} which is the current 
dialed number that * is matching against.

exten => _.,1,SetVar(FOO=${EXTEN})
.
.
.

 From there on out, ${FOO} will be permanently set to whatever the 
number was that you were matching against, even if the user is pushed 
through other DTMF sequences that change ${EXTEN} dynamically.

JT


>Thanks,
>Jesse



More information about the asterisk-users mailing list