[asterisk-users] Record() : How to get filename created with %d?
Vincent
vincent.delporte at bigfoot.com
Sat Nov 10 22:40:16 CST 2007
On Sat, 10 Nov 2007 21:16:44 -0400, "Baji Panchumarti"
<baji.panchumarti at gmail.com> wrote:
> TrySystem is passing the cmd to (bash) shell, just give it a file match
> skeleton as long as you don't have other "msgNNN.wav" files that
> shouldn't be moved.
Thanks, but it won't do, as I need to get the exact filename so I can
send an e-mail pointing to the file later in the script :-/
Unless someone has a better way, I'll use the RAND() function:
exten => _[1_4],n,Set(RANDNAME=${RAND()});
exten => _[1-4],n,Record(/tmp/msg${RANDNAME}.wav,3,30);
;move wav to lighttpd's htdocs
exten => _[1-4],n,TrySystem(mv /tmp/msg${RANDNAME}.wav
/var/www/asterisk/)
exten => _[1-4],n,ExecIf($[${SYSTEMSTATUS} != SUCCESS],Verbose,Failed
moving WAV file)
Thanks.
More information about the asterisk-users
mailing list