System information

Hacking indications.conf for Fun and Profit
If you have too much time on your hands, you can do all sorts of pointless but enter-
taining things with your indications. For example, fans of Star Wars can make the
following change to the end of their indications.conf files:
[starwars](us)
description = Star Wars Theme Song
ring = 262/400,392/500,0/100,349/400,330/400,294/400,524/400,392/500,0/100,349/400, \
330/400,294/400,524/400,392/500,0/100,349/400,330/400,349/400,294/500,0/2000
If you then use the country named 'starwars' in your configuration files or dialplan, any
ringing you pass back will sound quite different from the standard ring you are used
to. Try the following dialplan code to test out your new ringing sound:
exten => 500,1,Answer()
same => n,Set(CHANNEL(tonezone)=starwars)
same => n,Dial(SIP/0000FFFF0002) ; or whatever your channel is named in sip.conf
Depending on the type of device used to call into this example, you
may wonder if it will actually work. SIP phones, for example, typi-
cally generate their own tones instead of having Asterisk generate
them. This example was carefully crafted to ensure that Asterisk will
generate a ringback tone to the caller. The key is the Answer() that is
executed first. Later, when an outbound call is made to another de-
vice, the only method Asterisk has available to pass back a ringing
indication to the caller is by generating inband audio, since as far as
the caller’s phone is concerned, this call has already been answered.
While Asterisk will run without an indications.conf file, it is strongly recommended that
you include one: copy the sample over from /usr/src/asterisk-complete/1.8/configs/indi-
cations.conf.sample, modify the country parameter in the [general] section to match
your region, and restart Asterisk.
chan_dahdi Ignores indications.conf
DAHDI does not use the indications.conf file from Asterisk, but rather has the tones
compiled in. For more information, see Chapter 7.
If your system supports multiple countries (for example, if you have a centralized
Asterisk system that has users from different regions), you may not be able to simply
define the default country. In this case, you have a couple of options:
1. Define the country in the channel definition file for the user.
2. Define the country in the dialplan using the CHANNEL(tonezone) function.
78 | Chapter 4:Initial Configuration Tasks