How Do I Play a Sound File in ASL 3?

In the ASL3 manual " Creating a Sound File for Later" the created file will play but only with “sudo” e.g. The example 'asterisk -rx ‘rpt playback 63001 /tmp/netstartsin5’ needs sudo.

The problem is asterisk does not have sudo. I cannot get a file to play from DTMF or from the scheduler.

How do I make this work?

Roger
WA1NVC

On Debian, if you are using cron then “sudo crontab -e” will help you set cron jobs with root access.

This page should help you update / understand the filesystem permissions : ASL3 Manual : Permissions

… and you might also have a look at : Play Message with Macro

you have this for a line:
asterisk -rx ‘rpt playback 63001 /tmp/netstartsin5’

it should be this
/usr/sbin/asterisk -rx “rpt playback 63001 /tmp/netstartsin5”

place your files for announcement into a different other than /tmp or when you reboot the will be deleted. if your on ALS3 you definatley what a different directory than /tmp
suggest: mkdir /etc/asterisk/local or put the announcments into the /var/lib/asterisk/sounds directory.

For some reason my replies are being rejected… I’ll try pasting it here…

‘localplay’ and ‘playback’ require root or sudo.

In ASL V3 Asterisk does not have either permission hence macros and functions that use ‘localplay’ or ‘playback’ will not work.

In hamVOIP or ASL versions prior to ASL V3 asterisk ran as root and this problem did not exist. What is the solution for ASL3 functions, macros, and schedule?

WA1NVC
Roger

This is simply not true. As previously stated in your last thread, all you have to do is this:

… And also make sure the asterisk user has permission to read the file AND the directory which it resides, which is outlined here: Permissions - AllStarLink Manual

Have you done this? What exactly is the issue you are facing? What are the error messages you are encountering? We need more info.

You say the “problem” didn’t exist in the other outdated versions but haven’t really presented any problem with ASL3. Proper permissions management is most certainly not a “problem”, it’s actually a really nice fix. It just requires a slight alteration to old outdated operating practices.

Exactly
Much cleaner, more compatible, a normal Debian system now

Problem solved. It was not Permissions which I understand well but format.

The following solved my problem:

Roger
WA1NVC

I then added the following lines to the [functions] stanza of my “rpt.conf” file :

610=localplay,rpt/thetemperatureis
620=cmd,/etc/asterisk/scripts/test.sh

Thanks for showing a handy tool.