aboutsummaryrefslogtreecommitdiffstats
path: root/src/amps/amps.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2019-07-06 07:29:40 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2019-07-06 07:30:18 +0200
commitc357ab5ad53aac6a469aef77c42332918670620a (patch)
treeb7638dd801a420f9efcc7f4c6a58dc6485585d09 /src/amps/amps.c
parent41ee8239dfe68161d5c1ed87a983e466d020d522 (diff)
Allow dialing national and international prefix for AMPS/TACS
Diffstat (limited to 'src/amps/amps.c')
-rw-r--r--src/amps/amps.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index e9adeed..7ecf76f 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -899,10 +899,17 @@ int call_down_setup(int callref, const char __attribute__((unused)) *caller_id,
int i;
/* 1. check if number is invalid, return INVALNUMBER */
- if (strlen(dialing) == 11 && !strncmp(dialing, "+", 1))
- dialing += 1;
- if (strlen(dialing) == 11 && !strncmp(dialing, "1", 1))
- dialing += 1;
+ if (!tacs) {
+ if (strlen(dialing) == 12 && !strncmp(dialing, "+1", 2))
+ dialing += 2;
+ if (strlen(dialing) == 11 && !strncmp(dialing, "1", 1))
+ dialing += 1;
+ } else if (!jtacs) {
+ if (strlen(dialing) == 14 && !strncmp(dialing, "+44", 3))
+ dialing += 3;
+ if (strlen(dialing) == 11 && !strncmp(dialing, "0", 1))
+ dialing += 1;
+ }
if (strlen(dialing) != 10) {
inval:
PDEBUG(DAMPS, DEBUG_NOTICE, "Outgoing call to invalid number '%s', rejecting!\n", dialing);