Hi,<br><br>&nbsp; I would like to get the status of asterisk extension with my php program. <br><br><b>My program as follows,</b><br><br>&lt;html&gt;<br>&lt;!--&lt;meta http-equiv=&quot;refresh&quot; content=&quot;1&quot; /&gt;--&gt;<br>
&lt;?php<br><br><br>$fp = fsockopen(&quot;xxx.xxx.xxx.xxx&quot;, 5038, $errno, $errstr, 30);<br>if (!$fp) <br>{<br>echo &quot;$errstr ($errno)&lt;br /&gt;\n&quot;;<br>} <br>else<br>&nbsp;{<br>&nbsp;$out = &quot;Action: Login\r\n&quot;;<br>
$out .= &quot;UserName: admin\r\n&quot;;<br>$out .= &quot;Secret: amp111\r\n\r\n&quot;;<br><br>fwrite($fp, $out);<br>$in = &quot;Action: ExtensionState\r\n&quot;;<br>$in .= &quot;Exten: 777\r\n\r\n&quot;;<br>$in .= &quot;Context: ext-did-custom\r\n\r\n&quot;; <br>
$in .= &quot;ActionID: 1\r\n&quot;;<br>//$in.= &quot;Status: State\r\n&quot;;<br><br>$in .= &quot;Action: Logoff\r\n\r\n\r\n&quot;;<br><br>fwrite($fp,$in);<br>while (!feof($fp))<br>{<br>echo fgets($fp, 256);<br>//echo $fp;<br>
}<br>echo &quot;\r\n\r\n\r\n\r\n&quot;;<br>fclose($fp);<br>}<br>?&gt;<br>&lt;/html&gt;<br clear="all"><br><b>When i try to run this program i am getting the following output</b><br><br>Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted

Response: Success
Message: Extension Status
Exten: 777
Context: default
Hint: 
Status: -1

Response: Error
Message: Missing action in request

Response: Goodbye
ActionID: 1
Message: Thanks for all the fish.<br><br><b>My dialplan as follows</b><br>[outbound-allroutes-custom]<br>exten =&gt; 5101,1,Dial(SIP/5101)<br>exten =&gt; 5101,2,Hangup<br><br>exten =&gt; 5102,1,Dial(SIP/5102)<br>exten =&gt; 5102,2,Hangup<br>
<br>exten =&gt; 777,1,Wait(2)<br>exten =&gt; 777,hint,SIP/5101&amp;SIP/5102<br><br><b>Scenario</b><br>The exten that I have used in the program is &quot;777&quot;&nbsp; that is my hint extension. Instead of the 777 if i try 5101 also I am getting the same -1 status. <br>
<br>Any help would be appreciated.<br>-- <br>Thank you with regards,<br>Gopal,<br>PeopleTech Systems Private Limited<br><a href="http://www.peopletech.co.in">www.peopletech.co.in</a>