Hi Roy,<br><br>If its perl script,you can try this.<br><br>use Asterisk::AGI;<br>our $AGI = new Asterisk::AGI;<br><br>$AGI->EXEC('Dial', 'Zap/g2/8005551212');
<br><br><div><span class="gmail_quote">On 2/11/07, <b class="gmail_sendername">Roy Kidder</b> <<a href="mailto:asterisk@jehster.net">asterisk@jehster.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm writing an AGI script and want it to dial a number on a channel<br>connected to the PSTN. It would look something like this (pseudo-code<br>follows):<br><br>if ($a){<br> dial("8005551212");<br>}else{<br>
dial("8665550000");<br>}<br><br>The part I can't seem to get right is the "dial" function. I tried to<br>mimic the dial plan like so<br><br>sub dial($number){<br> print "Dial(\"Zap/1-1\", \"Zap/g2/$number\")\n";
<br>}<br><br>but I get the error<br><br>handle_exec: Could not find application (Dial(Zap/1-1,Zap/g2/8665550000)<br><br>Anyone have any suggestions?<br><br>Thanks,<br>Roy<br>_______________________________________________
<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>