<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>I am issuing an AGI
call in extensions.conf as follows:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=098381119-05042005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>exten =>
2000,1,Answer</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>exten =>
2000,n,AGI(script.pl)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>exten =>
2000,n,Hangup</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=098381119-05042005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>Asterisk perl is
installed. "script.pl" is a valid perl script in
/var/lib/asterisk/agi-bin</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=098381119-05042005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>Output
is:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005></SPAN></FONT><FONT
face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> -- Executing
Answer("SIP/2034-e908", "") in new stack<BR> -- Executing
AGI("SIP/2034-e908", "<SPAN class=098381119-05042005>script.pl</SPAN>") in new
stack<BR> -- Launched AGI Script
/var/lib/asterisk/agi-bin/script.pl<BR> -- AGI Script
script.pl completed, returning 0<BR> -- Executing
Hangup("SIP/2034-e908", "") in new stack<BR> == Spawn extension
(intl-access, 2<SPAN class=098381119-05042005>000</SPAN>, 3) exited non-zero on
'SIP/2034-e908'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial size=2>The problem is
that the logic in the script is not executing.</FONT></SPAN></FONT></DIV>
<DIV><FONT><SPAN class=098381119-05042005></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial size=2>So, in
extensions.conf, I replaced "script.pl" with "null.pl", as
follows:</FONT></SPAN></FONT></DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>exten =>
2000,1,Answer</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>exten =>
2000,n,AGI(null.pl)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005>exten =>
2000,n,Hangup</SPAN></FONT></DIV></FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial size=2>Note that
"null.pl" does not actually exist in
/var/lib/asterisk/agi-bin.</FONT></SPAN></FONT></DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=098381119-05042005><FONT face=Arial size=2>Surprisingly,
I get the exact same output:</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=098381119-05042005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=098381119-05042005> -- Executing
Answer("SIP/2034-dfce", "") in new stack<BR> -- Executing
AGI("SIP/2034-dfce", "null<SPAN class=098381119-05042005>.pl</SPAN>") in new
stack<BR> -- Launched AGI Script
/var/lib/asterisk/agi-bin/null.pl<BR> -- AGI Script null.pl
completed, returning 0<BR> -- Executing
Hangup("SIP/2034-dfce", "") in new stack<BR> == Spawn extension
(intl-access, 2000, 3) exited non-zero on 'SIP/2034-dfce'</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=098381119-05042005></SPAN></FONT><FONT><SPAN
class=098381119-05042005><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=098381119-05042005></SPAN><FONT face=Arial><FONT size=2>H<SPAN
class=098381119-05042005>ow can this be? I've got to be missing something
obvious here!</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=098381119-05042005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial><SPAN class=098381119-05042005><FONT size=2>Please
help.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=098381119-05042005><FONT
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT face=Arial><SPAN class=098381119-05042005><FONT
size=2>Thanks,</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=098381119-05042005><FONT
size=2>Adam</FONT></SPAN></DIV></FONT></FONT></FONT></BODY><!--[object_id=#pharmacentra.com#]--><P><SPAN style="FONT-SIZE: 7.5pt"><FONT size=2>The contents of this email message and any attachments are confidential and are intended solely for addressee. The information may also be legally privileged. This transmission is sent in trust, for the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply email and delete this message and its attachments, if any.</FONT></SPAN></P></HTML>