[Asterisk-Users] SAY DIGITS problem

Nattapong Mongkolnavin nattapong at octagon.co.th
Sat Mar 5 03:25:10 MST 2005


Hi,

I have a problem using AGI cmd "SAY DIGITS". For  some reason I cannot 
here any thing when the script got executed. However if I use the cmd 
"SAY NUMBER" I can here * reading the number fine.

I am running asterisk-1.0.6 and below is my PHP script.

Help please.

- Natt


#!/usr/bin/php -q
<?php
        ob_implicit_flush(true);
        set_time_limit(10);

        /* Standard Input file descriptor */
        $stdin = fopen('php://stdin', 'r');

        /* Standard Output file descriptor */
        $stdout = fopen('php://stdout', 'w');

        /* Standard Log output */
        $stdlog = fopen('/var/log/asterisk/my_agi.log', 'w');

        while(!feof($stdin)) {
                $data = fgets($stdin);
                fputs($stdlog, $data);
                if ($data == "" || $data == "\n") {
                        break;
                }
        }
        sleep(1);
        fputs($stdout, "SAY DIGITS 1234");
        fflush($stdout);
        fclose($stdin);
        fclose($stdout);
        fclose($stdlog);
        return 0;
?>




More information about the asterisk-users mailing list