[asterisk-users] Mixmonitor concept's question

Earl earl at micpc.com
Mon Jul 4 08:43:37 CDT 2011


On Monday, July 04, 2011 05:10:43 AM virendra bhati wrote:
> [RecordPrompts]
> 
> exten => 1111,1,Answer()
> exten => 1111,n,NoOp(WelCome to conference section)
> exten => 1111,n,Playback(ConfDemoWC)
> exten =>
> 1111,n,MixMonitor(tmp/00Record/1111-${STRFTIME(${EPOCH},,%C%y%m%d%H%M%S)}.w
> av,ab) exten => 1111,n,Konference(${EXTEN},ADRSV)
> 
> Hi
> 
> My basic doubt is that if 1 or more  person call 1111 extension then
> recording will be started by asterisk Mixmonitor application.
> 
> So basic question will come into mind that all calls will start recording
> it means more then 1 thread will start by asterisk for only recording
> purpose but finally 1 file will be save at disk.
> 
> Am I right ?
> 
> 
> -----
> Thanks and regards
> 
>  Virendra Bhati
> +91-9172341457
> Software Engineer

Hi Virendra,

It has been my experience that if two or more calls happen in the same second 
(which is the least identifier you are using to make the file unique) then the 
result is that only one file is created. (the other(s) are not)

To solve that issue, you can use ${UNIQUEID}, something like:

exten => 6000,63,Set(CALLTIME=${STRFTIME(${EPOCH},,
%C%y%m%d%H%M%S)}_${UNIQUEID})
exten => 6000,64,Set(CALLFILENAME=6000-${CALLTIME})
exten => 6000,65,Set(CMD='/opt/lame/l.sh '${CALLFILENAME})
exten => 6000,66,MixMonitor(${CALLFILENAME}.wav|v(2)V(0)|${CMD})

Note that the 1st exten line wraps here in the email but it should be all on 
one line.

earl



More information about the asterisk-users mailing list