aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/bsc-nat/bsc_data.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-04-02 12:34:11 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-04-16 09:20:06 +0200
commitdbd9449a1659f46ef8be68c6c643045e841835a6 (patch)
tree4017893b4348c4d29f62187d5780b15984069433 /openbsc/tests/bsc-nat/bsc_data.c
parent27b618422541af332b3a5876b5e6a5919236b4d3 (diff)
nat: Allow to re-write international numbers in the CC Setup messages
Prepend the international number with a '+' and then do the normal re-writing on it. There are a couple of ways to handle this: \+([0-9]), \+[0-9][0-9]([0-9]), \+49([0-9]) Add a test case for the international re-write based on an already internationalized number.
Diffstat (limited to 'openbsc/tests/bsc-nat/bsc_data.c')
-rw-r--r--openbsc/tests/bsc-nat/bsc_data.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_data.c b/openbsc/tests/bsc-nat/bsc_data.c
index fe0051a59..5a76689e9 100644
--- a/openbsc/tests/bsc-nat/bsc_data.c
+++ b/openbsc/tests/bsc-nat/bsc_data.c
@@ -229,6 +229,15 @@ static const uint8_t cc_setup_national_patched[] = {
0x66, 0xf6, 0x15, 0x02, 0x11, 0x01
};
+/* patch the phone number of cc_setup_national_patched */
+static const uint8_t cc_setup_national_patched_patched[] = {
+ 0x00, 0x21, 0xfd, 0x06, 0x01, 0x12,
+ 0x6d, 0x00, 0x01, 0x1a, 0x01, 0x00, 0x17, 0x03,
+ 0x05, 0x04, 0x06, 0x60, 0x04, 0x02, 0x00, 0x05,
+ 0x81, 0x5e, 0x07, 0x91, 0x63, 0x71, 0x32, 0x33,
+ 0x66, 0xf6, 0x15, 0x02, 0x11, 0x01
+};
+
static const uint8_t cc_setup_international[] = {
0x00, 0x22, 0xfd, 0x06, 0x01, 0x13,
0xe7, 0x00, 0x01, 0x1b, 0x01, 0x00, 0x18, 0x03,
@@ -236,3 +245,11 @@ static const uint8_t cc_setup_international[] = {
0x81, 0x5e, 0x08, 0x81, 0x00, 0x94, 0x71, 0x33,
0x63, 0x66, 0x03, 0x15, 0x02, 0x11, 0x01
};
+
+static const uint8_t cc_setup_national_again[] = {
+ 0x00, 0x22, 0xfd, 0x06, 0x01, 0x12, 0x6d, 0x00,
+ 0x01, 0x1b, 0x01, 0x00, 0x18, 0x03, 0x05, 0x04,
+ 0x06, 0x60, 0x04, 0x02, 0x00, 0x05, 0x81, 0x5e,
+ 0x08, 0x81, 0x63, 0x94, 0x71, 0x32, 0x33, 0x66,
+ 0xf6, 0x15, 0x02, 0x11, 0x01
+};