[asterisk-users] CURL

Elpidio Ramos elpidio at ramosoft.com
Thu Sep 21 12:24:18 MST 2006


Jerry,
   
  Great information. I will try to implement it.
  Thanks a lot.
   
  Elpidio

Colin Anderson <ColinA at landmarkmasterbuilder.com> wrote:
      You need to use AGI to do this. You would put a shell script yourscript.agi in /var/lib/asterisk/agi-bin
   
  If you want an HTTP response dumped into your dialplan as a variable, you would use wget:
   
  myagi.agi:
   
  #!/bin/bash
  TMPFILE=/tmp/$$.$RANDOM
  wget -q -t3 --output-document=$TMPFILE http://mysite.com/myhtml.html
  MYVAR=$(cat $TMPFILE)
  echo "SET VARIABLE MYASTERISKVAR \"$MYVAR\""
  rm $TMPFILE
   
  You would call the AGI like this:
   
  exten => foo,1,AGI(/var/lib/asterisk/agi-bin/myagi.agi)
   
  Optionally you can pass a parameter to the AGI:
   
    exten => foo,1,AGI(/var/lib/asterisk/agi-bin/myagi.agi foo)
   
  and you would retrieve the parameter in the AGI using the $1, $2, $3 variables in the AGI for parameter 1,2,3 etc.
   
  hth

   
    -----Original Message-----
From: Elpidio Ramos [mailto:elpidio at ramosoft.com]
Sent: Thursday, September 21, 2006 10:52 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] CURL


  Jerry,
   
  Using system, is there a way to read into an asterisk variable the content of the response (i.e. a text in an http response) ?. If this is possible then I can use this approach.
   
  Thanks

Jerry Geis <geisj at pagestation.com> wrote:
  You can always use the System() command in asterisk to call the curl executable.

jerry
---------------

Ok, after requesting information to digium (no answer yet) and being informed that asterisk-dev is *NOT* a support hot line, I am trying in this list to see if someone has information on this regard.

I know this is not a support area so I am only trying to get some clues.

I have asterisk be and I am trying to use the CURL function (or application?). It is not available when I try it even though it is documented. Does anyone knows if there is a way to load it as a function/application inside asterisk? if so, is there code to download/compile to get it working inside asterisk?

Any clue will be highly appreciated. (I keep trying digium support).

Elpidio


Elpidio Ramos 
President 
RM International Services SA CV 
Web: http://www.ramosoft.com 
Mex: +52 (55) 5116-9804 Office
+52 (55) 5116-9805 Fax 
+52 (55) 1755-6601 Cell
USA: +1 (801) 494-1415 Office
+1 (240) 250-8264 Fax
+1 (801) 938-4740 Direct











_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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



                    Elpidio Ramos 
President 
RM International Services SA CV 
Web: http://www.ramosoft.com 
Mex:  +52 (55) 5116-9804 Office
         +52 (55) 5116-9805 Fax 
           +52 (55) 1755-6601 Cell
USA: +1 (801) 494-1415 Office
           +1 (240) 250-8264 Fax
           +1 (801) 938-4740 Direct
   









_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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



                  Elpidio Ramos 
President 
RM International Services SA CV 
Web: http://www.ramosoft.com 
Mex:  +52 (55) 5116-9804 Office
         +52 (55) 5116-9805 Fax 
           +52 (55) 1755-6601 Cell
USA: +1 (801) 494-1415 Office
           +1 (240) 250-8264 Fax
           +1 (801) 938-4740 Direct
   









-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060921/aaf15e66/attachment.htm


More information about the asterisk-users mailing list