|
|
|
@ -1433,6 +1433,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
|
|
|
|
|
else if (!strcasecmp(tmp->name, "sort") && !strcasecmp(tmp->value, "alpha"))
|
|
|
|
|
ast_set_flag(mohclass, MOH_SORTALPHA);
|
|
|
|
|
else if (!strcasecmp(tmp->name, "format")) {
|
|
|
|
|
ao2_cleanup(mohclass->format);
|
|
|
|
|
mohclass->format = ast_format_cache_get(tmp->value);
|
|
|
|
|
if (!mohclass->format) {
|
|
|
|
|
ast_log(LOG_WARNING, "Unknown format '%s' -- defaulting to SLIN\n", tmp->value);
|
|
|
|
@ -1765,6 +1766,7 @@ static int load_moh_classes(int reload)
|
|
|
|
|
} else if (!strcasecmp(var->name, "sort") && !strcasecmp(var->value, "alpha")) {
|
|
|
|
|
ast_set_flag(class, MOH_SORTALPHA);
|
|
|
|
|
} else if (!strcasecmp(var->name, "format")) {
|
|
|
|
|
ao2_cleanup(class->format);
|
|
|
|
|
class->format = ast_format_cache_get(var->value);
|
|
|
|
|
if (!class->format) {
|
|
|
|
|
ast_log(LOG_WARNING, "Unknown format '%s' -- defaulting to SLIN\n", var->value);
|
|
|
|
|