[asterisk-users] problem to socket programming in AGI

Leandro Dardini ldardini at gmail.com
Mon Feb 4 13:41:51 CST 2013


Check if you have selinux enforcing anf try to disable it

I am typing from my mobile phone...
Il giorno 04/feb/2013 18:43, "C. Savinovich" <c.savinovich at itntelecom.com>
ha scritto:

>
> I would just type in the web service url manually in a browser, and if the
> browser displays the response, then there it is, the connection to the host
> server is open.
>
> Christian Savinovich
> *VoIP & Telephony Consultant*
> 646-982-3572
>
>
>
>  -------- Original Message --------
> Subject: Re: [asterisk-users] problem to socket programming in AGI
> From: Justin Killen <jkillen at allamericanasphalt.com>
> Date: Mon, February 04, 2013 12:25 pm
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com>
>
>  Yes, I think curl would probably be a better option than trying to use
> sockets directly, but if the socket won’t connect it doesn’t really matter
> what higher level method is used. ****
>  -Justin ****
>   ------------------------------
>  *From:* asterisk-users-bounces at lists.digium.com [
> mailto:asterisk-users-bounces at lists.digium.com<asterisk-users-bounces at lists.digium.com>]
> *On Behalf Of *C. Savinovich
> *Sent:* Monday, February 04, 2013 9:16 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] problem to socket programming in AGI****
>  ** **
>  ** **
>  I don't get it, if it is a web service, why do you use sockets? Isn't it
> just a matter of calling the web service using curl,and then wait for the
> response? what am I missing?****
>  ** **
>  Christian Savinovich****
>  *VoIP & Telephony Consultant*****
>  646-982-3572****
>   ****
>  ** **
>
>  -------- Original Message --------
> Subject: Re: [asterisk-users] problem to socket programming in AGI
> From: Justin Killen <jkillen at allamericanasphalt.com>
> Date: Mon, February 04, 2013 12:05 pm
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com>
>
>
> ****
> **
>  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*<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* <http://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*<asterisk-users-bounces at lists.digium.com>[
> *mailto:asterisk-users-bounces at lists.digium.com*<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?********
>   ------------------------------
>  --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by *http://www.api-digital.com*<http://www.api-digital.com>--
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> *http://www.asterisk.org/hello* <http://www.asterisk.org/hello>
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> *http://lists.digium.com/mailman/listinfo/asterisk-users*<http://lists.digium.com/mailman/listinfo/asterisk-users>
> ****
> **
>
>  ------------------------------
> --
> _____________________________________________________________________
> -- 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
>
>
> --
> _____________________________________________________________________
> -- 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130204/3adf8901/attachment.htm>


More information about the asterisk-users mailing list