Yay!.. I dont know if it is a bug, or there is other setting for this.
musiconhold.conf
[class001]
mode=files
directory=/var/lib/asterisk/moh_custom/
sort=alpha
The config above does work alright although sorted reverse. Say you have a file a.mp3, b.mp3, c.mp3, d.mp3... The first one to be play is d.mp3 and last is a.mp3... Ok that can be handled, and this work ok for me as of I can manage my file on which one would be first and last. UNTILL if you have more than 4 files on that directory, the playlist become random in order, yet still following a pattern. Because if you remove sort=alpha and place random=true, the playback is in random and should be, but with other flaw, The files will be random played after each files finished playback. It means that a.mp3 can be plays every turn and c.mpe could not be play during the playback duration... Hmmmm... Well this bug exist on Asterisk 1.4.22-4 RPM by vc-rpms@voipconsulting.nl on my test machine...
I hope this save time for somebody out there, and make my wasted time go into used and not bother trying to arrange your playlist if you have more than 4 files in a directory.
DO NOT PUT MORE THAN 4 FILES IN MOH that is if you want to preserve your playlist in order..
musiconhold.conf
[class001]
mode=files
directory=/var/lib/asterisk/moh_custom/
sort=alpha
The config above does work alright although sorted reverse. Say you have a file a.mp3, b.mp3, c.mp3, d.mp3... The first one to be play is d.mp3 and last is a.mp3... Ok that can be handled, and this work ok for me as of I can manage my file on which one would be first and last. UNTILL if you have more than 4 files on that directory, the playlist become random in order, yet still following a pattern. Because if you remove sort=alpha and place random=true, the playback is in random and should be, but with other flaw, The files will be random played after each files finished playback. It means that a.mp3 can be plays every turn and c.mpe could not be play during the playback duration... Hmmmm... Well this bug exist on Asterisk 1.4.22-4 RPM by vc-rpms@voipconsulting.nl on my test machine...
I hope this save time for somebody out there, and make my wasted time go into used and not bother trying to arrange your playlist if you have more than 4 files in a directory.
DO NOT PUT MORE THAN 4 FILES IN MOH that is if you want to preserve your playlist in order..