[asterisk-users] TimeStamp a Recording
Keshav K.
kesh.keshav at yahoo.com
Tue Jul 17 02:16:46 CDT 2007
Hi,
For timestamp a recording you can use this...
exten => 1XXXXXXX,1,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},GMT-5.5,%d%b%Y)}-${STRFTIME(${EPOCH},GMT-5.5,%H%M%S)})
exten => 1XXXXXXX,n,Monitor(wav,/home/recording${STRFTIME(${EPOCH},Asia/Calcutta,%Y%m%d)}/${CALLFILENAME},m)
Regards,
Keshav
Jared Smith <jsmith at digium.com> wrote: On Sat, 2007-07-14 at 23:31 -0400, Forrest Beck wrote:
> Has anyone come up with to timestamp a Recording? I am using a pretty
> simple dialplan to record a audio file for a hotline. I'd like to
> store the date and time it was recorded somewhere, Ast DB or MySQL DB.
In that case, the ${EPOCH} channel variable is your friend... it should
always contain the current system time, in Unix epoch format. (In
essence, it contains the number of seconds since Jan 1, 1970.)
You can also use the STAT() dialplan function to read the file creation
(or modification) date and time.
> Then when the audio file is played back to a caller, the system will
> say something like.
The SayUnixTime() application will read back the time to the caller, and
allow you to choose which format the time is read back in.
--
Jared Smith
Community Relations Manager
Digium, Inc.
_______________________________________________
--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
---------------------------------
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070717/3aa3d632/attachment.htm
More information about the asterisk-users
mailing list