[asterisk-bugs] [JIRA] (ASTERISK-28735) Realtime MoH Unknown format '' -- defaulting to SLIN
Sean Bright (JIRA)
noreply at issues.asterisk.org
Tue Feb 11 07:53:25 CST 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249715#comment-249715 ]
Sean Bright edited comment on ASTERISK-28735 at 2/11/20 7:53 AM:
-----------------------------------------------------------------
bq. Secondly, SLIN format is used where transcoding may be required depending on the channels native format.
When an {{mohclass}} is first created, we set the format to signed linear by default, so setting it to signed linear again is effectively a NOP.
was (Author: seanbright):
bq. Secondly, SLIN format is used where transcoding may be required depending on the channels native format.
When an {{mohclass}} is first created, we set the format to signed linear by default, so setting it to signed linear again is effective a NOP.
> 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