[asterisk-users] PhpAgi call generation

Rob Schall rschall at callone.net
Tue Jun 19 08:12:35 CDT 2007


An alternative to this method might be to create a call file and place
it in the spool. Have it either dial and connect the caller to an
extension that plays that sound, or just execute that sound itself.
Right now, we use this functionality for a server scanner. When it
detects a particular port down on one of our machines, it will call us
and use festival to tell us what the problem is.

Rob
 

nik600 wrote:
> hi
>
> i'd like to write a simply application in php with phpAgi that:
>
> - connect to Asterisk
> - call an external number using a Zap channel
> - play a message
>
> here is some code:
>
> <?php
>
> $asm = new AGI_AsteriskManager();
>
> if ($asm->connect()) {
>
> $asm->Originate("Zap/g1/1","number","default","1");
>
> /*
> play message...
> */
> } else {
>         die("error\n");
> }
>
> ?>
>
> But it doesn't work.
> Is it possible to create a program like this?
> thanks
>
>   




More information about the asterisk-users mailing list