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:
@@ -1,3 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include "../amps/main.h"
|
||||
#include "../amps/tones.h"
|
||||
#include "../amps/outoforder.h"
|
||||
@@ -5,6 +6,12 @@
|
||||
const int tacs = 1;
|
||||
const int jtacs = 0;
|
||||
|
||||
const char *number_prefixes[] = {
|
||||
"0xxxxxxxxxx",
|
||||
"+44xxxxxxxxxx",
|
||||
NULL
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
/* init common tones */
|
||||
|
Reference in New Issue
Block a user