Faisal Ashraf
2007-Apr-09 18:54 UTC
[asterisk-users] Re: asterisk-users Digest, Vol 33, Issue 35
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 ?
Faisal
> ------------------------------
>
> Message: 16
> Date: Tue, 10 Apr 2007 03:08:57 +0500
> From: "Faisal Ashraf" <faisalgo@gmail.com>
> Subject: [asterisk-users] Date Wise Recordings
> To: asterisk-users@lists.digium.com
> Message-ID:
> <5a0bcee90704091508u413d5c28s1d44935984fb0e5d@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> 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.
>
> so how can i do that my current monitor context is like...
>
> exten =>
> _1NXXNXXXXXX,3,Monitor(gsm,/rec/asterisk/apr07/${CALLFILENAME},mb)
>
>
>
>
> Faisal
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.digium.com/pipermail/asterisk-users/attachments/20070409/d14e8951/attachment-0001.htm
>
>
>
> ------------------------------
>
> Message: 19
> Date: Mon, 9 Apr 2007 16:01:46 -0700 (PDT)
> From: Steve Edwards <asterisk.org@sedwards.com>
> Subject: Re: [asterisk-users] Date Wise Recordings
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users@lists.digium.com>
> Message-ID: <Pine.LNX.4.64.0704091559430.28970@fs.sedwards.com>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> 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 :)
>
> Thanks in advance,
> ------------------------------------------------------------------------
> Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
> Newline Fax: +1-760-731-3000
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20070409/accc355e/attachment.htm
Steve Edwards
2007-Apr-09 19:38 UTC
[asterisk-users] Re: asterisk-users Digest, Vol 33, Issue 35
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 youclose.> > 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@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000