[asterisk-users] How to recieve number returned by $AGI->wait_for_digit($timeout)

Will Payne will at teambadger.co.uk
Fri Jan 8 05:02:26 CST 2010


On 8 Jan 2010, at 09:14, Zhang Shukun wrote:

> i use $AGI->wait_for_digit($timeout)  to wait for the user press key 1
> ,and then to do something.
> 
> but how can i get the return number ?
> 
> is that use $key = $AGI->wait_for_digit($timeout)
> 
> and $key will be "200 result=49" if i pressed number 1?



$key = $AGI->wait_for_digit($timeout);

if (chr($opt) eq '1') {
  # do stuff..
}


W




More information about the asterisk-users mailing list