On Monday May 9 2016 12:08:15 Lew Pitcher wrote:
> I have an IP04 embedded Linux/Asterisk 4port PBX (from Rowetel) that I've 
> been working with. Prior to this morning, I had Asterisk 1.4.4 installed
> on it, but it now (as of about an hour ago) has Asterisk 1.4.21 installed.
[snip]
> In Asterisk 1.4.4, the three ExecIfTime() application calls executed true 
> consistant with the local time, as expressed in the TZ envvar. That is to 
> say, at 11:00 EDT, the 1st ExecIfTime() would trigger true, and play back 
> the "Good Morning" message, while at 13:00 EDT, the 1st ExecIfTime would 
> trigger false, and the 2nd would trigger true, playing back the "Good 
> Afternoon" message.
> 
> Now, with no changes to system clock or TZ, and still exporting the TZ
> value prior to starting Asterisk, Asterisk 1.4.21 evaluates the first
> ExecIfTime false at 11:00 EDT, and the 2nd ExecIfTime true, and plays
> the "Good Afternoon" message. It appears that 1.4.21 is ignoring the
> timezone and using the system UTC clock.
> 
> I cannot find any config file options to correct this behaviour.
> 
> Can anyone suggest a way to (unobtrusively) get this version of Asterisk
> to  use the TZ envvar for ExecIfTime() evaluation? 

I fixed it.

Apparently, something changed between 1.4.4 and 1.4.21 that caused Asterisk 
to ignore the TZ envvar in favour of the (properly formatted) contents of 
the /etc/localtime file.

The IP04 doesn't come with a timezone package, and there was 
no /etc/localtime file on the device.

To fix the issue, I copied the /etc/localtime from my (EST5EDT) Slackware 
system, and restarted Asterisk. All is well now; the ExecIfTime() 
application now properly recognizes the local time and plays back the 
appropriate greeting.

-- 
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to