Synopsis:
Load an external URL
Description:
Requests an URL. Mainly used for signalling external applications of an event.
Returns 0 or -1 on fatal error.
Argument specified treated as POST data.
Also sets CURL variable with the resulting page.
Installation Requirements:
Local Curl Installation required to compile CURL Support into Asterisk!
Download here: curl.haxx.se or search for an RPM for your system.
Return codes:
0 or -1
Variables:
Sets Curl channel variable (CURL) upon completion of retrieval.
Use:
To be used in dialplan as Curl(URL[|postdata])
Example (POST-Method):
exten => _X.,2,curl(https://www.somehost.com/may_be_a_dir/file_to_call.php,postdata_var1=1&postdata_var2=something)
exten => _X.,3,Wait(5)
exten => _X.,4,NoOp(CURL-RESPONSE: ${CURL})
Example (GET-Method):
exten => _X.,2,curl(https://www.somehost.com/may_be_a_dir/file_to_call.php?postdata_var1=1&postdata_var2=something)
exten => _X.,3,Wait(5)
exten => _X.,4,NoOp(CURL-RESPONSE: ${CURL})
Note: Only in CVS HEAD as of 01/12/2005
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ | CLI