Syntax of teletone scripts.
0-9,a-d,*,# (standard DTMF tones)
c=x Sets the number of channels.
r=x Sets the sample rate.
d=x Sets the default tone duration in ms.
v=x Sets the default volume (-63.0dB to 0.0dB).
>=x Number of ms per interval for volume decrease.
<=x Number of ms per interval for volume increase.
+=x Number of dB to step per interval (used by '<' and '>').
w=x Default silence after each tone in ms.
l=x Number of times to repeat each tone in the script.
L=x Number of times to repeat the the whole script.
loops=x Like L, but doesn't pre-allocate a buffer for total duration, only one loop worth, then programmatically loops it (more mem efficient).
%=x A generic tone specified by a duration, a wait and a list of frequencies.
The values for '+' and 'v' may be decimal numbers.
Standard tones can have custom duration per use with the () modifier 7(1000, 500) to generate DTMF 7 for 1 second then pause .5 seconds.
ITU-T Recommendation Q.35 "Technical Characteristics of Tones for Telephone Service" defines many of these tones. They are provided here for your convenience, and because they make great examples. Additionally, RFC 2833 references ITU-T E.182 "Application of tones and recorded announcements in telephone services" for when to use certain tones in RTP. You may want to look at ITU-T Recommendation E.180 for different countries, what tones are used, etc.
UK Ring Tone [400+450 Hz on for 400ms off for 200ms then 400+450 Hz on for 400ms off for 2000ms]
US Ring Tone [440+480 Hz on for 2000ms off for 4000ms]
ITU E.182 Calling card service tone (AT&T BONG) [volume level -7DB, 941.0Hz +1477.0Hz (DTMF #) for 100ms with no wait. 350.0Hz+440.0Hz (US DIALTONE) for 1400ms with even decay of .1 dB over 2ms
Vacant Number Special Information Tone (SIT - The number you have dialed is not in service / disconnected) 913.8 Hz for 274 ms with no wait, 1370.6 Hz for 274 ms with no wait, 1776.7 Hz for 380ms with no wait
UK Special Information Tone (SIT - The number you have dialed is not in service) 950Hz for 330 ms with 15ms wait, 1400Hz for 330 ms with 15ms wait, 1800Hz for 330ms with 1s wait
ATTN TONE ("barking dog", means phone's off the hook!) 1400+2060+2450+2600 Hz for 100ms with 100ms wait
Caller Waiting Tone (aka SAS) 440Hz for 300ms repeated once after 10 seconds
Distinctive Ring/Call Waiting (indicates dialed number is greater than 7 digits in length) 440Hz on 100ms off 100ms on 100ms, repeated after 10 seconds
Busy Tone 480Hz + 620Hz 500ms on 500ms off
Reorder (in North America this is ITU E.182 Negative Indication Tone) 480Hz + 620Hz 250ms on 250ms pause
CAS Tone 2750Hz + 2130Hz for 80ms
3 burst stutter dial tone - 3 sequences of 350Hz+440Hz 100ms on 100ms off, then continuous dialtone (not included here, see below for dialtone)
Dial tone - continuous 350Hz + 440 Hz (this is 10 seconds when you should probably have digits dialed or go into a 'hang the phone up' tone)
AT&T Definity System 75/85 PABX Dial Tone - 250Hz + 400Hz continuous
CCITT 5 Seize sequence - 2600Hz + 2400Hz for 150ms with 150ms pause then 2400Hz for 150ms (timings can be different for different carriers)
CCITT 5 Seize sequence with 60Hz guard tone (used in some places, timings are carrier dependant and likely to be wrong for most carriers)
AU Congestion tone - with correct 10dB drop every second itteration - 420Hz for 375ms, then 375ms off, then 420Hz for 375ms 10dB down, then 375ms off.
Dialtone Deutsche Telekom Germany 425Hz (used for DISA, Callthru)
Australian ringback tone
Script and Dialplan Examples
Calling from the dialplan is extremely simple: <action application="playback" data="tone_stream://<TGML>"/>
In Lua scripts, use the [[Misc._Dialplan_Tools_playback|playback]] application with tone_stream:
addTone(digit name, frequency1, frequencyN, 0.0)
'digit name' is a character that will be used to identify this tone, like shorthand notation
frequencies are a null terminated list of all the component frequencies that make this tone
Example with TeleTone module:
Example with playback and tone_stream.
Perl is like Lua, just use the [[Misc._Dialplan_Tools_playback|playback]] application with tone_stream:
Worldwide Frequencies and Cadences Listed by ITU-T
Various tones used in national networks (According to ITU-T Recommendation E.180) Updated 1st May 2010.
This Is A Recording— A list of tones used around the world