Trying to use the System() diaplan function

I am trying to use the System() command in order to get the number of seconds since 1970, by using the System(date’+%s’) command.

I am running Asterisk., but I cannot see anything relating to this command. Can anyone offer an explanation please? Various sites, and the O’Reilly/TFOT book also has a section about it.



why are you not using ${EPOCH} ? it does what you want and keeps it in the dialplan



${EPOCH} would be a chan variable that would give you the time. Try the following to get the idea

editing “_X.” and “1”. For whatever you need.

That’s perfect. This is one of those hard to find tricks. I did a Google for it and it’s hardly mentioned elsewhere.

Thanks a lot, got me out of a hole this one.