[asterisk-dev] [Code Review] 3991: musiconhold: Add sort=randstart, and deprecate old stuff.
wdoekes
reviewboard at asterisk.org
Sun Sep 14 10:42:08 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3991/
-----------------------------------------------------------
(Updated Sept. 14, 2014, 10:42 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 423065
Repository: Asterisk
Description
-------
This changeset:
- adds sort=randstart (next to sort=, sort=random, sort=alpha)
- combines duplicate moh option parsing code into a single function
- adds deprecationwarnings for application=r to sort randomly
- adds deprecationwarnings for random=yes to sort randomly
- removes invisible code that was supposed to stay until 1.8
("These names were deprecated in 1.4 and should not be used until
after the next major release")
The sort=randstart works like sort=alpha, except we start at a random
position.
That means that playlist order will be respected while you don't need
to listen to the same song every time you dial in.
I considered also adding a sort=shuffle which does a shuffle where
sort=alpha now does the qsort. But that would probably only be useful
for those few people that use uncached (realtime) classes.
Diffs
-----
/trunk/res/res_musiconhold.c 422983
/trunk/configs/samples/musiconhold.conf.sample 422983
Diff: https://reviewboard.asterisk.org/r/3991/diff/
Testing
-------
Tested that sort=, sort=alpha, sort=random, sort=randstart all work as
promised.
(Testing was done on an asterisk-10 branch with uncached realtime moh.
But the code in trunk is exactly the same, apart from the
ast_format_cache_get to ast_format_cache_get change.)
Checked that the new option 'randstart' fits within the current alembic
DB schema. It does:
op.create_table(
'musiconhold',
sa.Column('name', sa.String(80), primary_key=True, nullable=False),
...
sa.Column('sort', sa.String(10)),
sa.Column('format', sa.String(10)),
sa.Column('stamp', sa.DateTime())
)
Thanks,
wdoekes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140914/fed99521/attachment-0001.html>
More information about the asterisk-dev
mailing list