Asterisk func curl

Retrieves the contents of a URL

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


Retrieves the contents of a URL

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


Created by: murf, Last modification: Fri 11 of May, 2012 (09:59 UTC) by brownian
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+