[asterisk-users] CURL function with SSL

Luis Morales fastonion at gmail.com
Sat Aug 15 20:29:47 CDT 2009


Take a look:

[curl-dialplan]
s,x,Set(LOGINOK=${CURL(http://ip-server/cgi-bin/login.pl?codigo=${codigo}&clave=${clave})})


login.pl
----------------------------
#!/usr/bin/perl

use CGI qw/:standard/;
use strict;

my $codigo = (param('codigo') ne undef) ? param('codigo') : 0;
my $clave = (param('clave') ne undef) ? param('clave') : 0;
my $i = 0;

$i = ($codigo eq $clave) ? 1 : 0;

print "Content-type: text/html\n\n";
print "$i";
----------------------------


Good luck!!


On Sat, Aug 15, 2009 at 9:34 AM, Wenbin Zhang<wenbin at freeyourdata.net> wrote:
> Hi all,
>    I hope you guys can help me out. I got a problem with using function
> CURL. I
> did Set(CURL=${CURL(URL)}); but the URL I was using is https, so when I
> generated the call, the CURL function could not get access to that
> https://URL server. What should I do with it? Thank you very much
>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
---------------------------------------------------------------------------------
Luis Morales
Consultor de Tecnologia
Cel: +(58)416-4242091
---------------------------------------------------------------------------------
"Empieza por hacer lo necesario, luego lo que es posible... y de
pronto estarás haciendo lo imposible"

Leonardo Da'Vinci
---------------------------------------------------------------------------------



More information about the asterisk-users mailing list