Search:
Asterisk func curl
Description
CURL(url[|post-data])url - URL to retrieve
post-data - Optional data to send as a POST (GET is default action)
Return value
Returns the resulting string/page.Configuration
Make sure curl is on your system (on "Ubuntu 8.04 server" users can run apt-get install libcurl4-dev)Then in the asterisk sources re-run the ./configure script and check if it detects curl.
Run make menuselect and look under the Dialplan Functions for the func_curl entry, making sure there are no XXX's there before compiling and installing asterisk.
Example
exten => s,1,Set(foo=${CURL(http://somewhere.com/somepage.html?x=5&y=4)})See also
- Asterisk func SHELL: Execute a shell command and return the result
- Asterisk cmd ReadFile - Read contents of a file into a dialplan variable
- Asterisk variables
- Asterisk functions
Created by: murf,Last modification on Tue 10 of Aug, 2010 [13:37 UTC] by JustRumours

Page Changes
