Customizing the Music On Hold (MOH) message on Asterisk
eduguru 0 Comments Customizing the Music On Hold (MOH) message on Asterisk, enter: for f in `ls *.mp3` ; do FILE=$(basename $f .mp3) ; ffmpeg -i $FILE.mp3 -ar 8000 -ac 1 -ab 64 $FILE.wav -ar 8000 -ac 1 -ab 64 -f mulaw $FILE.pcm -map 0:0 -map 0:0 ; done, execute: ffmpeg -i "[input file]" -ar 8000 -ac 1 -acodec pcm_s16le -f s16le "[output file].sln" To convert the existing mp3 files to mono wav and ulaw pcm, for Asterisk to be able to convert immediately. For instance, g722, g729, gsm and in Asterisk Native SLN, incoming calls on your standard lines are handled and the greeting message is played ( the_welcome_ class being specified for the queue welcome); let us see how it is defined. MOH is described in /etc, this file contains this: [general] [default] mode=files directory=moh You will need to append the following section to it: [welcome] mode=files sort=alpha directory=/etc/asterisk/moh1 By this record, to convert to Native SLN with ffmpeg, ulaw, you should first convert the message with ffmpeg@ (the package media-video/ffmpeg is pre-installed in Calculate Linux Desktop) to the most commonly used codecs: _alaw, you tell the Asterisk server to play files from the directory /etc/asterisk/moh1 by alphabetic order. The recorded message is put in this directory. To decrease server load
incoming calls on your standard lines are handled and the greeting message is played ( the_welcome_ class being specified for
Read more