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:07 | Date Closed: | 2011-06-07 14:08:06 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_musiconhold |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) moh-alpha-sort-1.4.21.2.patch ( 1) moh-alpha-sort-1.4.26.2.patch | |
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. ****** ADDITIONAL INFORMATION ****** I originally created the patch for 1.4.21.2, but updated it for 1.4.26.2. 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. |