I'm trying to declare a few date-related global variables to ease my dialplan. When I declare the following in the [globals] context of extensions.conf, I get unexpected results:<br><br>YEAR = ${STRFTIME(${EPOCH},,%Y)}<br>
MONTH = ${STRFTIME(${EPOCH},,%m)}<br>DAY = ${STRFTIME(${EPOCH},,%d)}<br>TIMESTAMP = ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}<br><br>If I evaluate these variables in the dialplan later, using <br><br>exten => 7777,n,Verbose(${TIMESTAMP} - ${YEAR} - ${MONTH} - ${DAY})<br>
<br>My output is as follows:<br><br> -- Executing [7777@phones:3] Verbose("SIP/2625-0000d5f0", "Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010") in new stack<br>
Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010<br><br>However, the following line:<br><br>exten => 7777,n,Verbose(${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)} - ${STRFTIME(${EPOCH},,%Y)} - ${STRFTIME(${EPOCH},,%m)} - ${STRFTIME(${EPOCH},,%d)})<br>
<br>evaluates with what I expect:<br><br> -- Executing [7777@phones:4] Verbose("SIP/2625-0000d5f0", "20100713-110853 - 2010 - 07 - 13") in new stack<br>20100713-110853 - 2010 - 07 - 13<br><br>Is what I'm trying to do possible? It seems like it's at least recognizing that I'm trying to grab a date, but it's not taking the date format parameters that I want.<br>
<br clear="all"><br>-- <br>Thanks,<br>--Warren Selby<br><a href="http://www.selbytech.com">http://www.selbytech.com</a><br>
<div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>