[asterisk-users] Date in Dialplan

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Jun 2 21:18:29 CDT 2008


On Monday 02 June 2008 20:05:28 Sanjay Rajdev wrote:
> 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



More information about the asterisk-users mailing list