Tonegen
The Tone Generator module is used to generate tones like dial, busy.
Contents |
Tone Generator options
The options are:
- dial - ITU dial tone
- busy - ITU busy tone
- ring - ITU ring tone
- specdial - typically used for secondary dialtones
- congestion - no more channels available, network busy
- outoforder - broken line (ITU, not three tones)
- milliwatt - the stardard tone for test, 1mW @ 1kHz
- silence - as the name says
- noise - low level white noise, usable as comfort noise
How to use tone generator
Routing
In a routing module to use one of these tones, you can use something like : tone/dial.
A standard line for regexroute.conf will look like:
^1$=tone/dial
That means when someone is calling extension 1 tonegen will generate a dial tone.
Override data source
The tone generator can also be used as an override data source. Extra tones are available in this mode:
dtmf/X - single tone, X must be 0..9, *, # or a..d dtmfstr/XXXXX - an entire sequence of DTMF tones AAAA - a 1 second sine tone of frequency AAAA (number) AAAA+BBBB - a 1 second sum of two sine tones AAAA*BB - 1 second tone of AAAA modulated by BB
Configuration file
The configuration file is tonegen.conf and may be used to set things like the language (e.g. country code) for the various types of tone. For example lang=us means a us (north american) dialtone will be used for tone/dial instead of itu.
; This file configures the tone generator ; If not explicitly specified, all parameters are processed at startup only (no reload) ; Each section, except for 'general' configures a lang list ; ; Here is an example of lang list ; ;[example] ; ; alias: string: Comma separated list of tone languages sharing the same tones ; This parameter is ignored in 'itu' section ; Subsequent sections may override tones specified for aliases ;alias= ; ; All other parameters must have the format ; name=tone[,tone] ; Each tone must be specified in the format [!]freq[/duration] ; !: Don't repeat this tone (play it on first pass only) ; freq: Tone frequency ; f: This is the frequency used to build the tone ; f1+f2: The frequency is a mixture of f1 and f2 ; f1*f2: The frequency f1 is modulated by f2 ; Frequency can be 0 for silence ; duration: Tone duration in milliseconds. Defaults to 1000 if missing or invalid ; Note: if all tones start with '!' (not repeated) playing will stop after the ; last tone in the list ; ; ; The algorithm used to play a requested tone is the following: ; 1. If a language is specified in the call.execute or chan.attach message, ; find the tone using the specified language ; 2. Find the tone using the configured language if any ; 3. Find the tone using the default ('itu') ; If 'itu' language is specified in the handled message the tone is searched in ; the default list only: any configured language is ignored [general] ; lang: string: Default tones language ; This is the name of the section containing the tones to play if no language ; is specified in processed messages or the tone is not found for the specified ; language section ;lang= [itu] ; This section configures the default tones to play ; The following tones are pre-generated: dial,busy,ring,specdial,congestion, ; outoforder,info,milliwatt,silence,noise,probe/0,probe/1,probe/2,cotv,cots [at] ; Austria dial=420 busy=420/400,0/400 ring=420/1000,0/5000 congestion=420/200,0/200 callwaiting=420/40,0/1960 dialrecall=420 record=1400/80,0/14920 info=950/330,1450/330,1850/330,0/1000 stutter=380+420 [au] ; Australia dial=413+438 busy=425/375,0/375 ring=413+438/400,0/200,413+438/400,0/2000 congestion=425/375,0/375,420/375,0/375 callwaiting=425/200,0/200,425/200,0/4400 dialrecall=413+438 record=!425/1000,!0/15000,425/360,0/15000 info=425/2500,0/500 std=!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100 facility=425 stutter=413+438/100,0/40 ringmobile=400+450/400,0/200,400+450/400,0/2000 [bg] ; Bulgaria dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/250,0/250 callwaiting=425/150,0/150,425/150,0/4000 dialrecall=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 record=1400/425,0/15000 info=950/330,1400/330,1800/330,0/1000 stutter=425/1500,0/100 [br] ; Brazil dial=425 busy=425/250,0/250 ring=425/1000,0/4000 congestion=425/250,0/250,425/750,0/250 callwaiting=425/50,0/1000 dialrecall=350+440 record=425/250,0/250 info=950/330,1400/330,1800/330 stutter=350+440 [be] ; Belgium dial=425 busy=425/500,0/500 ring=425/1000,0/3000 congestion=425/167,0/167 callwaiting=1400/175,0/175,1400/175,0/3500 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440" record=1400/500,0/15000 info=900/330,1400/330,1800/330,0/1000 stutter=425/1000,0/250 [ch] ; Switzerland dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=425/200,0/200,425/200,0/4000 dialrecall=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 record=1400/80,0/15000 info=950/330,1400/330,1800/330,0/1000 stutter=425+340/1100,0/1100 [cl] ; Chile dial=400 busy=400/500,0/500 ring=400/1000,0/3000 congestion=400/200,0/200 callwaiting=400/250,0/8750 dialrecall=!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 record=1400/500,0/15000 info=950/333,1400/333,1800/333,0/1000 stutter=!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 [cn] ; China dial=450 busy=450/350,0/350 ring=450/1000,0/4000 congestion=450/700,0/700 callwaiting=450/400,0/4000 dialrecall=450 record=950/400,0/10000 info=450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400 stutter=450+425 [cz] ; Czech Republic dial=425/330,0/330,425/660,0/660 busy=425/330,0/330 ring=425/1000,0/4000 congestion=425/165,0/165 callwaiting=425/330,0/9000 dialrecall=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660 record=1400/500,0/14000 info=950/330,0/30,1400/330,0/30,1800/330,0/1000 stutter=425/450,0/50 [de] ; Germany dial=425 busy=425/480,0/480 ring=425/1000,0/4000 congestion=425/240,0/240 callwaiting=!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0 dialrecall=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 record=1400/80,0/15000 info=950/330,1400/330,1800/330,0/1000 stutter=425+400 [dk] ; Denmark dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=!425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0 dialrecall=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 record=1400/80,0/15000 info=950/330,1400/330,1800/330,0/1000 stutter=425/450,0/50 [ee] ; Estonia dial=425 busy=425/300,0/300 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=950/650,0/325,950/325,0/30,1400/1300,0/2600 dialrecall=425/650,0/25 record=1400/500,0/15000 info=950/650,0/325,950/325,0/30,1400/1300,0/2600 stutter=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 [es] ; Spain dial=425 busy=425/200,0/200 ring=425/1500,0/3000 congestion=425/200,0/200,425/200,0/200,425/200,0/600 callwaiting=425/175,0/175,425/175,0/3500 dialrecall=!425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425 record=1400/500,0/15000 info=950/330,0/1000 dialout=500 [fi] ; Finland dial=425 busy=425/300,0/300 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=425/150,0/150,425/150,0/8000 dialrecall=425/650,0/25 record=1400/500,0/15000 info=950/650,0/325,950/325,0/30,1400/1300,0/2600 stutter=425/650,0/25 [fr] ; France dial=440 busy=440/500,0/500 ring=440/1500,0/3500 congestion=440/250,0/250 callwait=440/300,0/10000 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330 stutter=!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440 [gr] ; Greece dial=425/200,0/300,425/700,0/800 busy=425/300,0/300 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=425/150,0/150,425/150,0/8000 dialrecall=425/650,0/25 record=1400/400,0/15000 info=!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 stutter=425/650,0/25 [hu] ; Hungary dial=425 busy=425/300,0/300 ring=425/1250,0/3750 congestion=425/300,0/300 callwaiting=425/40,0/1960 dialrecall=425+450 record=1400/400,0/15000 info=!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 stutter=350+375+400 [il] ; Israel dial=414 busy=414/500,0/500 ring=414/1000,0/3000 congestion=414/250,0/250 callwaiting=414/100,0/100,414/100,0/100,414/600,0/3000 dialrecall=!414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414 record=1400/500,0/15000 info=1000/330,1400/330,1800/330,0/1000 stutter=!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414 [in] ; India dial=400*25 busy=400/750,0/750 ring=400*25/400,0/200,400*25/400,0/2000 congestion=400/250,0/250 callwaiting=400/200,0/100,400/200,0/7500 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,0/1000 stutter=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 [it] ; Italy dial=425/200,0/200,425/600,0/1000 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=425/400,0/100,425/250,0/100,425/150,0/14000 dialrecall=470/400,425/400 record=1400/400,0/15000 info=!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 stutter=470/400,425/400 [lt] ; Lithuania dial=425 busy=425/350,0/350 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=425/150,0/150,425/150,0/4000 dialrecall=425/500,0/50 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 stutter=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 [jp] ; Japan dial=400 busy=400/500,0/500 ring=400+15/1000,0/2000 congestion=400/500,0/500 callwaiting=400+16/500,0/8000 dialrecall=!400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,0 stutter=!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 [mx] ; Mexico dial=425 busy=425/250,0/250 ring=425/1000,0/4000 congestion=425/250,0/250 callwaiting=425/200,0/600,425/200,0/10000 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 record=1400/500,0/15000 info=950/330,0/30,1400/330,0/30,1800/330,0/1000 stutter=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 [my] ; Malaysia dial=425 busy=425/500,0/500 ring=425/400,0/200 congestion=425/500,0/500 [nl] ; Netherlands dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/250,0/250 callwaiting=425/500,0/9500 dialrecall=425/500,0/50 record=1400/500,0/15000 info=950/330,1400/330,1800/330,0/1000 stutter=425/500,0/50 [no] ; Norway dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/200,0/200 callwaiting=425/200,0/600,425/200,0/10000 dialrecall=470/400,425/400 record=1400/400,0/15000 info=!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 stutter=470/400,425/400 [nz] ; New Zealand dial=400 busy=400/250,0/250 ring=400+450/400,0/200,400+450/400,0/2000 congestion=400/375,0/375 callwaiting=!400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200 dialrecall=!400/100!0/100,!400/100,!0/100,!400/100,!0/100,400 record=1400/425,0/15000 info=400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400 stutter=!400/100!0/100,!400/100,!0/100,!400/100,!0/100,!400/100!0/100,!400/100,!0/100,!400/100,!0/100,400 unobtainable=400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400 [ph] ; Philippines dial=425 busy=480+620/500,0/500 ring=425+480/1000,0/4000 congestion=480+620/250,0/250 callwaiting=440/300,0/10000 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,0 stutter=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 [pl] ; Poland dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/500,0/500 callwaiting=425/150,0/150,425/150,0/4000 dialrecall=425/500,0/50 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000 stutter=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 [pt] ; Portugal dial=425 busy=425/500,0/500 ring=425/1000,0/5000 congestion=425/200,0/200 callwaiting=440/300,0/10000 dialrecall=425/1000,0/200 record=1400/500,0/15000 info=950/330,1400/330,1800/330,0/1000 stutter=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 [ru] ; Russia / ex Soviet Union dial=425 busy=425/350,0/350 ring=425/800,0/3200 congestion=425/350,0/350 callwaiting=425/200,0/5000 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 record=1400/500,0/15000info=!950/330,!1400/330,!1800/330,0 [se] ; Sweden dial=425 busy=425/250,0/250 ring=425/1000,0/5000 congestion=425/250,0/750 callwaiting=425/200,0/500,425/200,0/9100 dialrecall=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 record=1400/500,0/15000 info=!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024, !950/332,!0/ 24,!1400/332,!0/24,!1800/332,!0/2024,!950 /332,!0/24,!1400/332,!0/24,!1800/332,0 stutter=!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 [sg] ; Singapore dial=425 ring=425*24/400,0/200,425*24/400,0/2000 busy=425/750,0/750 congestion=425/250,0/250 callwaiting=425*24/300,0/200,425*24/300,0/3200 stutter=!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,425 info=950/330,1400/330,1800/330,0/1000 dialrecall=425*24/500,0/500,425/500,0/2500 record=1400/500,0/15000 nutone=425/2500,0/500 intrusion=425/250,0/2000 warning=425/624,0/4376 acceptance=425/125,0/125 holdinga=!425*24/500,!0/500 holdingb=!425/500,!0/2500 [th] ; Thailand dial=400*50 busy=400/500,0/500 ring=420/1000,0/5000 congestion=400/300,0/300 callwaiting=1000/400,10000/400,1000/400 dialrecall=400*50/400,0/100,400*50/400,0/100 record=1400/500,0/15000 info=950/330,1400/330,1800/330 stutter=!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,400 [uk] ; United Kingdom dial=350+440 specdial=350+440/750,440/750 busy=400/375,0/375 congestion=400/400,0/350,400/225,0/525 speccongestion=400/200,1004/300 unobtainable=400 ring=400+450/400,0/200,400+450/400,0/2000 callwaiting=400/100,0/4000 speccallwaiting=400/250,0/250,400/250,0/250,400/250,0/5000 creditexpired=400/125,0/125 confirm=1400 switching=400/200,0/400,400/2000,0/400 info=950/330,0/15,1400/330,0/15,1800/330,0/1000 record=1400/500,0/60000 stutter=350+440/750,440/750 [us] ; United States / North America dial=350+440 busy=480+620/500,0/500 ring=440+480/2000,0/4000 congestion=480+620/250,0/250 callwaiting=440/300,0/10000 dialrecall=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,0 stutter=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 [us-old] ; United States Circa 1950 / North America dial=600*120 busy=500*100/500,0/500 ring=420*40/2000,0/4000 congestion=500*100/250,0/250 callwaiting=440/300,0/10000 dialrecall=!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,0 stutter=!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 [tw] ; Taiwan dial=350+440 busy=480+620/500,0/500 ring=440+480/1000,0/2000 congestion=480+620/250,0/250 callwaiting=350+440/250,0/250,350+440/250,0/3250 dialrecall=300/1500,0/500 record=1400/500,0/15000 info=!950/330,!1400/330,!1800/330,0 stutter=!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 [ve] ; Venezuela / South America dial=425 busy=425/500,0/500 ring=425/1000,0/4000 congestion=425/250,0/250 callwaiting=400+450/300,0/6000 dialrecall=425 record=1400/500,0/15000 info=!950/330,!1440/330,!1800/330,0/1000 [za] ; South Africa dial=400*33 ring=400*33/400,0/200,400*33/400,0/2000 callwaiting=400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250 congestion=400/250,0/250 busy=400/500,0/500 dialrecall=350+440 record=1400/500,0/10000 info=950/330,1400/330,1800/330,0/330 stutter=!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33
For people interested in generating non-standard tones, you can also configure things to work like the (US version) too. Configuration is left as an exercise for the reader.
See also