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


--
_____________________________________________________________________
-- 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

Reply via email to