<div dir="ltr"><div class="gmail_quote">On Mon, Jun 6, 2011 at 12:12 AM, A E [Gmail] <span dir="ltr"><<a href="mailto:all.eforums@gmail.com">all.eforums@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div><font color="#663366"><font face="trebuchet ms,sans-serif">Hello,</font></font><div><font color="#663366"><font face="trebuchet ms,sans-serif">using 1.8.4. using a very simple local AGI script in bash which has only one line in it:</font></font></div>
<div><font color="#663366"><font face="trebuchet ms,sans-serif"><br></font></font></div><div><font color="#663366" face="'courier new', monospace">echo -e 'STREAM FILE welcome 123 \n'</font></div><div><font color="#663366"><font face="trebuchet ms,sans-serif"><br>
</font></font></div><div><font color="#663366"><font face="trebuchet ms,sans-serif">dialplan:</font></font></div><div><font color="#663366"><div><div><font face="'courier new', monospace">exten => 5150,1,Answer()</font></div>
<div><font face="'courier new', monospace"> same => n,Set(CHANNEL(language)=en_AU)</font></div><div><font face="'courier new', monospace"> same => n,AGI(testagi.sh)</font></div>
<div><font face="'courier new', monospace"> same => n,Hangup</font></div></div><div style="font-family:'trebuchet ms', sans-serif"><br></div><div style="font-family:'trebuchet ms', sans-serif">
console output:</div><div><div><div><font face="'trebuchet ms', sans-serif"> </font><font face="'courier new', monospace"> -- Executing [5150@AllPhones:1] Answer("SIP/PBX-00000024", "") in new stack</font></div>
<div><font face="'courier new', monospace"> -- Executing [5150@AllPhones:2] Set("SIP/PBX-00000024", "CHANNEL(language)=en_AU") in new stack</font></div><div><font face="'courier new', monospace"> -- Executing [5150@AllPhones:3] AGI("SIP/PBX-00000024", "testagi.sh") in new stack</font></div>
<div><font face="'courier new', monospace"> -- Launched AGI Script /var/lib/asterisk/agi-bin/testagi.sh</font></div><div><font face="'courier new', monospace"> -- Playing 'welcome' (escape_digits=1) (sample_offset 0)</font></div>
<div><font face="'courier new', monospace"> -- <SIP/PBX-00000024>AGI Script testagi.sh completed, returning 0</font></div><div><font face="'courier new', monospace"> -- Executing [5150@AllPhones:4] Hangup("SIP/PBX-00000024", "") in new stack</font></div>
<div><font face="'courier new', monospace"> == Spawn extension (AllPhones, 5150, 4) exited non-zero on 'SIP/PBX-00000024'</font></div></div></div><div style="font-family:'trebuchet ms', sans-serif">
<br></div><div style="font-family:'trebuchet ms', sans-serif">But nothing happens...as in even when it says that it's playing the file (as verified in the asterisk 'full' log), I hear nothing on the phone</div>
<div style="font-family:'trebuchet ms', sans-serif"><br></div><div style="font-family:'trebuchet ms', sans-serif">What gives? spent 2 hrs Googling but nothing! :(</div><div style="font-family:'trebuchet ms', sans-serif">
<br></div><div style="font-family:'trebuchet ms', sans-serif">Thx</div><div style="font-family:'trebuchet ms', sans-serif">\A</div><div style="font-family:'trebuchet ms', sans-serif"><br></div>
</font></div></div>
</blockquote></div><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Bizarre, I found a bunch of other agi scripts in the default directory...modified the agi-test.agi (perl script) so it played my file, no joy! then I used a php script I found somewhere else asa tutorial to writing AGI scripts in php, modified that to play my script and it works. I don't get it. esp. when everything (with agi debug set on) looks exactly the same with my bash script and this php script except that with the php script, I see this ONE line that's extra</font><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><SIP/PBX-0000002b>AGI Rx << STREAM FILE welcome #</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> -- Playing 'welcome' (escape_digits=#) (sample_offset 0)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><SIP/PBX-0000002b>AGI Tx >> 200 result=35 endpos=87200</font></div>
</div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></div></blockquote><font class="Apple-style-span" face="'trebuchet ms', sans-serif">that I don't see with my bash script which does this</font><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><br><font class="Apple-style-span" face="'courier new', monospace"><SIP/PBX-0000002e>AGI Rx << STREAM FILE welcome #</font></div></div></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><font class="Apple-style-span" face="'courier new', monospace"> -- Playing 'welcome' (escape_digits=#) (sample_offset 0)</font></div></div></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><font class="Apple-style-span" face="'courier new', monospace"> -- <SIP/PBX-0000002e>AGI Script streamcontact.sh completed, returning 0</font></div></div></blockquote><div><div><font class="Apple-style-span" face="'courier new', monospace"> -- Executing [5150@AllPhones:5] Hangup("SIP/PBX-0000002e", "") in new stack</font></div>
</div><div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></div><div>So confused!!</div><div><br><div><div><br></div></div></div></div></div>