git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Josh Roberson
2005-11-23 05:03:42 +00:00
parent e38a91b45a
commit fb418aa2e0
5 changed files with 46 additions and 39 deletions

View File

@@ -1,3 +1,10 @@
2005-11-23 Josh Roberson <josh@asteriasgi.com>
* configs/indications.conf.sample: Fix misspellings of cadence (issue #5826)
* include/asterisk/indications.h: Fix misspellings of cadence (issue #5826)
* res/res_indications.c: Fix misspellings of cadence (issue #5826)
* indications.c: Fix misspellings of cadence (issue #5826)
2005-11-22 Josh Roberson <josh@asteriasgi.com> 2005-11-22 Josh Roberson <josh@asteriasgi.com>
* apps/app_voicemail.c: Remove "yay!" message. (issue #5829) * apps/app_voicemail.c: Remove "yay!" message. (issue #5829)

View File

@@ -20,7 +20,7 @@ country=us ; default location
; alias = iso[,iso]* ; alias = iso[,iso]*
; List of other countries 2-letter iso codes, which have the same ; List of other countries 2-letter iso codes, which have the same
; tone indications. ; tone indications.
; ringcadance = num[,num]* ; ringcadence = num[,num]*
; List of durations the physical bell rings. ; List of durations the physical bell rings.
; dial = tonelist ; dial = tonelist
; Set of tones to be played when one picks up the hook. ; Set of tones to be played when one picks up the hook.
@@ -61,7 +61,7 @@ country=us ; default location
[at] [at]
description = Austria description = Austria
ringcadance = 1000,5000 ringcadence = 1000,5000
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
dial = 420 dial = 420
busy = 420/400,0/400 busy = 420/400,0/400
@@ -78,7 +78,7 @@ stutter = 380+420
description = Australia description = Australia
; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf ; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf
; Normal Ring ; Normal Ring
ringcadance = 400,200,400,2000 ringcadence = 400,200,400,2000
; Distinctive Ring 1 - Forwarded Calls ; Distinctive Ring 1 - Forwarded Calls
; 400,400,200,200,400,1400 ; 400,400,200,200,400,1400
; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall ; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall
@@ -116,7 +116,7 @@ ringmobile = 400+450/400,0/200,400+450/400,0/2000
[br] [br]
description = Brazil description = Brazil
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425 dial = 425
busy = 425/250,0/250 busy = 425/250,0/250
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -149,7 +149,7 @@ stutter = 425/1000,0/250
[ch] [ch]
description = Switzerland description = Switzerland
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425 dial = 425
busy = 425/500,0/500 busy = 425/500,0/500
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -165,7 +165,7 @@ stutter = 425+340/1100,0/1100
[cl] [cl]
description = Chile description = Chile
; According to specs from Telefonica CTC Chile ; According to specs from Telefonica CTC Chile
ringcadance = 1000,3000 ringcadence = 1000,3000
dial = 400 dial = 400
busy = 400/500,0/500 busy = 400/500,0/500
ring = 400/1000,0/3000 ring = 400/1000,0/3000
@@ -179,7 +179,7 @@ stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/1
[cn] [cn]
description = China description = China
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 450 dial = 450
busy = 450/350,0/350 busy = 450/350,0/350
ring = 450/1000,0/4000 ring = 450/1000,0/4000
@@ -194,7 +194,7 @@ stutter = 450+425
[cz] [cz]
description = Czech Republic description = Czech Republic
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425/330,0/330,425/660,0/660 dial = 425/330,0/330,425/660,0/660
busy = 425/330,0/330 busy = 425/330,0/330
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -211,7 +211,7 @@ stutter = 425/450,0/50
[de] [de]
description = Germany description = Germany
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425 dial = 425
busy = 425/480,0/480 busy = 425/480,0/480
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -227,7 +227,7 @@ stutter = 425+400
[dk] [dk]
description = Denmark description = Denmark
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425 dial = 425
busy = 425/500,0/500 busy = 425/500,0/500
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -244,7 +244,7 @@ stutter = 425/450,0/50
[ee] [ee]
description = Estonia description = Estonia
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425 dial = 425
busy = 425/300,0/300 busy = 425/300,0/300
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -276,7 +276,7 @@ dialout = 500
[fi] [fi]
description = Finland description = Finland
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425 dial = 425
busy = 425/300,0/300 busy = 425/300,0/300
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -290,7 +290,7 @@ stutter = 425/650,0/25
[fr] [fr]
description = France description = France
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1500,3500 ringcadence = 1500,3500
; Dialtone can also be 440+330 ; Dialtone can also be 440+330
dial = 440 dial = 440
busy = 440/500,0/500 busy = 440/500,0/500
@@ -307,7 +307,7 @@ stutter = !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/1
[gr] [gr]
description = Greece description = Greece
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 425/200,0/300,425/700,0/800 dial = 425/200,0/300,425/700,0/800
busy = 425/300,0/300 busy = 425/300,0/300
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -321,7 +321,7 @@ stutter = 425/650,0/25
[hu] [hu]
description = Hungary description = Hungary
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1250,3750 ringcadence = 1250,3750
dial = 425 dial = 425
busy = 425/300,0/300 busy = 425/300,0/300
ring = 425/1250,0/3750 ring = 425/1250,0/3750
@@ -365,7 +365,7 @@ stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/1
[mx] [mx]
description = Mexico description = Mexico
ringcadance = 2000,4000 ringcadence = 2000,4000
dial = 425 dial = 425
busy = 425/250,0/250 busy = 425/250,0/250
ring = 425/1000,0/4000 ring = 425/1000,0/4000
@@ -379,7 +379,7 @@ stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/1
[nl] [nl]
description = Netherlands description = Netherlands
; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
ringcadance = 1000,4000 ringcadence = 1000,4000
; Most of these 425's can also be 450's ; Most of these 425's can also be 450's
dial = 425 dial = 425
busy = 425/500,0/500 busy = 425/500,0/500
@@ -440,7 +440,7 @@ stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/1
[pt] [pt]
description = Portugal description = Portugal
ringcadance = 1000,5000 ringcadence = 1000,5000
dial = 425 dial = 425
busy = 425/500,0/500 busy = 425/500,0/500
ring = 425/1000,0/5000 ring = 425/1000,0/5000
@@ -453,7 +453,7 @@ stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/1
[ru] [ru]
description = Russia / ex Soviet Union description = Russia / ex Soviet Union
ringcadance = 800,3200 ringcadence = 800,3200
dial = 425 dial = 425
busy = 425/350,0/350 busy = 425/350,0/350
ring = 425/800,0/3200 ring = 425/800,0/3200
@@ -465,7 +465,7 @@ info = !950/330,!1400/330,!1800/330,0
[se] [se]
description = Sweden description = Sweden
ringcadance = 1000,5000 ringcadence = 1000,5000
dial = 425 dial = 425
busy = 425/250,0/250 busy = 425/250,0/250
ring = 425/1000,0/5000 ring = 425/1000,0/5000
@@ -502,7 +502,7 @@ holdingb = !425/500,!0/2500
[uk] [uk]
description = United Kingdom description = United Kingdom
ringcadance = 400,200,400,2000 ringcadence = 400,200,400,2000
; These are the official tones taken from BT SIN350. The actual tones ; These are the official tones taken from BT SIN350. The actual tones
; used by BT include some volume differences so sound slightly different ; used by BT include some volume differences so sound slightly different
; from Asterisk-generated ones. ; from Asterisk-generated ones.
@@ -537,7 +537,7 @@ stutter = 350+440/750,440/750
[us] [us]
description = United States / North America description = United States / North America
ringcadance = 2000,4000 ringcadence = 2000,4000
dial = 350+440 dial = 350+440
busy = 480+620/500,0/500 busy = 480+620/500,0/500
ring = 440+480/2000,0/4000 ring = 440+480/2000,0/4000
@@ -550,7 +550,7 @@ stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/1
[us-old] [us-old]
description = United States Circa 1950/ North America description = United States Circa 1950/ North America
ringcadance = 2000,4000 ringcadence = 2000,4000
dial = 600*120 dial = 600*120
busy = 500*100/500,0/500 busy = 500*100/500,0/500
ring = 420*40/2000,0/4000 ring = 420*40/2000,0/4000
@@ -574,7 +574,7 @@ description = Taiwan
; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off ; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off
; ringing tone 440+480Hz 1 sec. on ,2 sec. off ; ringing tone 440+480Hz 1 sec. on ,2 sec. off
; ;
ringcadance = 1000,4000 ringcadence = 1000,4000
dial = 350+440 dial = 350+440
busy = 480+620/500,0/500 busy = 480+620/500,0/500
ring = 440+480/1000,0/2000 ring = 440+480/1000,0/2000
@@ -593,7 +593,7 @@ description = South Africa
; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere. ; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere.
; The former use 383+417 in dial, ringback etc. The latter use 400*33 ; The former use 383+417 in dial, ringback etc. The latter use 400*33
; I've provided both, uncomment the ones you prefer ; I've provided both, uncomment the ones you prefer
ringcadance = 400,200,400,2000 ringcadence = 400,200,400,2000
; dial/ring/callwaiting for the Siemens switches: ; dial/ring/callwaiting for the Siemens switches:
dial = 400*33 dial = 400*33
ring = 400*33/400,0/200,400*33/400,0/2000 ring = 400*33/400,0/200,400*33/400,0/2000

View File

@@ -53,8 +53,8 @@ struct tone_zone {
char country[5]; /* Country code */ char country[5]; /* Country code */
char alias[5]; /* is this an alias? */ char alias[5]; /* is this an alias? */
char description[40]; /* Description */ char description[40]; /* Description */
int nrringcadance; /* # registered ringcadance elements */ int nrringcadence; /* # registered ringcadence elements */
int *ringcadance; /* Ring cadence */ int *ringcadence; /* Ring cadence */
struct tone_zone_sound *tones; /* The known tones for this zone */ struct tone_zone_sound *tones; /* The known tones for this zone */
}; };

View File

@@ -432,8 +432,8 @@ static inline void free_zone(struct tone_zone* zone)
free(zone->tones); free(zone->tones);
zone->tones = tmp; zone->tones = tmp;
} }
if (zone->ringcadance) if (zone->ringcadence)
free((void*)zone->ringcadance); free((void*)zone->ringcadence);
free(zone); free(zone);
} }

View File

@@ -182,11 +182,11 @@ static int handle_show_indications(int fd, int argc, char *argv[])
ast_cli(fd,"Country Indication PlayList\n" ast_cli(fd,"Country Indication PlayList\n"
"=====================================\n"); "=====================================\n");
} }
j = snprintf(buf,sizeof(buf),"%-7.7s %-15.15s ",tz->country,"<ringcadance>"); j = snprintf(buf,sizeof(buf),"%-7.7s %-15.15s ",tz->country,"<ringcadence>");
for (i=0; i<tz->nrringcadance; i++) { for (i=0; i<tz->nrringcadence; i++) {
j += snprintf(buf+j,sizeof(buf)-j,"%d,",tz->ringcadance[i]); j += snprintf(buf+j,sizeof(buf)-j,"%d,",tz->ringcadence[i]);
} }
if (tz->nrringcadance) j--; if (tz->nrringcadence) j--;
ast_copy_string(buf+j,"\n",sizeof(buf)-j); ast_copy_string(buf+j,"\n",sizeof(buf)-j);
ast_cli(fd,buf); ast_cli(fd,buf);
for (ts=tz->tones; ts; ts=ts->next) for (ts=tz->tones; ts; ts=ts->next)
@@ -271,26 +271,26 @@ static int ind_load_module(void)
while(v) { while(v) {
if (!strcasecmp(v->name, "description")) { if (!strcasecmp(v->name, "description")) {
ast_copy_string(tones->description, v->value, sizeof(tones->description)); ast_copy_string(tones->description, v->value, sizeof(tones->description));
} else if (!strcasecmp(v->name,"ringcadance")) { } else if ((!strcasecmp(v->name,"ringcadence"))||(!strcasecmp(v->name,"ringcadance"))) {
char *ring,*rings = ast_strdupa(v->value); char *ring,*rings = ast_strdupa(v->value);
c = rings; c = rings;
ring = strsep(&c,","); ring = strsep(&c,",");
while (ring) { while (ring) {
int *tmp, val; int *tmp, val;
if (!isdigit(ring[0]) || (val=atoi(ring))==-1) { if (!isdigit(ring[0]) || (val=atoi(ring))==-1) {
ast_log(LOG_WARNING,"Invalid ringcadance given '%s' at line %d.\n",ring,v->lineno); ast_log(LOG_WARNING,"Invalid ringcadence given '%s' at line %d.\n",ring,v->lineno);
ring = strsep(&c,","); ring = strsep(&c,",");
continue; continue;
} }
tmp = realloc(tones->ringcadance,(tones->nrringcadance+1)*sizeof(int)); tmp = realloc(tones->ringcadence,(tones->nrringcadence+1)*sizeof(int));
if (!tmp) { if (!tmp) {
ast_log(LOG_WARNING, "Out of memory\n"); ast_log(LOG_WARNING, "Out of memory\n");
ast_config_destroy(cfg); ast_config_destroy(cfg);
return -1; return -1;
} }
tones->ringcadance = tmp; tones->ringcadence = tmp;
tmp[tones->nrringcadance] = val; tmp[tones->nrringcadence] = val;
tones->nrringcadance++; tones->nrringcadence++;
/* next item */ /* next item */
ring = strsep(&c,","); ring = strsep(&c,",");
} }