Hi I have to play mp3 file in dialplan…
- Can I directly play mp3 in asterisk?
- Do I need to convert into .wav
- If need to convert into .wav then can I convert in dial-plan only through below command
sox foo-in.wav -r 8000 -c 1 -s -w foo-out.wav resample -ql
You can convert the mp3 into wav using an AGI, then use the .wav in your dialplan
Start your agi by using
#!/bin/bash
So you can execute bash scripts
This one work for me sox input-file.mp3 -c1 -r 8000 output-file.wav
format_mp3 from the Add-ons in menuselect can read mp3’s.
while I run this command getting below error
sox formats: no handler for file extension `mp3’
The sox version you have cant handle mp3 file, so you need to recopile sox with mp3 support or you might use lame, anyaway those packages are not asterisk related you can get help on their respective forums
1 Like