[asterisk-users] TimeStamp a Recording

Jared Smith jsmith at digium.com
Mon Jul 16 09:26:32 CDT 2007


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.




More information about the asterisk-users mailing list