Hi guys, I hope you could help me.<div><br></div><div>I am trying to get connected through AMI but something is not working. Both php code and manager.conf were working well in asterisk 1.4</div><div><br></div><div> 1. Sometimes it gets connected and sometimes it doesn&#39;t:</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "> == Connect attempt from &#39;192.168.25.241&#39; unable to 
authenticate</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "> == 
Connect attempt from &#39;192.168.25.241&#39; unable to 
authenticate</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "> == 
Manager &#39;mark&#39; logged on from 192.168.25.241</span></div></blockquote><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">2. When connected there&#39;s a message that appears just before the connection crashes:</span></div>
<div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><br></span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">== Manager &#39;mark&#39; logged on from 192.168.25.241</span></div>
<div><span class="Apple-style-span" style="color: rgb(255, 0, 0); font-family: Arial; font-size: 13px; ">[Jul 26 16:29:14] ERROR[1579]: utils.c:1178 ast_careful_fwrite: 
fwrite() returned error: Broken pipe</span></div><div><span class="Apple-style-span" style="color: rgb(255, 0, 0); font-family: Arial; font-size: 13px; ">[Jul 26 16:29:14] ERROR[1579]: utils.c:1178 ast_careful_fwrite: 
fwrite() returned error: Broken pipe</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "> == 
Manager &#39;mark&#39; logged off from 192.168.25.241</span></div></blockquote><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><u>This is my<b> manager.conf:</b></u></span></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">[general]</span></font></p>
</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">enabled = 
yes</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">port = 
5038</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">bindaddr = 
0.0.0.0</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">webenabled = 
no</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US"><br>
</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">[mark]</span></font></p>
</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">secret = 
mysecret</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">permit=<a href="http://0.0.0.0/255.255.255.0">0.0.0.0/255.255.255.0</a></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal">
<font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">read = 
system,call,log,verbose,command,agent,user,originate</span></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">write = 
system,call,log,verbose,command,agent,user,originate</span></font></p></span></div></blockquote><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">
<p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US"><br></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US"><u>This is my<b> code in PHP</b></u>:</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US"></span></font></p></span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">&lt;?php</span></font></font></p>
</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">function 
ast_claves(){</span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">                $socket = 
fsockopen(&#39;192.168.25.18&#39;,&#39;5038&#39;,$errno,$errstr,10);</span></font></font></p></span></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><font size="2" face="Arial"><p class="MsoNormal">
<font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">                </span></font></p></font></span><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">fwrite($socket,&quot;Action: Login\r\n&quot;);</span></font></div>
<div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;UserName: mark\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;Secret: mysecret\r\n\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; ">
<font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;Action: DBPut\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;Family: authenticate/jorge\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; ">
<font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;Key: 123456\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;Value: pbx-a\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
fwrite($socket,&quot;Action: Logoff\r\n\r\n&quot;);</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; ">
<font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">                
</span></font></p></font></span><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">fclose($socket);</span></font></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; ">
<font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">        
}</span></font></p></font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">ast_claves();</span></font></p>
</font></span></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">?&gt;</span></font></p>
</font></span></div></blockquote><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; "><font size="2" face="Arial">
</font></span><p></p><span class="Apple-style-span" style="font-family: Arial; "><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" lang="EN-US">
</span></font></p><font face="Arial">











<p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><br></span></font></p><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><u>These are the <b>software I am running</b>:</u></span></font></p>
<p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><br></span></font></p><p class="MsoNormal" style="font-size: 13px; "><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"></span></font></p>
</font></span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><p class="MsoNormal" style="font-size: 13px; ">
<font size="2" face="Arial"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Sistema operativo   
</span></font></font></p></font></span><font size="2" face="Wingdings"><span style="FONT-FAMILY: Wingdings; FONT-SIZE: 10pt">à</span></font><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">               
 Debian 6.0  squeeze       2.6.32-5-686</span></font></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><font size="2" face="Arial" style="font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Version de asterisk  
</span></font></p></font></font></span><font size="2" face="Wingdings"><span style="FONT-FAMILY: Wingdings; FONT-SIZE: 10pt">à</span></font><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">              
 Asterisk 1.8.3.2</span></font></div><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><font size="2" face="Arial" style="font-size: 13px; "><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Version de Php  </span></font></p>
</font></font></span><font size="2" face="Wingdings"><span style="FONT-FAMILY: Wingdings; FONT-SIZE: 10pt">à</span></font><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">                    
php 5.3.3-7+squeeze1</span></font></div></blockquote><div><span class="Apple-style-span" style="font-family: Arial; "><font face="Arial"><font size="2" face="Arial" style="font-size: 13px; ">

<p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><br></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><br>
</span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Thanks ins advance.</span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt"><br>
</span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Elder</span></font></p></font></font></span><p></p><p></p></div>