diff options
author | Jeff Hatch <Jeff.Hatch@multitech.com> | 2017-05-30 08:12:00 -0500 |
---|---|---|
committer | Jeff Hatch <Jeff.Hatch@multitech.com> | 2017-05-30 08:12:00 -0500 |
commit | 3d1e17bba0c67376a138a1ae3542ab4b700f5f06 (patch) | |
tree | 94474db327e07f227adef1f39e874b1bc8003bd3 | |
parent | e4fc2ab6cca31a901fe4df9605332b9d940ad8c2 (diff) | |
download | sms-utils-3d1e17bba0c67376a138a1ae3542ab4b700f5f06.tar.gz sms-utils-3d1e17bba0c67376a138a1ae3542ab4b700f5f06.tar.bz2 sms-utils-3d1e17bba0c67376a138a1ae3542ab4b700f5f06.zip |
SMS Commands not working for International numbers1.0.3
-rw-r--r-- | src/pdu.h | 1 | ||||
-rw-r--r-- | src/pdu_decode.c | 12 |
2 files changed, 9 insertions, 4 deletions
@@ -54,6 +54,7 @@ enum { PDU_ALPHABET_DEFAULT = 0, //GSM 7-bit, (supposedly CDMA 8-bit but haven't seen it) PDU_ALPHABET_DEFAULT2 = 1, //GSM 7-bit (used with some shortcodes) PDU_ALPHABET_CDMA_DEFAULT = 2, //no GSM, CDMA 7-bit + PDU_ALPHABET_TE = 3, //TE specific PDU_ALPHABET_EIGHT = 4, //GSM 8-bit, CDMA 16-bit unicode PDU_ALPHABET_CDMA_EIGHT = 8, //GSM 16-bit, CDMA 8-bit (what CDMA radios are actually using) PDU_ALPHABET_DEFAULT_MULTI = 9,//no GSM, LVW2 7-bit, multi-part diff --git a/src/pdu_decode.c b/src/pdu_decode.c index ebe939e..2906a88 100644 --- a/src/pdu_decode.c +++ b/src/pdu_decode.c @@ -195,7 +195,7 @@ int pdu_decode_user_data(const char *pdu_str, struct pdu_info *pdu, int *nr_octe if (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT || - pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT2) + pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT2 ) { log_debug("data coding alphabet is default (7-bit)"); } else if (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT_MULTI) { @@ -206,7 +206,9 @@ int pdu_decode_user_data(const char *pdu_str, struct pdu_info *pdu, int *nr_octe log_debug("data coding alphabet is eight"); } else if (pdu->data_coding.general.alphabet == PDU_ALPHABET_CDMA_EIGHT) { log_debug("data coding alphabet is CDMA eight"); - } else { + } else if (pdu->data_coding.general.alphabet == PDU_ALPHABET_TE) { + log_debug("data coding alphabet is TE specific 7-bit"); + } else { log_debug("data coding alphabet 0x%02X not implemented", pdu->data_coding.general.alphabet); return -1; @@ -217,7 +219,8 @@ int pdu_decode_user_data(const char *pdu_str, struct pdu_info *pdu, int *nr_octe // ----------------------------------------------------------------------------- if ((pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT) || (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT2) || - (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT_MULTI)) { + (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT_MULTI)|| + (pdu->data_coding.general.alphabet == PDU_ALPHABET_TE)) { if (pdu->user_data_len > PDU_UD_7BIT_MAX) { log_warning("pdu contains invalid user-data-len: 0x%02X", pdu->user_data_len); @@ -281,7 +284,8 @@ int pdu_decode_user_data(const char *pdu_str, struct pdu_info *pdu, int *nr_octe // GSM 7-BIT & LVW2 7-BIT MULTI-PART if ((pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT) || (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT2) || - (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT_MULTI)) { + (pdu->data_coding.general.alphabet == PDU_ALPHABET_DEFAULT_MULTI)|| + (pdu->data_coding.general.alphabet == PDU_ALPHABET_TE)) { // Keep UDH for concatenated SMS. // Otherwise it is impossible to process correctly concatenated SMS. i = 0; |