From 47b144b00251969c30e6fcfaba1a6fe0c812db3b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 18 Jan 2012 20:15:29 +0100 Subject: nat: Internationalize the TP-DA if it starts with a 00 Internationalize the number like we do it for Call Control. Update the test result to match this new behavior. --- openbsc/src/osmo-bsc_nat/bsc_nat_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_utils.c') diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c index 36a7cfb07..96b937c2b 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c @@ -1071,7 +1071,10 @@ static struct msgb *sms_create_new(uint8_t type, uint8_t ref, msgb_v_put(out, data_ptr[1]); /* encode the new number and put it */ - sms_encode_addr_element(out, new_dest_nr, 0x81, 1); + if (strncmp(new_dest_nr, "00", 2) == 0) + sms_encode_addr_element(out, new_dest_nr + 2, 0x91, 1); + else + sms_encode_addr_element(out, new_dest_nr, 0x81, 1); /* Copy the rest after the TP-DS */ data = msgb_put(out, data_len - 2 - 1 - old_dest_len); -- cgit v1.2.3