Hi, I am using this dialplan to record incoming calls: ..... exten => 3331122,n,Set(MONITOR_FILE=${RECDIR}/${UNIQUEID}) exten => 3331122,n,MixMonitor(${MONITOR_FILE}.wav,b) exten => 3331122,n,GoSub(stdexten(${Ext1007})) exten => 3331122,n,Voicemail(1007 at default,) exten => 3331122,n,Hangup() The problem is it records all incoming calls include those with the disposition of "NO ANSWER, FAILED, BUSY, UNKNOWN.". For example the "NO ANSWER" call will leave a 44byte wav file in my ${RECDIR} How can I record only the calls with the disposition of "ANSWERED"? May be I should run a cronjob to clean up the 44byte file after it's been created? Is there a better way? Thanks. Gao --
> The problem is it records all incoming calls include those with the > disposition of "NO ANSWER, FAILED, BUSY, UNKNOWN.". For example the "NO > ANSWER" call will leave a 44byte wav file in my ${RECDIR} > > How can I record only the calls with the disposition of "ANSWERED"? > > May be I should run a cronjob to clean up the 44byte file after it's > been created? Is there a better way? >I would probably add a line in my hangup (h) extension that does an execif to delete the file if the disposition is not equal to "ANSWERED". -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140915/60495a6f/attachment.html>
On 2014-09-15 16:45, Gao wrote:> Hi, > > I am using this dialplan to record incoming calls: > > ..... > exten => 3331122,n,Set(MONITOR_FILE=${RECDIR}/${UNIQUEID}) > exten => 3331122,n,MixMonitor(${MONITOR_FILE}.wav,b) > exten => 3331122,n,GoSub(stdexten(${Ext1007})) > exten => 3331122,n,Voicemail(1007 at default,) > exten => 3331122,n,Hangup() > > The problem is it records all incoming calls include those with the > disposition of "NO ANSWER, FAILED, BUSY, UNKNOWN.". For example the > "NO ANSWER" call will leave a 44byte wav file in my ${RECDIR} > > How can I record only the calls with the disposition of "ANSWERED"? >The b option should only record bridged channels, so only connected calls should be recorded: b: Only save audio to the file while the channel is bridged. NOTE: Does not include conferences or sounds played to each bridged party NOTE: If you utilize this option inside a Local channel, you must make sure the Local channel is not optimized away. To do this, be sure to call your Local channel with the '/n' option. For example: Dial(Lo cal/start at mycontext/n) -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez dCAP #1349 +52 (55)9116-91161