[asterisk-bugs] [JIRA] (ASTERISK-25652) func_curl: Add the ability to CURL files down to a specified location

Aaron An (JIRA) noreply at issues.asterisk.org
Thu Jan 7 21:53:33 CST 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228891#comment-228891 ] 

Aaron An commented on ASTERISK-25652:
-------------------------------------

It is a good idea. I hava already implemented this but not your solution. I create a new FUNCTION CURL_FILE, before function call I need set channel variable CURL_FILE_PATH like this.
same => n,Set(CURL_FILE_PATH=/tmp/foo.wav)
same => n,Set(res=${CURL_FILE(http://1.1.1.1/foo.wav)})

I this your solution is better, when you commit it I will test your code.

> func_curl: Add the ability to CURL files down to a specified location
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-25652
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25652
>             Project: Asterisk
>          Issue Type: New Feature
>      Security Level: None
>          Components: Functions/func_curl
>    Affects Versions: SVN
>            Reporter: Matt Jordan
>            Assignee: Matt Jordan
>
> Currently, the {{CURL}} function provides the ability to CURL an HTTP location and return the result in a dialplan variable. While that's sometimes useful, another use case would be to CURL a file down to some location on the file system, then play that file back. In particular, that would obviously be useful if that file were a media file.
> The patch referenced on this issue does that by adding the ability to specify a 'write' for the {{CURL}} function that specifies the file to store the result at:
> {code}
> same => n,Set(CURL(http://1.1.1.1/foo.wav)=/tmp/foo.wav)
> {code}
> Since this could potentially be dangerous, this functionality can only be accessed through APIs if {{live_dangerously}} is True in {{asterisk.conf}}.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list