[asterisk-bugs] [JIRA] (ASTERISK-23636) [patch]Filesystem based dynamic MoH classes
Vitezslav Novy (JIRA)
noreply at issues.asterisk.org
Fri Apr 18 01:57:18 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217431#comment-217431 ]
Vitezslav Novy edited comment on ASTERISK-23636 at 4/18/14 1:55 AM:
--------------------------------------------------------------------
Thank you for your time spent on this.
This patch adds 2 independent features
- possibility to create dynamic class using filesystem, without DB and realtime
- playlist
When we'd define class in musiconhold.conf, as you suggest, it was not dynamic anymore. My approach allows create/delete/change MoH classes without module reload.
Also I do not understand your note about playlist referenced from other directory. Playlist is in class directory with all class audio files. Structure is same as for static MoH classes. Directory defined in dynamic_dir variable contains class directories which contain audio files.
On the other hand I agree with you that playlist feature can be implemented more generally - for static and RT classes too.
was (Author: vnovy):
Thank you for your time spent on this.
This patch adds 2 independent features
- possibility to create dynamic class using filesystem, without DB and realtime
- playlist
When we'd define class in musiconhold.conf, as you suggest, it was not dynamic anymore. My approach allows create/delete/change MoH classes without module reload.
Also I do not understand your note about playlist referenced from other directory. Playlist is in class directory with all class audio files. Structure is same as for static MoH classes. Directory defined dynamic_dir variable contains class directories which contain audio files.
On the other hand I agree with you that playlist feature can be implemented more generally - for static and RT classes too.
> [patch]Filesystem based dynamic MoH classes
> -------------------------------------------
>
> Key: ASTERISK-23636
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23636
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Resources/res_musiconhold
> Affects Versions: SVN
> Reporter: Vitezslav Novy
> Assignee: Vitezslav Novy
> Severity: Minor
> Attachments: trunk-moh-20140415.patch
>
>
> This patch introduces another approach to dynamically controlled MoH.
> Unlike realtime this way is file based.
> As a switch between normal and alternative behavior, boolean variable
> 'dynamic' is used in MoH config file.
> By setting
> dynamic=yes
> new behavior is switched on.
> How dynamic behavior works
> All static MoH classes in musiconhold.conf and realtime are ignored, except [default]
> class. On the other hand dynamic class named 'default' is ignored too.
> New variable 'dynamic_dir' defines directory, where dynamic classes are
> defined. Each first level subdirectory of dynamic_dir defines one MoH class
> with same name as directory name.
> If class directory contains playlist file 'playlist.txt' content of
> the file defines audiofiles in class and their order. Otherwise directory
> is scanned same way as for standard MoH class with mode=files.
> Playlist expects one file on line, without path and without extension.
> Files must be placed in class directory.
> If first line of playlist contains exactly one character '%', files will be
> ordered randomly.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list