[asterisk-users] What's up with DATETIME and TIMESTAMP in
Asterisk 1.4beta3 ?
Anselm Martin Hoffmeister
anselm at hoffmeister-online.de
Fri Dec 15 12:32:18 MST 2006
Am Freitag, den 15.12.2006, 13:08 -0600 schrieb Alvin Austin:
> Hello,
>
> In Asterisk 1.4 beta 3, the UPGRADE.txt file says:
>
> Variables:
> * The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
> ${CALLERANI}, ${DNID}, ${RDNIS}, ${DATETIME}, ${TIMESTAMP},
> ${ACCOUNTCODE},
> and ${LANGUAGE} have all been deprecated in favor of their related
> dialplan
> functions. You are encouraged to move towards the associated dialplan
> function, as these variables will be removed in a future release.
>
> However, neither the function or application for either of TIMESTAMP or
> DATETIME seems to work in 1.4beta3...
>
> exten => *333,1,NoOp(DATETIME() : ${DATETIME()})
> exten => *333,n,NoOp(DATETIME : ${DATETIME})
> exten => *333,n,NoOp(TIMESTAMP() : ${TIMESTAMP()})
> exten => *333,n,NoOp(TIMESTAMP : ${TIMESTAMP})
http://www.voip-info.org/wiki/index.php?page=Asterisk+func+strftime
will probably contain the information you want. To sum up, DATETIME and
TIMESTAMP are gone, use the ${EPOCH} for the seconds since
1970-01-01,00:00:00 and the STRFTIME to format that data.
STRPTIME can be used to calculate the epoch value of any
date-time-string.
HTH
Anselm
More information about the asterisk-users
mailing list