I feel like a noob but I’ve had no luck getting MP3s to play on my local node. I’ve searched the forums and found 2 relevant threads (one recently about Newline broadcasts by creating a stanza to use the autopatch feature to play an MP3
And here are the log entries of the failure (/var/log/asterisk/messages)
Jul 4 11:18:24] WARNING[6216] file.c: File /etc/asterisk/audio/newsfiles/news.mp3 does not exist in any format
[Jul 4 11:18:24] WARNING[6216] file.c: Unable to open /etc/asterisk/audio/newsfiles/news.mp3 (format 0x44 (ulaw|slin)): No such file or directory
If you do like localplay news (I’m abbreviating the commands) then it’s searching for a file like news.ul, which it finds. But if you do localplay news.mp3 it’s going to search for news.mp3.ul which doesn’t exist.
If you want to make sure it’s playing that file then you need to rename it, for example to newsmp3.mp3 then try localplay newsmp3.
In summary asterisk needs the filename to not have the extension on it. It will automatically search through supported extensions.
[Jul 5 07:43:00] WARNING[14046] file.c: File /etc/asterisk/audio/newsfiles/newsmp3 does not exist in any format
[Jul 5 07:43:00] WARNING[14046] file.c: Unable to open /etc/asterisk/audio/newsfiles/newsmp3 (format 0x44 (ulaw|slin)): No such file or directory
[Jul 5 07:43:00] WARNING[14046] app_rpt.c: ast_streamfile failed on DAHDI/pseudo-1545420597
Bug? - Mine works fine, but I do not put it in the directory with other asterisk sounds.
And I specify that dir along with the complete filename on playback.
No filespec. I believe you need to specify the filespec as a .mp3 or mp3player no work. It’s expected.
It is not a native format. Handled by asterisk only by the so module.
make sure you are saving the mp3 as an 8k mono file. You do not specify an extension to play it.
/usr/bin/asterisk -rx “rpt localplay your_node_number /etc/asterisk/audio/newsfiles/newsmp3”
you node number is you node that you want it to play on. if your trying to play it on a node with Dahdi/psuedo it will not play as it does not allow Telemetry which is what this would be.