David Duffett
UK
TeleSpeak
8th Conference - ElastixWorld 2011
Making asterisk feel like home outside north america
Haciendo sentir a Asterisk como en casa fuera de Norte América
2. Agenda
• What might we want to change?
• Where can we change it?
• How can we change it?
• But first, a quick test...
3. A bit about me...
• Chartered Engineer
• Telecoms for the last 20+ years...
• A firm belief that Telecoms is fun
• Background in Civil Aviation air-ground comms,
Wireless Local Loop, Computer Telephony
• Qualified trainer
• dCAP qualified Asterisk specialist
• Contributed the ‗Internationalization‘ chapter (9) to
Asterisk: The Definitive Guide
4. A bit about TeleSpeak...
• Founded in 2006
• Located close to Oxford, UK
• Whole business is focussed around Asterisk
– Elastix Training Partner
– Digium Authorised Training Partner
– Xorcom certified Distributor/Support Specialist
• Permanent Asterisk Training Facility
– Consultancy
– Support
6. What might we need
to change?
• System prompts • Telephony interfaces
– (language, accent) – (physical and
• Caller ID electrical)
– (reception and • Times and dates
transmission) – (not only the actual
• Tones time zone, but the way
times and dates are
– (generation and read out)
recognition)
9. Where do we change
those tones?
• Tones – IP channels (SIP phones, ATAs)
– On the device!!
• Tones – analogue channels
– /etc/dahdi/system.conf
• loadzone = uk
• defaultzone = uk
• Tones – internal calls
– /etc/asterisk/indications.conf
• country = uk
10. The Linux file system
/ bin The /etc/asterisk directory is created
boot when Asterisk is installed
dev
etc asterisk
home extensions.conf
lib
lost+found indications.conf
media dahdi** sip.conf
misc chan_dahdi.conf
mnt
Where
net **system.conf lives in the /etc/dahdi
directory as it is not part of Asterisk
opt
proc This is the home directory of the ‘root’
exactly?
user – if you are logged in as ‘root’ and
root (~) start a terminal from the graphical
selinux environement, you will start in this directory
srv
The /usr/src directory is where we put the
sys LibPRI, Zaptel and Asterisk tarballs
tmp
usr
var src asterisk-1.6.x.x.tar.gz
asterisk-1.6.x.x
dahdi-linux-2.x.x.tar.gz
dahdi-linux-2.x.x
dahdi-tools-2.x.x.tar.gz
dahdi-tools...
libpri-1.x.x, dahdi-xxxx-2.x.x and Asterisk-1.x.x
subdirectories will be created in /usr/src
when we ‘untar’ the tarballs
11. Time and date localisation
• Actual time and date for the system is set
in Linux
• Asterisk can be made aware of many time
zones
– These zones can be used to change the way
times and dates are presented, and even
spoken
12. Where can you change
times and dates?
• When would you need to do this?
• It mainly comes down to voicemail!!!
– Accordingly, configuration occurs in
/etc/asterisk/voicemail.conf
– The [zonemessages] section is where the
timezone, time and date presentation and
pronounciation are set
– The voicemail context (e.g. [default]) is where
each mailbox is assigned a zone, if required
13. Where can you change
times and dates?
/etc/asterisk/voicemail.conf
[zonemessages]
central=America/Chicago|'vm-received' Q 'digits/at' IMp
UK=Europe/London|'vm-received' a b d 'digits/at' HM
[default]
809=>1234,David Duffett,dd@xyz.com,,tz=UK
810=>0000,Mark Spencer,markster@digium.com,,tz=central
14. Changing the language (or
accent) of system prompts
• By default Asterisk stores system prompts
(sound files) in /var/lib/asterisk/sounds
• Within this directory sub-directories are
used for the storage of differing prompts
15. Changing the language (or
accent) of system prompts
• E.g.
– /var/lib/asterisk/sounds/en/ for English
– /var/lib/asterisk/sounds/es/ for Spanish
• Filenames need to be known to Asterisk
– E.g. hello.gsm would contain
• ―hello‖ in /var/lib/asterisk/sounds/en/hello.gsm
• ―hola‖ in /var/lib/asterisk/sounds/es/hello.gsm
16. So where do you specify
the language?
• In the channel...
• So for SIP, it would be in sip.conf (or
sip_xxxxxxx.conf
• For IAX2, it would be in iax.conf
• For analogue or digital channels
(connected by a Digium card) it would be
in chan_dahdi.conf or dahdi-channels.conf
• Or in the dialplan
17. Specifying the language
in the Channel
/etc/asterisk/sip.conf
[general]
language=es
context=custom-internal
deny=0.0.0.0/0
[dd-phone]
type=friend
language=fr
/etc/asterisk/extensions_custom.conf (the dialplan)
[custom-internal]
exten => _6001,1,Playback(hello)
18. Specifying the language
in the Dialplan
/etc/asterisk/extensions_custom.conf (the dialplan)
[custom-internal]
exten => _6001,1,Playback(hello)
[language-menu]
exten => s,1,Background(choose_language)
; 1 for French, 2 for German, 3 for Spanish
exten => s,n,WaitExten(5)
exten => 1,1,Set(CHANNEL(language)=fr)
exten => 2,1,Set(CHANNEL(language)=de)
exten => 3,1,Set(CHANNEL(language)=es)
exten => _[1-3],n,Goto(custom-internal,6001,1)
19. What about Caller ID?
• Many different formats around the world
• In the UK we use V23 (FSK)
• Asterisk can be made to understand
different types of Caller ID signalling
• ...and to send it to analogue phones too!
20. Setting the Caller ID format
/etc/asterisk/chan_dahdi.conf or dahdi-channels.conf
group=1
signalling=fxo_ks
cidsignalling=v23 ;BT standard
cidstart=polarity ;start indication
sendcalleridafter=2 ;the number
; of rings before sending the data
context=from-analogue
channel => 1-4
group=2
signalling=fxs_ks
callerid=asreceived
context=from-outside
channel => 5-8
21. Telephony Interfaces
• Physical characteristics
• Electrical characteristics
– UK uses 50V DC to power phones
– UK uses 75v ac @ 75Hz to ring phones
30. PRI connectorisation
• What is the impedance of the line?
– Europe 120 ohm, North America 100 ohm commonly
• Typically RJ45 connectors
– Might be 75 ohm
• Typically BNC connectors
31. We all need approval
• To connect equipment to the national PSTN, approval is often
required
• Digium hardware is approved in many countries
• If connecting to a internal PABX, approval is not required
33. Recap
• What might we want to change?
– Language or accent of prompts, time zone
– Tones, telephony interfaces
• Where can we change it?
– Asterisk, DAHDI, or individual devices
• How can we change it?
– Configuration files in Asterisk or DAHDI
– Web interface (or provisioning) for
IP phones and ATAs
34. http://ofps.oreilly.com/titles/9780596517342/
Table 9.1. Internationalization cheat sheet
What to change Where to change it
•IP phones—on the phone itself
Call progress tones •ATAs—on the ATA itself
•Analog phones—DAHDI (/etc/dahdi/system.conf)
DAHDI—/etc/dahdi/system.conf and
Type of PRI/BRI and protocol
/etc/asterisk/chan_dahdi.conf
•Balun if required for PRI
Physical PSTN connections •Get the analog pair to middle 2 pins of the RJ11
connecting to the Digium card
Caller ID on analog circuits Asterisk—/etc/asterisk/chan_dahdi.conf
•Channel—/etc/asterisk/sip.conf,
/etc/asterisk/iax.conf,
Prompt language and/or accent
/etc/asterisk/chan_dahdi.conf, etc.
•Dialplan—CHANNEL(language) function
Voicemail time/date stamps and pronunciation Asterisk—/etc/asterisk/voicemail.conf
Asterisk—/etc/asterisk/indications.conf
Tones delivered by Asterisk