Lonnie Abelbeck wrote:
> Hi,
>
> I got the UNIX shell (ie logs) and asterisk voicemail to work with
> timezones. I don't have any new revelations, just putting together the
> pieces from others here.
>
> FYI, I am using a Soekris with a three partition CF; /, /mnt/opt, and
> /mnt/kd .
>
> Key points:
> 1) The zoneinfo database from 0.3.0 ( /mnt/opt/zoneinfo ) works fine
> with asterisk in 0.4.2, just file data structures, no library code.
>
> 2) We need a new rc.conf variable, say TIMEZONE_TZ to set the unique
> uClibc timezone data. Someday an automatic method of
> generating TIMEZONE_TZ from TIMEZONE would be good... but until then the
> user can just set it.
>
> This is what I did:
>
> 1) Create a zoneinfo directory in /mnt/opt/. Copy as many entries
> (Country/City) as you need from /mnt/opt/ of 0.3.0.
>
> The files can be found here: (remember they are binary files when moving
> them)
> http://www.krisk.org/files/astlinux-opt/zoneinfo/
>
> 2) Create a symbolic link from /usr/share/zoneinfo to /mnt/opt/zoneinfo
>
> ln -s /mnt/opt/zoneinfo /usr/share/zoneinfo
>
> 3) Add a new TIMEZONE_TZ variable to rc.conf
>
> ##Timezone
> ##You need ast-opt for the additional timezones.
> ##If you define this variable, AstLinux will copy this file from
> ##/mnt/opt/zoneinfo/$TIMEZONE to /tmp/etc/localtime on startup
> ## Until TIMEZONE_TZ is generated from TIMEZONE we have to do it by hand
> ##GMT (UTC) is the default
> TIMEZONE=America/Chicago
> TIMEZONE_TZ=CST6CDT
>
> 4) Change /etc/rc, the timezone section should look like this
>
> if [ -f /mnt/kd/TZ ]
> then
> cp /mnt/kd/TZ /tmp/etc/TZ
> fi
>
> if [ "$TIMEZONE_TZ" ]
> then
> echo "$TIMEZONE_TZ" > /tmp/etc/TZ
> fi
>
> if [ "$TIMEZONE" ]
> then
> cp /mnt/opt/zoneinfo/$TIMEZONE /tmp/etc/localtime
> fi
>
> 5) Configure your voicemail.conf with a "tz=" and [zonemessages] entries.
>
> 6) reboot
>
> That is all there is to it.
> If this looks good to Darrick and Kristian they can add it.
>
> Lonnie
>
Lonnie,
Wow. I can honestly say that I never thought of this... Awesome! How
about this:
1) Add zoneinfo files from AstLinux 0.3 into /usr/share/zoneinfo (for
now). Eventually I would like to add a "build glibc zoneinfo" target
for the AstLinux devel environment. Shouldn't be too hard...
2) Fix the TIMEZONE bug that you found.
I don't see why we need the TIMEZONE_TZ variable. Usually apps use the
C library (uclibc in this case) to return the local time and date with
the proper offset to the current timezone. uClibc can do this.
Asterisk is different in that it has to support multiple timezones
(sometimes PER mailbox) in voicemail.conf. It reads /usr/share/zoneinfo
directly for this. You shouldn't need to set anything else up in the
rest of the system/Asterisk for this to work.
Really though, thanks a lot for this. Great work!
--
Kristian Kielhofner
_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users
Donations to support AstLinux are graciously accepted via PayPal to [EMAIL
PROTECTED]