I am trying to execute a bash script from within my dialplan. The bash scripts are from within a directory projectFiles
in /var/lib/asterisk/agi-bin
. When I try to execute the script, like so:
exten => 0,n,System(/var/lib/asterisk/agi-bin/projectFiles/main.sh ${RECORDED_FILE}.wav ${SOUND_PATH}/menus/wav2.wav)
I end up with the following error:
WARNING[27515]: app_system.c:125 system_exec_helper: Unable to execute '/var/lib/asterisk/agi-bin/projectFiles/main.sh /tmp/rec62.wav /var/lib/asterisk/sounds/en/projects/menus/wav2.wav'
== Spawn extension (test-project, 0, 5) exited non-zero on 'DAHDI/15-1'
The permissions to the script main.sh
are set at asterisk as owner and group
. Where might I be going wrong?
Any help is most welcome,
Sriram.