[asterisk-users] Record ANSWERED call

Gao gao at pztop.com
Mon Sep 15 16:45:42 CDT 2014


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

-- 




More information about the asterisk-users mailing list