Summary:ASTERISK-14776: [patch] Tweak to make Music On Hold play files in alphabetical order.
Reporter:Michael Cargile (mcargile)Labels:
Date Opened:2009-09-04 13:46:07Date Closed:2011-06-07 14:08:06
Versions:Frequency of
Environment:Attachments:( 0) moh-alpha-sort-
( 1) moh-alpha-sort-
Description:Music On Hold currently plays the files in the order they are found in the directory and not alphabetically. This is because the moh_scan_files function is using readdir to grab the file list. The included patch converts moh_scan_files to use the scandir function with alphasort to get the files in alphabetical order. I have also added verbose messages so you can see which files and directories moh is loading.


I originally created the patch for, but updated it for I have included both patches.
Comments:By: Sean Bright (seanbright) 2009-09-04 16:29:52

Unfortunately this is the way that 1.4 operates and would change behavior of existing installations.  This fix has already gone into trunk and various 1.6.x branches.  Thanks for the report.