# Get DTMF tones from the user and say the digits

1. #!/usr/local/bin/php -q
2. <?php
3. set_time_limit(30);
4. require('phpagi.php');
5. error_reporting(E_ALL);
7. $agi = new AGI();
8. $agi->answer();
10. $cid = $agi->parse_callerid();
11. $agi->text2wav("Hello, {$cid['name']}.");
12. do
13. {
14. $agi->text2wav('Enter some numbers and then press the pound key. Press 1 1 1 followed by the pound key to quit.');
15. $result = $agi->get_data('beep', 3000, 20);
16. $keys = $result['result'];
17. $agi->text2wav("You entered $keys");
18. } while($keys != '111');
19. $agi->text2wav('Goodbye');
20. $agi->hangup();
21. ?>

Documentation generated on Thu, 30 Sep 2010 02:22:03 -0700 by phpDocumentor 1.4.2