[asterisk-users] problem to socket programming in AGI
Justin Killen
jkillen at allamericanasphalt.com
Mon Feb 4 11:05:45 CST 2013
You are correct, this is not an asterisk question. What I would suggest would be to run your script outside of asterisk and debug the connection. Looking at the php doc page for fsockopen (http://php.net/manual/en/function.fsockopen.php), I see this example:
<?php
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
I would first try running that (put in your host and port) and see what the error string coming back is.
-Justin
________________________________
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Muhammad
Sent: Monday, February 04, 2013 5:07 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] problem to socket programming in AGI
Hi,
I know maybe this question is not related to asterisk, but I want to make XML RPC web service to other http server.
I have elastix system. it is https and problem is source not destination server. In xml rpc we have fsockopen connection to connect destination server(xml rpc server). It return me connect error(0).
what is the problem. is this related to elastix(asterisk) server?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130204/b419a1b5/attachment.htm>
More information about the asterisk-users
mailing list