Retrieve information from CURL call

Through a call like this I run scripts on the server as needed:
Set(result=${CURL(http://localhost/ergotel/invemail.php?num=${CALLERID(number)})})

Now I would like to retrieve information from the file I run “invemail.php” and use it to do something …

How can I get them?

I’m finding information but a clear example would be great
I believe this is the way:
https://marcelog.github.io/articles/asterisk_json_curl_dialplan.html

I don’t understand the question, but if you want to control call flow based on the result returned from a curl, you can use Dynamic Routes for that.

It’s simple just use:
(CURL_RESULT = $ {CURL (http: //localhost/ergotel/nometest.php)})

Everything comes in the variable: $ {CURL_RESULT}

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.