Upgrade 3CX to v18 and get it hosted free!

Asterisk cmd Curl

Author image

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

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.