Play Local Audio Files

From WLPS Wiki
Jump to navigation Jump to search


Audio files need to be in:

/var/lib/asterisk/sounds

Next create a script like this replacing 1111 with your node number. Note there is no file extension.

#! /bin/bash
/usr/sbin/asterisk -rx "rpt localplay 1111 myaudiofile"

Now add it to crontab

sudo nano /etc/crontab

Add the lines as you need at the end of the file.

*/1     *       *       *       *       root    /home/repeater/asterisk/audiotest.sh > /dev/null 2>&1


Reload Crontab

sudo service cron reload


Test

sudo /usr/sbin/asterisk -rx "rpt localplay 64980 /var/lib/asterisk/sounds/you-seem-impatient"