bilal ghayyad
2011-Jan-01 17:43 UTC
[asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m)
Dear List; For each call (in specific case), I need to do a record and save in a spearated file, so I am thinking the best thing is to save based on the time. Monitor(wav,Record1,m) So, how can I make the file name to be based on the current time (which is changed always, or based on the some unique paramter (related to the call it self). Any advise? Regards Bilal
Nic Colledge
2011-Jan-01 18:36 UTC
[asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m)
Try using ${UNIQUEID} to get the unique id of the current call. That or something like CDR(uniqueid). Forget which off the top of my head. Nic. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of bilal ghayyad Sent: 01 January 2011 17:43 To: asterisk-users at lists.digium.com Subject: [asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m) Dear List; For each call (in specific case), I need to do a record and save in a spearated file, so I am thinking the best thing is to save based on the time. Monitor(wav,Record1,m) So, how can I make the file name to be based on the current time (which is changed always, or based on the some unique paramter (related to the call it self). Any advise? Regards Bilal -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Bryant Zimmerman
2011-Jan-01 18:46 UTC
[asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m)
Use a combination of ${EPOCH} with a format string and the unique call / channel id. Example: exten => s,1,Set(MY_TIMEVAR=:${STRFTIME(${EPOCH},,%d%mNaVH:NaVS)}) exten => s,n,Monitor(wav,${MY_TIMEVAR}~${CHANNEL},m) ---------------------------------------- From: "bilal ghayyad" <bilmar_gh at yahoo.com> Sent: Saturday, January 01, 2011 1:16 PM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m) Dear List; For each call (in specific case), I need to do a record and save in a spearated file, so I am thinking the best thing is to save based on the time. Monitor(wav,Record1,m) So, how can I make the file name to be based on the current time (which is changed always, or based on the some unique paramter (related to the call it self). Any advise? Regards Bilal -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110101/83509102/attachment.htm>
Steve Edwards
2011-Jan-01 18:50 UTC
[asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m)
On Sat, 1 Jan 2011, bilal ghayyad wrote:> For each call (in specific case), I need to do a record and save in a > spearated file, so I am thinking the best thing is to save based on the > time.Read up on the STRFTIME function. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Sebastian
2011-Jan-03 08:46 UTC
[asterisk-users] Saving the monitor file on new file always using Monitor(wav, Record1, m)
Hi, On 01/01/2011 05:43 PM, bilal ghayyad wrote:> Dear List; > > For each call (in specific case), I need to do a record and save in a spearated file, so I am thinking the best thing is to save based on the time. > > Monitor(wav,Record1,m) > > So, how can I make the file name to be based on the current time (which is changed always, or based on the some unique paramter (related to the call it self).I use something like this in extensions.conf for outgoing calls: exten => _9.,1,Set(REC_DIR_OUT=/shares/phone_calls/${STRFTIME(${EPOCH},,%Y-%m-%d)}/outgoing) exten => _9.,n,Set(REC_FILE_OUT=${STRFTIME(${EPOCH},,%Y-%m-%d %H %M %S)} - ${EXTEN:1}.gsm) exten => _9.,n,System(mkdir -p ${REC_DIR_OUT}) exten => _9.,n,MixMonitor(${REC_DIR_OUT}/${REC_FILE_OUT},b) exten => _9.,n,Dial(SIP/${EXTEN:1}@my_voip_provider) exten => _9.,n,HangUp() Sorry for the line breaks. My email client does that. You should keep each extension priority on a single line. This will create one variable for the folder (containing the date today) and for the file (containing the time of the call and the number dialled) - and then creates the folder and starts MixMonitor with the filename as argument. If your setup is larger, you should also add maybe the calling extension to the file name - so that you don't have two files with the same name - if two extensions try to call the same external number at exactly the same time (seems unlikely to me). Sebastian> > Any advise? > > Regards > Bilal > > > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >