I'm trying to convert and move 2 audio files that were recorded earlier in the call using ffmpeg. The code in using is:
#Convert and move the audio
$AGI->exec("system","ffmpeg|/olddir/$FILENAME.flac|/newdir/$FILENAME.wav");
$AGI->exec("system","ffmpeg|/olddir/$FILENAME.flac|/newdir/$FILENAME.wav");
When the AGI runs, this is what appears on the CLI:
-- AGI Script Executing Application: (system) Options: (ffmpeg|/olddir/stt_P4J3v6.flac|/newdir/stt_P4J3v6.wav)
WARNING[1796]: app_system.c:138 system_exec_helper: Unable to execute 'ffmpeg|/olddir/stt_P4J3v6.flac|/newdir/stt_P4J3v6.wav'
I'm not sure why it will not execute, the same command works fine on the console.
EDIT: retested command WITH the pipes in it and it returned weird errors. However, trying to use
$AGI->exec("system","ffmpeg /olddir/$FILENAME.flac /newdir/$FILENAME.wav");
only returns
-- AGI Script Executing Application: (system) Options: (ffmpeg)
so it's not taking the rest of the arguments.
I didn't need to use the "Exec" command. I didn't think "system" ran in AGIs. I was wrong.