text stringlengths 0 152 |
|---|
countries. Voicemail is where the rubber hits the road, as this is where users come |
into contact with time/date stamp information. |
Consider a scenario where some users of the system are based in the US, while others |
are in the UK. |
Internationalization Within Asterisk |
| |
159 |
As well as the time difference, another thing to consider is the way people in the two |
locations are used to hearing date and time information—in the US, dates are usually |
ordered month, day, year, and times are specified in 12-hour clock format (e.g., |
2:54 P.M.). |
In contrast, in the UK dates are ordered day, month, year, and times are often speci‐ |
fied in 24-hour clock format (14:54 hrs)—although some people in the UK prefer 12- |
hour clock format, so we will cover that, too. |
Since all these things are connected to voicemail, you would be right to guess that we |
configure it in /etc/asterisk/voicemail.conf—specifically, in the [zonemessages] sec‐ |
tion of the file. |
Here is the [zonemessages] part of the sample voicemail.conf file that comes with |
Asterisk, with UK24 (for UK people that like 24-hour clock format times) and UK12 |
(for UK people that prefer 12-hour clock format) zones added: |
[zonemessages] |
; Users may be located in different time zones, or may have different |
; message announcements for their introductory message when they enter |
; the voicemail system. Set the message and the time zone each user |
; hears here. Set the user into one of these zones with the tz=attribute |
; in the options field of the mailbox. Of course, language substitution |
; still applies here so you may have several directory trees that have |
; alternate language choices. |
; |
; Look in /usr/share/zoneinfo/ for names of timezones. |
; Look at the manual page for strftime for a quick tutorial on how the |
; variable substitution is done on the values below. |
; |
; Supported values: |
; 'filename' filename of a soundfile (single ticks around the filename |
; required) |
; ${VAR} variable substitution |
; A or a Day of week (Saturday, Sunday, ...) |
; B or b or h Month name (January, February, ...) |
; d or e numeric day of month (first, second, ... thirty-first) |
; Y Year |
; I or l Hour, 12 hour clock |
; H Hour, 24 hour clock (single digit hours preceded by "oh") |
; k Hour, 24 hour clock (single digit hours NOT preceded by "oh") |
; M Minute, with 00 pronounced as "o'clock" |
; N Minute, with 00 pronounced as "hundred" (US military time) |
; P or p AM or PM |
; Q "today", "yesterday" or ABdY |
; (*note: not standard strftime value) |
; q " (for today), "yesterday", weekday, or ABdY |
; (*note: not standard strftime value) |
; R 24 hour time, including minute |
; |
eastern=America/New_York|'vm-received' Q 'digits/at' IMp |
central=America/Chicago|'vm-received' Q 'digits/at' IMp |
central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' |
military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' |
european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM |
160 |
| |
Chapter 9: Internationalization |
UK24=Europe/London|'vm-received' q 'digits/at' H N 'hours' |
UK12=Europe/London|'vm-received' Q 'digits/at' IMp |
These zones not only specify a time, but also dictate the way times and dates are |
ordered and read out. |
Having created these zones, we can go to the voicemail context part of voicemail.conf |
to associate the appropriate mailboxes with the correct zones: |
[default] |
4001 => 1234,Russell Bryant,rb@shifteight.org,,|tz=central |
4002 => 4444,David Duffett,dd@shifteight.org,,|tz=UK24 |
4003 => 4450,Mary Poppins,mp@shifteight.org,,|tz=UK12|attach=yes |
As you can see, when we declare a mailbox, we also (optionally) associate it with a |
particular zone. Full details on voicemail can be found in Chapter 8. |
The last thing to localize in our Asterisk configuration is the tones played to callers by |
Asterisk once they are inside the system (e.g., the tones a caller hears during a |
transfer). |
As identified earlier in this chapter, the initial tones that people hear when they are |
calling into the system will come from the IP phone, or from DAHDI for analog |
channels. |
These tones are set in /etc/asterisk/indications.conf. Here is a part of the sample file, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.