[asterisk-users] Re: asterisk-users Digest, Vol 33, Issue 35

Steve Edwards asterisk.org at sedwards.com
Mon Apr 9 19:38:06 MST 2007


On Mon, 9 Apr 2007, Steve Edwards wrote:

> On Tue, 10 Apr 2007, Faisal Ashraf wrote:
>
>> I like my recordings to go to date wise folder i mean to say that for
>> example today is 20070409 so all recordings should go directly to that
>> folder instead of one folder for whole month. and then next day's
>> recordings
>> should go to next date folder.
>
> Using the STRFTIME function to build your file name should get you 
close.
>
> Reading the documentation should fill in the blanks :)

On Tue, 10 Apr 2007, Faisal Ashraf wrote:

> We i have settup it like this it giveme caller id agent id and date-time on
> gsm file but i want them to be in folder on every day basis datewise.
>
> exten =>
> _1NXXNXXXXXX,2,Set(CALLFILENAME=${ACCOUNTCODE}-${EXTEN}-${TIMESTAMP})
> exten => _1NXXNXXXXXX,3,Monitor(gsm,/rec/asterisk/apr07/${CALLFILENAME},mb)
>
> Any Idea ?

Another clue in the same day?

) Build a variable using STRFTIME with a format string of your choice for 
YYYYMMDD.

) Call system() passing "mkdir --parents", your recording path and your 
YYMMDD variable. "man mkdir" to refresh your memory on what the command is 
doing :)

) Call monitor like you do above, but insert your YYMMDD variable and a 
couple of slashes and its "Miller time."

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000


More information about the asterisk-users mailing list