VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
pdhales at optusnet.co... Guest
|
Posted: Mon Jun 02, 2008 8:37 pm Post subject: [asterisk-users] Date in Dialplan |
|
|
http://www.voip-info.org/wiki-Asterisk+variables
has some ideas - including ${DATETIME}
PaulH
On Tue, 2008-06-03 at 06:35 +0530, Sanjay Rajdev wrote:
Quote: | Hello all,
I want to save the recording of each day in Date Folder e.g.
exten => s,1,Answer()
exten => s,2,MixMonitor(/sanjay/recording/${DATE}/${UNIQUEID}.wav)
How can I compute the $DATE variable?
Regards,
Sanjay Rajdev
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
|
Back to top |
|
|
baronrojo1982 at hotma... Guest
|
Posted: Mon Jun 02, 2008 8:45 pm Post subject: [asterisk-users] Date in Dialplan |
|
|
Hi Sanjay
you may have to use a cron like this one:
#!/bin/shdate1=`date +%Y%m%d`mkdir -p /var/spool/asterisk/monitor/sanjay/$date1+1
so you have to make work that ron every day t 23 59 min, and you will have a file created for every day.
youre rontab -e must be like this:
59 23 * * * /usr/local/cron_youre_cron.sh
Bye.
Date: Tue, 3 Jun 2008 06:35:28 +0530From: sanjay.rajdev at featherstoneinformatics.comTo: asterisk-users at lists.digium.comSubject: [asterisk-users] Date in Dialplan
Hello all,I want to save the recording of each day in Date Folder e.g.exten => s,1,Answer()exten => s,2,MixMonitor(/sanjay/recording/${DATE}/${UNIQUEID}.wav)How can I compute the $DATE variable?Regards,Sanjay Rajdev
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080602/bece5fe3/attachment.htm |
|
Back to top |
|
|
tilghman at mail.jeffa... Guest
|
Posted: Mon Jun 02, 2008 9:18 pm Post subject: [asterisk-users] Date in Dialplan |
|
|
On Monday 02 June 2008 20:05:28 Sanjay Rajdev wrote:
Quote: | Hello all,
I want to save the recording of each day in Date Folder e.g.
exten => s,1,Answer()
exten => s,2,MixMonitor(/sanjay/recording/${DATE}/${UNIQUEID}.wav)
How can I compute the $DATE variable?
|
With the STRFTIME function; something along the lines of:
/sanjay/recording/${STRFTIME(,,%Y%m%d%H%M%S)}/${UNIQUEID}.wav
See the output of 'core show function STRFTIME'. Also, don't forget to mkdir
the directory first.
--
Tilghman |
|
Back to top |
|
|
jsneerin at gmail.com Guest
|
Posted: Tue Jun 03, 2008 6:14 pm Post subject: [asterisk-users] Date in Dialplan |
|
|
On Mon, Jun 2, 2008 at 8:05 PM, Sanjay Rajdev
<sanjay.rajdev at featherstoneinformatics.com> wrote:
Quote: | I want to save the recording of each day in Date Folder e.g.
exten => s,1,Answer()
exten => s,2,MixMonitor(/sanjay/recording/${DATE}/${UNIQUEID}.wav)
How can I compute the $DATE variable?
|
Looks at the STRFTIME() function. It works just like the strftime(3)
library function and accepts all of the same % conversions. I use it
for exactly the same purpose you have in your example.
-James |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|