Refactoring validity check and prefix processing of dialed number

Command line help shows how many digits and what prefixes can be dialed.

Giving a station ID via command line will be checked for being valid.

The number to call the mobile statione will be checked for being valid.

Prefixes that are defined for a nework will be removed from station ID
automatically.

Multiple station ID lengths are supported:
 * C-Netz: 7 or 8 digits, depending on area code length
 * A-Netz: 5 or 7 digits; number is truncated to last 5 digits.
 * IMTS/MTS: 5 or 7 digits, depending on phone's selector switch.
This commit is contained in:
Andreas Eversberg
2021-10-07 19:35:56 +02:00
parent 3a73f31d7e
commit 423bc42429
41 changed files with 662 additions and 429 deletions

View File

@@ -1,3 +1,4 @@
#include <stdio.h>
#include "main.h"
#include "tones.h"
#include "noanswer.h"
@@ -8,6 +9,12 @@
const int tacs = 0;
const int jtacs = 0;
const char *number_prefixes[] = {
"1xxxxxxxxxx",
"+1xxxxxxxxxx",
NULL
};
int main(int argc, char *argv[])
{
/* init common tones */