TGML
From FreeSWITCH Wiki
Syntax of teletone scripts
LEGEND
The syntax for the decay and volume is only valid with FreeSWITCH svn version 5274 or greater. The old syntax has been removed.
0-9,a-d,*,# (standard dtmf tones)
variables: c,r,d,v,>,<,+,w,l,L,%
- c (channels) - Sets the number of channels.
- r (rate) - Sets the sample rate.
- d (duration) - Sets the default tone duration.
- v (volume) - Sets the default volume (-63.0dB to 0.0dB).
- > (decrease vol ms) - Number of ms per interval for volume decrease.
- < (increase vol ms) - Number of ms per interval for volume increase.
- + (step dB) - number of dB to step per interval (used by '<' and '>').
- w (wait) - default silence after each tone.
- l (loops) - number of times to repeat each tone in the script.
- L (LOOPS) - number of times to repeat the the whole script.
- % (manual tone) - 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
EXAMPLES
ITU-T Recommendation Q.35 "Technical Characteristics of Tones for Telephone Service" defines many of these tones. They are provided here for your convienience, 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 http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 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 2200ms]
%(400,200,400,450);%(400,2200,400,450)
US Ring Tone [440+480 hz on for 2000ms off for 4000ms]
%(2000,4000,440,480)
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
v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440)
Vacant Number Special Information Tone (SIT - The number you have dialed is not in service) 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
%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)
ATTN TONE (phone's off the hook!) 1400+2060+2450+2600 hz for 100ms with 100ms wait
%(100,100,1400,2060,2450,2600)
Caller Waiting Tone (aka SAS) 440Hz for 300ms repeated once after 10 seconds
%(300,10000,440);L(2)
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
%(100,100,440);%(100,0,440)
Busy Tone 480Hz + 620Hz 500ms on 500ms off
%(500,500,480,620)
Reorder (in North America this is ITU E.182 Negative Indication Tone) 480Hz + 620Hz 250ms on 250ms pause
%(250,250,480,620)
CAS Tone 2750Hz + 2130Hz for 80ms
%(80,0,2750,2130)
3 burst stutter dial tone - 3 sequences of 350Hz+440Hz 100ms on 100ms off, then continous dialtone (not included here, see below for dialtone)
%(100,100,350,440);L(3)
Dial tone - continous 350Hz + 440 Hz (this is 10 seconds when you should probably have digits dialed or go into a 'hang the phone up' tone)
%(10000,0,350,440)
AT&T Definity System 75/85 PABX Dial Tone - 250Hz + 400Hz continous
%(10000,0,250,400)
CCITT 5 Seize sequence - 2600Hz + 2400Hz for 150ms with 150ms pause then 2400Hz for 150ms (timings can be different for different carriers)
%(150,150,2600,2400);%(150,0,2400)
CCITT 5 Seize sequence with 60Hz guard tone (used in some places, timings are carrier dependant and likely to be wrong for most carriers)
%(150,150,2600,2400,60);%(150,0,2400)
AU Congestion tone - with correct 10dB drop every second itteration - 420Hz for 375mz, then 375ms off, then 420Hz for 375ms 10dB down, then 375ms off.
v=-13;%(375,375,420);v=-23;%(375,375,420)
