From: Alexey Khabulyak Date: Tue, 3 Dec 2024 09:53:10 +0000 (+0300) Subject: format_gsm.c: Added mime type X-Git-Tag: 21.7.0-rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9373e98332edad0a881e5cf52552d070dbaea33;p=thirdparty%2Fasterisk.git format_gsm.c: Added mime type Sometimes it's impossible to get a file extension from URL (eg. http://example.com/gsm/your) so we have to rely on content-type header. Currenly, asterisk does not support content-type for gsm format(unlike wav). Added audio/gsm according to https://www.rfc-editor.org/rfc/rfc4856.html (cherry picked from commit dab6ddc3227bf5b895dfcc3cda05f81229ddac0c) --- diff --git a/formats/format_gsm.c b/formats/format_gsm.c index 48699b6ac5..87157eae3f 100644 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -174,6 +174,7 @@ static off_t gsm_tell(struct ast_filestream *fs) static struct ast_format_def gsm_f = { .name = "gsm", .exts = "gsm", + .mime_types = "audio/gsm", .write = gsm_write, .seek = gsm_seek, .trunc = gsm_trunc,