[Asterisk-Users] First AGI help..

Paul Liew pliew at atp.org.au
Wed Nov 5 04:53:35 MST 2003


Hi
> <?php
> // From Kapjod's sample..
> ob_implicit_flush(true);
> set_time_limit(0);
> $err = fopen("php://stderr","w");
> $in = fopen("php://stdin","r");
> $out = fopen("php://stdout","w");
>
> //This works..
> fputs($out, "Verbose \"Calling phone"\n");
> // This doesn't
> fputs($out, "exec(Dial(sip/2012)\n");
>
> fclose($in);
> fclose($out);
> fclose($err);
> ?>

You'll find its to do with your syntax - "show agi exec" produces
 Usage: EXEC <application> <options>
        Executes <application> with given <options>.
        Returns whatever the application returns, or -2 on failure to find
application

ie use spaces not "(".

Paul




More information about the asterisk-users mailing list