Localization and Practical Security in Asterisk 1.4: Part 1

6 min read


Let’s work from the inside out. The types of call progress tones played to the callers once they are within Asterisk are set in indications.conf, which is, of course, one of the many .conf files to be found in the /etc/asterisk directory.

On opening indications.conf, you will find that the default set of tones to be used (by the pbx_indications module) is specified in the [general] section with a two letter country code.

The next example, shows the way the first few lines of the file look on a fresh installation, prior to any changes:

; indications.conf
; Configuration file for location specific tone indications
; used by the pbx_indications module.
; When adding countries to this file, please keep them in
; order according to the 2-character country codes!
; The [general] category is for certain global variables.
; All other categories are interpreted as location specific
[general]country=us ; default location

The highlighted code shows the country specified by the two letter country code. If indications.conf is missing, Asterisk will assume that you want to use the US tone set.

There are a number of separate sections in the files, each headed with a two letter country code in square brackets, which describe the actual tones for that country in terms of frequencies and cadences, along with the odd explanation or cryptic note left there by the compiler of the tones for a given country.

Here we see the entry for the UK:

[uk]description = United Kingdom
ringcadence = 400,200,400,2000
; These are the official tones taken from BT SIN350. The actual tones
; used by BT include some volume differences so sound slightly
; different from Asterisk-generated ones.
dial = 350+440
; Special dial is the intermittent dial tone heard when, for example,
; you have a divert active on the line
specialdial = 350+440/750,440/750
; Busy is also called "Engaged"
busy = 400/375,0/375
; "Congestion" is the Beep-bip engaged tone
congestion = 400/400,0/350,400/225,0/525
; "Special Congestion" is not used by BT very often if at all
specialcongestion = 400/200,1004/300
unobtainable = 400
ring = 400+450/400,0/200,400+450/400,0/2000
callwaiting = 400/100,0/4000
; BT seem to use "Special Call Waiting" rather than just "Call
Waiting" tones
specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000
; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT
; claim it
; is and I've not used a payphone for years)
creditexpired = 400/125,0/125
; These two are used to confirm/reject service requests on exchanges
; that don't do voice announcements.
confirm = 1400
switching = 400/200,0/400,400/2000,0/400
; This is the three rising tones Doo-dah-dee "Special Information
; Tone",
; usually followed by the BT woman saying an appropriate message.
info = 950/330,0/15,1400/330,0/15,1800/330,0/1000
; Not listed in SIN350
record = 1400/500,0/60000
stutter = 350+440/750,440/750

So, once you have chosen your country by changing (if necessary) the two letter country code, you just need to save the file and reload.

You will now hear those tones when a call is being handled inside Asterisk. The word “inside” has been stressed as all calls are initiated outside of Asterisk, and will come in from SIP, IAX2, or analog phones, or trunks of one description or another. The nature of the tones you hear through these devices is not the responsibility of Asterisk, although Asterisk will dictate the type (busy, ringing, and so on) that you hear. Therefore, now we need to step outside of Asterisk and deal with those tones.

SIP and IAX phones are easy to deal with, as these devices generate the tones themselves. So, when you lift the handset on say, an SIP phone, you will hear a dial tone whether the device is connected to an IP telephony network or not.

Contrast this scenario to the original reason for the dial tone. The clue is in the name “dial tone”. It was originally a “confidence tone” to signal to the users that they were indeed connected to a telephone exchange, and that they could now dial a number. Of course, this is still the case with traditional telephony connections. How things changed in the world of IP—all a dial tone in the earpiece of an IP phone will tell you is that your IP phone is alive, and the curly cord to the handset works.

In order to change the nature of the tones you hear from your SIP or IAX phones, you will need to change parameters on the phones themselves, usually, via their web interfaces. Asterisk only tells these telephones which tones to play (through the protocol being used for call control). It is on the phones themselves that you will need to change the tones.

We have now seen how to change the tones that Asterisk provides to calls which it is terminating, and we have seen that the tones heard through SIP and IAX phones (prior to the call being terminated by Asterisk) must be changed on the devices themselves.

Let us now consider the tones that will be used (both recognized and generated) for analog telephony. If analog devices are connected through ATAs (Analog Telephony Adaptor), then the tones will again be changed on the ATA devices themselves, as tone generation and recognition is part of their job.

However, if we connect our analog devices to Asterisk through a Digium card, we will need to configure these tones as part of the DAHDI (formerly Zaptel) setup.

In the /etc/dahdi/ directory a file called system.conf (formerly etc/zaptel.conf) will be found with the code:


We are interested in two parts of the configuration in this file—loadzone that loads a set of tones to be used with the analog card(s), you can load as many sets as you want (details of the actual tones are found in zonedata.c), and, defaultzone that defines the tone set you will use as standard when handling calls.

Remember, we are only talking about the tones that will be recognized or generated on analog channels here.

If you want to employ some tones which are loaded, but not default, this is easily done within the dialplan using the Playtones() application.

That was about the tones. Here is a quick list and a picture to help you remember:

  • Tones that will be heard once a call is inside Asterisk are chosen and specified in indications.conf
  • Tones heard on SIP or IAX phones (prior to the call being answered by Asterisk) are set on the devices themselves

Take a look at the next figure to reinforce this:


Time and date and localization

Although the actual system time and date for your Asterisk machine will only be affected by the setting in Linux, it is quite possible to make Asterisk aware of as many time zones as necessary, and to alter the way time and date are set out and spoken within Asterisk.

When you think about the need to manifest different time zones and spoken localization (other than the language itself—we’ll come to that), it really occurs only in voicemail transactions.

When you are being told at what time and on which date a message was left, you will want to hear it in your local time zone, regardless of where the Asterisk server is located. Moreover, you will want to hear the time and date spoken in a way that you naturally understand, rather than having to struggle to interpret the information while it is given to you in some alien form.

Fortunately, Asterisk recognizes this fact and allows different “voicemail zones” to be set, which dictate the time zone and the way in which the time and date are announced. These settings are created in the [zonemessages] section of voicemail.conf, and further down the file, the voicemail zone for each voicemail box can be specified as an option (if required) where voicemail boxes are specified.


Please enter your comment!
Please enter your name here