Summary:ASTERISK-27286: Add the ability to read the media file type from HTTP header for playback
Reporter:Gaurav Khurana (gkhurana@godaddy.com)Labels:
Date Opened:2017-09-21 19:47:12Date Closed:2017-10-02 15:21:31
Versions:14.5.0 Frequency of
Description:*How it works today:*
Currently, as described in https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Project+-+URI+Media+Playback, media_cache tries to parse out the extension of the media file to be played from the URI provided to Asterisk while caching the file.

*What's expected:*
Better will be to have Asterisk get extension from other ways too. One of the common ways is to get the type of content from the CONTENT-TYPE header in the HTTP response for fetching the media file using the URI provided.

*Steps to Reproduce:*
Provide a URL of the form:  http://host/media/1234 to Asterisk for media playback. It fails to play and logs show the following error line:
bq. [Sep 15 15:48:05] WARNING [29148] [C-00000092] file.c: File http://host/media/1234 does not exist in any format

*Scenario this issue is blocking:*
In the case where the media files are stored in some cloud object store, following can block the media being played via Asterisk:
- Cloud storage generally needs authenticated access to the storage. The way to do that is by using signed URIs. With the signed URIs there's no way to preserve the name of the file.
- In most cases Cloud storage returns a key to access the object and preserving file name is also not a thing there
Comments:By: Asterisk Team (asteriskteam) 2017-09-21 19:47:13.765-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2017-10-02 15:21:21.433-0500

Features requests without patches are not accepted through the issue tracker. Features requests are openly discussed on the mailing lists, forums, and IRC [1]. Please see the Asterisk Issue Guidelines [2] for more information on feature request and patch submission.

[1] http://asterisk.org/community/discuss
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

By: Friendly Automation (friendly-automation) 2018-05-03 10:51:45.013-0500

Change 8882 merged by Jenkins2:
Add the ability to read the media file type from HTTP header for playback