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


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to