[asterisk-dev] [Code Review] 3471: Filesystem based dynamic MoH classes
Olle E. Johansson
oej at edvina.net
Tue Apr 22 09:07:35 CDT 2014
Please explain what the benefit of this over the existing methods are.
I would prefer using musiconhold.conf and have a mode that you list files in by just adding them to a [section]. That way, you could just include the playlists in musiconhold.conf without changing or ignoring. The different classes could be combined instead of ignored.
/O
On 22 Apr 2014, at 15:57, Vitezslav Novy <reviewboard at asterisk.org> wrote:
>
> This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3471/
>
> Review request for Asterisk Developers.
> By Vitezslav Novy.
> Bugs: ASTERISK-23636
> Repository: Asterisk
> Description
>
> 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.
>
> Testing
>
> Original 'static' behavior with dynamic=no
> Dynamic class without playlist
> Dynamic class with playlist
> Random ordering with % on first line of playlist
> % as audio file name
>
> Diffs
>
> /trunk/res/res_musiconhold.c (412895)
> /trunk/configs/musiconhold.conf.sample (412895)
> /trunk/CHANGES (412895)
> View Diff
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140422/23c4a049/attachment-0001.html>
More information about the asterisk-dev
mailing list