[asterisk-dev] [Code Review] 3471: Filesystem based dynamic MoH classes

Vitezslav Novy reviewboard at asterisk.org
Mon Apr 28 10:26:52 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3471/
-----------------------------------------------------------

(Updated April 28, 2014, 3:26 p.m.)


Status
------

This change has been discarded.


Review request for Asterisk Developers.


Bugs: ASTERISK-23636
    https://issues.asterisk.org/jira/browse/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.


Diffs
-----

  /trunk/res/res_musiconhold.c 412900 
  /trunk/configs/musiconhold.conf.sample 412900 
  /trunk/CHANGES 412900 

Diff: https://reviewboard.asterisk.org/r/3471/diff/


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


Thanks,

Vitezslav Novy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140428/30ccf7f4/attachment.html>


More information about the asterisk-dev mailing list