[asterisk-users] take input and store in variable

Edwin Lam edwin.lam at officegeneral.com
Tue Oct 5 20:08:03 CDT 2010


On 10/4/10 12:27 PM, Tom Lohmuller wrote:
> I am using a context to change values in a DB. Currently in my context, I
> am passing it to
>
> exten =>  s,1,WaitExten(7) ; 7 seconds to input
> exten =>  s,n,Set(NEW_VAR=${EXTEN})   ;Here is my problem. This is the only
> way I know how to 'grab' user input, which was normally from ${EXTEN} but
> I realize this won't work for extension 's'......
>
> The short google search I did didn't turn up anything concrete.

try:

exten => s,1,WaitExten(7)

exten => _X!,1,Set(NEW_VAR=${EXTEN})
exten => _X!,n,<do other things>...
.
.

exten => t,1,Hangup() ;hang up if no input for 7 sec.

-- 
Edwin Lam <edwin.lam at officegeneral.com>
Systems Engineer, OfficeWyze, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0xD6506D20




More information about the asterisk-users mailing list