text
stringlengths
0
152
|
157
do not want Asterisk to waste time looking for caller ID information if it is not being
presented on the line.
Again, Asterisk defaults to the North American caller ID format (no entries in /etc/
asterisk/chan_dahdi.conf describe this, it’s just the default), and in order to change it
we will need to make some entries that describe the technical details of the caller ID
system. In the case of the UK, the delivery of caller ID information is signaled by a
polarity reversal on the telephone line (in other words, the A and B legs of the pair of
telephone wires are temporarily switched over), and the actual caller ID information
is delivered in a format known as V.23 (frequency shift keying, or FSK). So the entries
in chan_dahdi.conf to receive UK-style caller ID on any FXO interfaces will look like
this:
cidstart=polarity ; the delivery of caller ID will be
; signaled by a polarity reversal
cidsignalling=v23 ; the delivery of the called ID information
; will be in V23 format
Of course, you may also need to send caller ID using the same local signaling infor‐
mation to any analog phones that are connected to FXS interfaces, and one more
entry may be needed, as in some locations the caller ID information is sent after a
specified number of rings. If this is the case, you can use this entry:
sendcalleridafter=2
Before you can make these entries, you will need to establish the details of your local
caller ID system (someone from your local telco or Google could be your friend here,
but there is also some good information in the sample /etc/asterisk/chan_dahdi.conf
file).
Language and/or Accent of Prompts
As you may know, the prompts (or recordings) that Asterisk will use are stored
in /var/lib/asterisk/sounds. In older versions of Asterisk all the sounds were in this
actual directory, but these days you will find a number of subdirectories that allow the
use of different languages or accents. The names of these subdirectories are arbitrary;
you can call them whatever you want.
Note that the filenames in these directories must be what Asterisk is expecting—
for example, in /var/lib/asterisk/sound/en, the file hello.gsm would contain the
word “Hello” (spoken by the lovely Allison), whereas hello.gsm in /var/lib/asterisk/
sounds/es (for Spanish in this case) would contain the word “Hola” (spoken by the
Spanish equivalent of the lovely Allison2).
2 Who is, in fact, the same Allison who does the English prompts; June Wallack does the French prompts. The
male Australian-accented prompts are done by Cameron Twomey. All voiceover talent are available to record
additional prompts as well. See the Digium IVR page for more information.
158
|
Chapter 9: Internationalization
The default directory used is /var/lib/asterisk/sounds/en, so how do you change that?
There are two ways. One is to set the language in the channel configuration file that
calls are arriving through using the language directive. For example, the line:
language=en_UK
placed in chan_dahdi.conf, sip.conf, and so on (to apply generally, or for just a given
channel or profile) will tell Asterisk to use sound files found in /var/lib/asterisk/
sounds/en_UK (which could contain British-accented prompts) for all calls that come
in through those channels.
The other way is to change the language during a phone call through the dialplan.
This (along with many attributes of an individual call) can be set using the CHANNEL()
dialplan function. See Chapter 10 for a full treatment of dialplan functions.
The following example would allow the caller to choose one of three languages in
which to continue the call:
; gives the choice of (1) French, (2) Spanish, or (3) German
exten => s,1,Background(choose-language)
same => n,WaitExten(5)
exten => 1,1,Set(CHANNEL(language)=fr)
exten => 2,1,Set(CHANNEL(language)=es)
exten => 3,1,Set(CHANNEL(language)=de)
; the next priority for extensions 1, 2, or 3 would be handled here
exten => _[123],n,Goto(menu,s,1)
If the caller pressed 1, sounds would be played from /var/lib/asterisk/sounds/fr; if he
pressed 2, the sounds would come from /var/lib/asterisk/sounds/es; and so on.
As already mentioned, the names of these directories are arbitrary and do not need to
be only two characters long—the main thing is that you match the name of the sub‐
directory you have created in the language directive in the channel configuration, or
when you set the CHANNEL(language) argument in the dialplan.
Time/Date Stamps and Pronunciation
Asterisk uses the Linux system time from the host server, as you would expect, but we
may have users of the system who are in different time zones, or even in different