<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:3.0cm 1.0cm 2.0cm 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=LT link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Make sure </span>/usr/bin/perl can be reached.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Also try in your CLI:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>agi debug<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Same case happens when I do not have php-cli installed for php
AGI scripts.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Mindaugas Kezys<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>http://www.kolmisoft.com<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>MOR &#8211; Advanced Billing for Asterisk PBX<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>Matt<br>
<b>Sent:</b> Wednesday, November 14, 2007 4:00 PM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br>
<b>Subject:</b> [asterisk-users] Problem with AGI Script<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I have asterisk 1.2.18 running on a new system we just
installed.&nbsp;&nbsp; Although I've used AGIs many times in the past, I'm
stumped on this one.&nbsp; It may just be a simple issue that I need another
eyeset to look at.<br>
<br>
My AGI does the following:<br>
#!/usr/bin/perl<br>
<br>
#Load a few modules...<br>
use Asterisk::AGI;<br>
use DBI;<br>
<br>
$AGI = new Asterisk::AGI;<br>
<br>
#Grab input from Asterisk<br>
my %input = $AGI-&gt;ReadParse();<br>
<br>
<br>
#Some Debugging<br>
$AGI-&gt;exec('SayDigits',$ARGV[0]);<br>
exit;<br>
--------<br>
All seems fine.&nbsp; If I run the script from the command line it works as
expected:<br>
[root@efax agi-bin]# ./GetEmailFromDID.agi 333 <br>
EXEC SayDigits &quot;333&quot;<br>
<br>
However, when actually running in practice I get:<br>
&nbsp;&nbsp; -- Executing AGI(&quot;Zap/23-1&quot;,
&quot;GetEmailfromDID.agi|5706016716&quot;) in new stack<br>
&nbsp;&nbsp;&nbsp; -- Launched AGI Script
/var/lib/asterisk/agi-bin/GetEmailfromDID.agi <br>
&nbsp;&nbsp;&nbsp; -- AGI Script GetEmailfromDID.agi completed, returning 0<br>
--------<br>
extensions.conf<br>
[macro-faxreceive]<br>
exten =&gt; s,1,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)<br>
exten =&gt; s,2,agi(GetEmailfromDID.agi|${CALLERID (number)})<br>
exten =&gt; s,3,rxfax(${FAXFILE})<br>
exten =&gt; s,104,Set(EMAILADDR=<a href="mailto:faxbin@efaxplace.net">faxbin@efaxplace.net</a>)<br>
exten =&gt; s,105,Goto(3)<br>
<br>
<br>
Any thoughts on why asterisk doesn't seem to be passing anything to the script
and the script doesn't seem to be passing anything back?&nbsp; When I call I do
not hear the digits read to me, instead I just get thrown to the next object
after the digit reading. <o:p></o:p></p>

</div>

</body>

</html>