On 08/01/2011 03:35 PM, Paul Belanger wrote:
On 11-08-01 04:24 PM, Daniel - Asterisk wrote:
<?php
function ast_claves(){

$socket =
fsockopen('192.168.25.18','5038',$errno,$errstr,10);


fwrite($socket,"Action: Login\r\n");

fwrite($socket,"UserName: mark\r\n");

fwrite($socket,"Secret: mysecret\r\n\r\n");

fwrite($socket,"Action: DBPut\r\n");

fwrite($socket,"Family: authenticate/jorge\r\n");

fwrite($socket,"Key: 123456\r\n");

fwrite($socket,"Value: pbx-a\r\n");

fwrite($socket,"Action: Logoff\r\n\r\n");


fclose($socket);

}

ast_claves();

?>

You are closing the socket before reading the result of 'Logoff' and
Asterisk is complaining.

Well, he's sending DBPut before reading the result of Login as well.

--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: [email protected] | SIP: [email protected] | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to