[asterisk-bugs] [JIRA] (ASTERISK-28735) Realtime MoH Unknown format '' -- defaulting to SLIN
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Thu Feb 13 19:03:26 CST 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249738#comment-249738 ]
Friendly Automation commented on ASTERISK-28735:
------------------------------------------------
Change 13788 merged by Joshua Colp:
res_musiconhold: Avoid spurious warning when 'format' is the empty string
[https://gerrit.asterisk.org/c/asterisk/+/13788|https://gerrit.asterisk.org/c/asterisk/+/13788]
> Realtime MoH Unknown format '' -- defaulting to SLIN
> ----------------------------------------------------
>
> Key: ASTERISK-28735
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28735
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_musiconhold
> Affects Versions: GIT, 13.31.0, 16.8.0, 17.2.0
> Environment: CentOS 7
> Reporter: Ross Beer
> Assignee: Sean Bright
> Labels: patch
> Attachments: ASTERISK-28735.patch
>
>
> A recent change to the res_odbc.c has caused res_musiconhold.c to show the following message when using a realtime database:
> {code}
> res_musiconhold.c:1126 moh_parse_options: Unknown format '' -- defaulting to SLIN
> {code}
> When using the 'file' playback method, you do not specify a 'format' and therefore the option is passed '' as the variable.
> This has two side effects, firstly the above message is displayed in the CLI/Logs. Secondly, SLIN format is used where transcoding may be required depending on the channels native format.
> To resolve this we need to add an additional check to the 'format' if statement:
> {code}
> } else if (!strcasecmp(var->name, "format") && !var->value) {
> ao2_cleanup(mohclass->format);
> mohclass->format = ast_format_cache_get(var->value);
> if (!mohclass->format) {
> ast_log(LOG_WARNING, "Unknown format '%s' -- defaulting to SLIN\n", var->value);
> mohclass->format = ao2_bump(ast_format_slin);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list