简体   繁体   中英

Asterisk record a .wav file and save a same file name of call file

I make a script that automatic create a .call file and auto-move to /var/spool/asterisk/outgoing/, im done with that but in recording i want to save a .wav file same as .call file

FILE

testcalls150.call

EXTENTIONS.CONF

[outgoingcall]
exten => s,1,Answer( )
exten=>s,2,Record(/var/spool/asterisk/tmp/ ${CALLFILENAME(name)} /${STRFTIME(${EPOCH},GMT-8,%m%d%y-%H:%M:%S)}.wav,0,0,qxk)

OUTPUT:

in /var/spool/asterisk/tmp/ testcalls150(date-time).wav

Thanks in Advance,
OAcebes

Please read this:

http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out

You need create call file with

Set: callfile_name=testcalls150.call

After that you able do in dialplan:

exten=>s,2,Record(/var/spool/asterisk/tmp/${callfile_name}${STRFTIME(${EPOCH},GMT-8,%m%d%y-%H:%M:%S)}.wav,0,0,qxk)

Note, when creating your call files you also have check that asterisk running and number of files in /var/spool/asterisk/outgoing is LOW. becuase can be situation when you always adding files and asterisk not able process same rate. Result will be system mailfunction after 2000-3000 files in folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM