[Home]

Summary:ASTERISK-25654: Playback: Add the ability to play remote URIs
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2015-12-31 20:51:42.000-0600Date Closed:2016-09-23 14:48:50
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_controlplayback Applications/app_playback
Versions:SVN Frequency of
Occurrence
Related
Issues:
is related toASTERISK-23608 ControlPlayback fails to play files with names containing certain non-alpha characters
Environment:Attachments:
Description:For Asterisk to act as a media application server, it would often be nice if the media that it plays back does not have to be stored on the same physical machine. For example, in a cluster of Asterisk servers, we would potentially like to service a customer on any server in the cluster. If we require media files for that customer to be located on the server before a call is routed to them, we have to replicate that sound file across all servers.

Ideally, said sound file would reside on some other server, and would be accessed via a REST API. Asterisk could then request that sound file when it needs it, and store it locally for some period of time in case multiple calls need the same file.

Previous commits to {{master}} have already added the concept of a core media cache, as well as the ability to CURL files down locally and store them in the cache. The actual end user facing feature, however, is the ability to request these files from the dialplan. As an example:

{code}

same => n,Playback(http://1.1.1.1/monkeys-for-life.wav)

{code}

Will:
* Check the media cache for a local media file that is mapped to the provided URI. If one and is not stale, it is played back. Otherwise...
* The media cache looks to its backend to try and see if it can retrieve the URL. If so, it pulls it down locally, stores it in the cache, and provides the now local file back to the media core.

Comments: