isdnlog Version 3.27

- country matching fixed (and faster)
This commit is contained in:
Andreas Kool 1999-05-11 20:27:22 +00:00
parent d7674d5075
commit 4aeedf4e1e
5 changed files with 133 additions and 69 deletions

View File

@ -19,6 +19,13 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
## $Log$
## Revision 1.79 1999/05/10 20:37:11 akool
## isdnlog Version 3.26
##
## - fixed the "0800" -> free of charge problem
## - *many* additions to "ausland.dat"
## - first relase of "rate-de.dat" from the CVS-Server of the I4L-Tarif-Crew
##
## Revision 1.78 1999/05/09 18:23:42 akool
## isdnlog Version 3.25
##
@ -622,7 +629,7 @@ SERVICEFILE = /etc/services
# DON'T EDIT BELOW THIS LINE
######################################################################
VERSION = 3.26
VERSION = 3.27
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \

View File

@ -1,10 +1,10 @@
ISDNLOG - Version 3.25 - 06-May-99 21:59
ISDNLOG - Version 3.27 - 11-May-99 22:27
isdnlog ist ein Utility zur Auswertung des D-Kanals eines
ISDN-BRI Anschlusses.
isdnlog-3.25 wurde ausgiebig mit Linux-2.0.36 getestet.
isdnlog-3.27 wurde ausgiebig mit Linux-2.0.36 getestet.
Fuer alle, die es nun ueberhaupt nicht mehr abwarten koennen, hier das
@ -3221,6 +3221,36 @@ Ein 153 Sekunden langes Gespraech nach Italien (+39) kostet am Thu May 6 21:56:
01013 DEM 1.170 (DEM 0.390/60.0s = DEM 0.390/Min (Tele 2, Euro 1 / USA, Kanada))
01019 DEM 1.470 (DEM 0.490/60.0s = DEM 0.490/Min (Mobilcom CbC, Gruppe A))
Anstelle einer Telefonnummer kann auch direkt eine Zone angegeben werden:
$ isdnconf -c .<Zone>
Ein 153 Sekunden langes Gespraech in Zone 8 kostet am Tue May 11 09:07:58 1999
01078 DEM 1.068 (DEM 0.007/1.0s = DEM 0.419/Min (3U, Zone 8, Workday (Thuesday)))
01098 DEM 1.170 (DEM 0.008/1.0s = DEM 0.459/Min (Mox, Fest-zu-Mobil))
01030 DEM 1.224 (DEM 0.008/1.0s = DEM 0.480/Min (TelDaFax, C/D/E-Netz))
01019 DEM 1.470 (DEM 0.490/60.0s = DEM 0.490/Min (Mobilcom CbC, Mobilfunk))
01079 DEM 1.861 (DEM 0.012/1.0s = DEM 0.730/Min (Viatel, Deutschland GSM, Workday (Thuesday), Standard))
Hier sind bislang folgende einheitliche Zonen moeglich:
0 : Verbindungen an der eigenen Tk-Anlage (zwangslaeufig kostenlos)
sowie alle "FreeCall" (kostenlos) Nummern des jeweiligen Providers
1 : Ortszone (alle Nummern, die ohne Vorwahl erreichbar sind.
Z.Zt. nur ueber den preselected Provider erreichbar)
2 : Cityzone (Nummern im Umkreis von max. 20 km)
3 : Region 50 (Nummern im Umkreis von max. 50 km)
4 : Fernzone (Deutschlandweit)
5 : C-Mobilbox
6 : C-Netz
7 : D1-Netz
8 : D2-Netz
9 : E-plus-Netz
10 : E2-Netz
20 : Internet
21 : Auskunft Inland
22 : Auskunft Ausland
Hier nun die Optionen des Programmes:

View File

@ -1,4 +1,4 @@
# V:1.00-Germany [10-May-1999]
# V:1.00-Germany [11-May-1999]
#
+995:Georgien
+994:Aserbaidschan
@ -91,29 +91,29 @@
+813:Tokyo
+81:Japan
+800:international freephone
+7902:Russische Föderat. (westl.):GUS
+7901:Russische Föderat. (westl.):GUS
+7863:Russische Föderat. (westl.):GUS
+7862:Russische Föderat. (westl.):GUS
+7861:Russische Föderat. (westl.):GUS
+7820:Russische Föderat. (westl.):GUS
+7817:Russische Föderat. (westl.):GUS
+7816:Russische Föderat. (westl.):GUS
+7815:Russische Föderat. (westl.):GUS
+7814:Russische Föderat. (westl.):GUS
+7902:Russische Föderat. (westl.):GUS (Russische Föderation)
+7901:Russische Föderat. (westl.):GUS (Russische Föderation)
+7863:Russische Föderat. (westl.):GUS (Russische Föderation)
+7862:Russische Föderat. (westl.):GUS (Russische Föderation)
+7861:Russische Föderat. (westl.):GUS (Russische Föderation)
+7820:Russische Föderat. (westl.):GUS (Russische Föderation)
+7817:Russische Föderat. (westl.):GUS (Russische Föderation)
+7816:Russische Föderat. (westl.):GUS (Russische Föderation)
+7815:Russische Föderat. (westl.):GUS (Russische Föderation)
+7814:Russische Föderat. (westl.):GUS (Russische Föderation)
+7812:St. Petersburg
+7811:Russische Föderat. (westl.):GUS
+7811:Russische Föderat. (westl.):GUS (Russische Föderation)
+7590:Usbekistan
+7543:Russische Föderat. (westl.):GUS
+7517:Russische Föderat. (westl.):GUS
+7543:Russische Föderat. (westl.):GUS (Russische Föderation)
+7517:Russische Föderat. (westl.):GUS (Russische Föderation)
+751285:St. Petersburg
+75112:Russische Föderat. (westl.):GUS
+75110:Russische Föderat. (westl.):GUS
+7510:Russische Föderat. (westl.):GUS
+7505:Russische Föderat. (westl.):GUS
+7503:Russische Föderat. (westl.):GUS
+7502:Russische Föderat. (westl.):GUS
+7501:Russische Föderat. (westl.):GUS
+75112:Russische Föderat. (westl.):GUS (Russische Föderation)
+75110:Russische Föderat. (westl.):GUS (Russische Föderation)
+7510:Russische Föderat. (westl.):GUS (Russische Föderation)
+7505:Russische Föderat. (westl.):GUS (Russische Föderation)
+7503:Russische Föderat. (westl.):GUS (Russische Föderation)
+7502:Russische Föderat. (westl.):GUS (Russische Föderation)
+7501:Russische Föderat. (westl.):GUS (Russische Föderation)
+7436:Usbekistan
+7433:Tadschikistan
+7431:Tadschikistan
@ -164,28 +164,28 @@
+7311:Kasachstan
+7310:Kasachstan
+73:Kasachstan
+7096:Russische Föderat. (westl.):GUS
+7096:Russische Föderat. (westl.):GUS (Russische Föderation)
+7096:Moskau
+7095:Moskau
+709246:Russische Föderat. (westl.):GUS
+709245:Russische Föderat. (westl.):GUS
+709244:Russische Föderat. (westl.):GUS
+709243:Russische Föderat. (westl.):GUS
+709237:Russische Föderat. (westl.):GUS
+7091:Russische Föderat. (westl.):GUS
+7087:Russische Föderat. (westl.):GUS
+7086:Russische Föderat. (westl.):GUS
+7085:Russische Föderat. (westl.):GUS
+7084:Russische Föderat. (westl.):GUS
+7083:Russische Föderat. (westl.):GUS
+7082:Russische Föderat. (westl.):GUS
+7081:Russische Föderat. (westl.):GUS
+7074:Russische Föderat. (westl.):GUS
+7073:Russische Föderat. (westl.):GUS
+7072:Russische Föderat. (westl.):GUS
+7071:Russische Föderat. (westl.):GUS
+7011:Russische Föderat. (westl.):GUS
+7:Russische Förderation (östl.):GUS
+709246:Russische Föderat. (westl.):GUS (Russische Föderation)
+709245:Russische Föderat. (westl.):GUS (Russische Föderation)
+709244:Russische Föderat. (westl.):GUS (Russische Föderation)
+709243:Russische Föderat. (westl.):GUS (Russische Föderation)
+709237:Russische Föderat. (westl.):GUS (Russische Föderation)
+7091:Russische Föderat. (westl.):GUS (Russische Föderation)
+7087:Russische Föderat. (westl.):GUS (Russische Föderation)
+7086:Russische Föderat. (westl.):GUS (Russische Föderation)
+7085:Russische Föderat. (westl.):GUS (Russische Föderation)
+7084:Russische Föderat. (westl.):GUS (Russische Föderation)
+7083:Russische Föderat. (westl.):GUS (Russische Föderation)
+7082:Russische Föderat. (westl.):GUS (Russische Föderation)
+7081:Russische Föderat. (westl.):GUS (Russische Föderation)
+7074:Russische Föderat. (westl.):GUS (Russische Föderation)
+7073:Russische Föderat. (westl.):GUS (Russische Föderation)
+7072:Russische Föderat. (westl.):GUS (Russische Föderation)
+7071:Russische Föderat. (westl.):GUS (Russische Föderation)
+7011:Russische Föderat. (westl.):GUS (Russische Föderation)
+7:Russische Förderation (östl.):GUS (Russische Föderation)
+6998:Midway-Inseln
+6996:Chatham-Inseln
+6993:Wake Inseln

View File

@ -7,9 +7,15 @@ P:20=99
# Dont use NetCologne
P:22=99
# Dont use CityKom
P:25=99
# Dont use Telebridge
P:28=99
# Dont use TeleBeL
P:42=99
# Dont use ACC
P:49=99

View File

@ -19,6 +19,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.15 1999/05/10 20:37:42 akool
* isdnlog Version 3.26
*
* - fixed the "0800" -> free of charge problem
* - *many* additions to "ausland.dat"
* - first relase of "rate-de.dat" from the CVS-Server of the I4L-Tarif-Crew
*
* Revision 1.14 1999/05/09 18:24:24 akool
* isdnlog Version 3.25
*
@ -383,19 +390,19 @@ static int countrymatch(char *name, char *num)
down(k);
for (i = 0; i < nCountry; i++)
if (strstr(Country[i].match, k) && (test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))))
if ((test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))) && !strncmp(Country[i].match, k, strlen(Country[i].match)))
return(nCountry);
for (i = 0; i < nCountry; i++)
if (strstr(Country[i].hints, k) && (test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))))
if ((test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))) && strstr(Country[i].match, k))
return(nCountry);
for (i = 0; i < nCountry; i++)
if (strstr(k, Country[i].hints) && (test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))))
if ((test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))) && strstr(Country[i].hints, k))
return(nCountry);
for (i = 0; i < nCountry; i++)
if ((wld(k, Country[i].match) <= DISTANCE) && (test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))))
if ((test || !strncmp(Country[i].prefix, num, strlen(Country[i].prefix))) && (wld(k, Country[i].match) <= DISTANCE))
return(nCountry);
return(0);
@ -427,35 +434,49 @@ int abroad(char *key, char *result)
down(k);
} /* else */
for (i = 0; i < nCountry; i++) {
if (mode == 1) {
if (mode == 1) {
for (i = 0; i < nCountry; i++) {
res = strlen(Country[i].prefix);
match = !strncmp(Country[i].prefix, key, res);
}
else {
res = 1;
match = (strstr(Country[i].match, k) != NULL);
if (!match)
match = (strstr(Country[i].hints, k) != NULL);
if (match)
break;
} /* for */
}
else { /* mode == 2 */
res = 1;
if (!match)
match = (strstr(k, Country[i].hints) != NULL);
for (i = 0; i < nCountry; i++)
if ((match = !strncmp(Country[i].match, k, strlen(Country[i].match))))
break;
if (!match)
match = (wld(k, Country[i].match) <= DISTANCE);
if (!match)
for (i = 0; i < nCountry; i++)
if ((match = (strstr(Country[i].match, k) != NULL)))
break;
} /* else */
if (!match)
for (i = 0; i < nCountry; i++)
if ((match = (strstr(Country[i].hints, k) != NULL)))
break;
if (match) {
if (mode == 1)
strcpy(result, Country[i].name);
else
strcpy(result, Country[i].prefix);
#if 0
if (!match)
for (i = 0; i < nCountry; i++)
if ((match = (wld(k, Country[i].match) <= DISTANCE)))
break;
#endif
return(res);
} /* if */
} /* for */
} /* else */
if (match) {
if (mode == 1)
strcpy(result, Country[i].name);
else
strcpy(result, Country[i].prefix);
return(res);
} /* if */
return(0);
} /* abroad */