<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<small>Hi Roy,<br>
<br>
Look I dont know why u specify 'zap/1-1', but i do things like this on
my agi scripts a lot of times:<br>
...<br>
$stdin = fopen('php://stdin', 'r');<br>
$stdout = fopen('php://stdout', 'w'); <br>
$stdlog = fopen('/tmp/outPUT.log', 'a');<br>
...<br>
<br>
fwrite($stdout,"EXEC DIAL \"<font color="#666666">Zap/g2/18092203555</font>\"
\n");<br>
fflush($stdout);<br>
<br>
////////////// to see result ////////////// <br>
$msg = fgets($stdin);<br>
fwrite($stdlog,$msg. "\n");</small><br>
<br>
<br>
<small>Try it out if u want...<br>
<br>
<br>
J. Espinal,<br>
<br>
<br>
</small><br>
<br>
Roy Kidder wrote:
<blockquote
cite="mid47136.192.168.254.2.1171167307.squirrel@home.rkidder.com"
type="cite">
<pre wrap="">I'm writing an AGI script and want it to dial a number on a channel
connected to the PSTN. It would look something like this (pseudo-code
follows):
if ($a){
dial("8005551212");
}else{
dial("8665550000");
}
The part I can't seem to get right is the "dial" function. I tried to
mimic the dial plan like so
sub dial($number){
print "Dial(\"Zap/1-1\", \"Zap/g2/$number\")\n";
}
but I get the error
handle_exec: Could not find application (Dial(Zap/1-1,Zap/g2/8665550000)
Anyone have any suggestions?
Thanks,
Roy
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
</pre>
</blockquote>
<br>
</body>
</html>