Hello all,
I wanna play a single file when call is put on hold. In asterisk it takes the files from moh directory when call is put on hold. I wanna to play a single file from the directory instead of playing the whole file in order or random.
And also i don’t wanna create separe directory , i wanna take the file from moh and plays that single file .
In MOH directory i do have so many files. In my case i want to play a single file from that directory instead of playing all files in order or random .Also don’t want to delete the remaining file.
But that i don’t want i want to play a single file how do i do that . For each context i want to set different MOH if i going to create different folder then it won’t look efficient. It would be better to play a file either directly from musiconhold.conf or someother way. Is there any way to do that.
So faced the same issue and had the same question. Thank you for the posts above.
I solved it when I copied all formats of the moh I needed, in a subdirectory of “moh” which named “mine”, created new class “mine” changing musiconhold.conf and adding that new class, the directory path and replaced “default” in extensions.conf with “mine”.
Playing MP3 is a waste of CPU power. Telephone systems don’t have the audio quality to benefit, so it is better to pre-convert to the actual codec that will be used.
Look in your contrib/utils directory of your asterisk source, there is a README.rawplayer that will show you how to convert your files with sox and how to add them to your MOH classes.