Hi Paulo, Thanks for the explanation, however from the logs I have below the UDH which containing ^ € { } [ ] ~ such as (05 00 03 5b 02 01 ...[.. )are not actually have 159 in length, our Telco SMSC claimed that it was 160 in length and causing SMSC to return error code 0x00000001 (Message Length is invalid) in response to submit_sm PDU. Below are the other dump with the UDH containing ^ (05 00 03 5e 02 01 ...^..)which was also rejected.
579501:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP PDU 0x7f11980051b0 dump: 579502:2016-10-31 11:26:07 [27389] [38] DEBUG: type_name: submit_sm 579503:2016-10-31 11:26:07 [27389] [38] DEBUG: command_id: 4 = 0x00000004 579504:2016-10-31 11:26:07 [27389] [38] DEBUG: command_status: 0 = 0x00000000 579505:2016-10-31 11:26:07 [27389] [38] DEBUG: sequence_number: 18465 = 0x00004821 579506:2016-10-31 11:26:07 [27389] [38] DEBUG: service_type: NULL 579507:2016-10-31 11:26:07 [27389] [38] DEBUG: source_addr_ton: 0 = 0x00000000 579508:2016-10-31 11:26:07 [27389] [38] DEBUG: source_addr_npi: 1 = 0x00000001 579509:2016-10-31 11:26:07 [27389] [38] DEBUG: source_addr: "removed" 579510:2016-10-31 11:26:07 [27389] [38] DEBUG: dest_addr_ton: 1 = 0x00000001 579511:2016-10-31 11:26:07 [27389] [38] DEBUG: dest_addr_npi: 1 = 0x00000001 579512:2016-10-31 11:26:07 [27389] [38] DEBUG: destination_addr: "removed" 579513:2016-10-31 11:26:07 [27389] [38] DEBUG: esm_class: 64 = 0x00000040 579514:2016-10-31 11:26:07 [27389] [38] DEBUG: protocol_id: 0 = 0x00000000 579515:2016-10-31 11:26:07 [27389] [38] DEBUG: priority_flag: 0 = 0x00000000 579516:2016-10-31 11:26:07 [27389] [38] DEBUG: schedule_delivery_time: NULL 579517:2016-10-31 11:26:07 [27389] [38] DEBUG: validity_period: NULL 579518:2016-10-31 11:26:07 [27389] [38] DEBUG: registered_delivery: 0 = 0x00000000 579519:2016-10-31 11:26:07 [27389] [38] DEBUG: replace_if_present_flag: 0 = 0x00000000 579520:2016-10-31 11:26:07 [27389] [38] DEBUG: data_coding: 0 = 0x00000000 579521:2016-10-31 11:26:07 [27389] [38] DEBUG: sm_default_msg_id: 0 = 0x00000000 579522:2016-10-31 11:26:07 [27389] [38] DEBUG: sm_length: 159 = 0x0000009f 579523:2016-10-31 11:26:07 [27389] [38] DEBUG: short_message: 579524:2016-10-31 11:26:07 [27389] [38] DEBUG: Octet string at 0x7f1198009e40: 579525:2016-10-31 11:26:07 [27389] [38] DEBUG: len: 159 579526:2016-10-31 11:26:07 [27389] [38] DEBUG: size: 1024 579527:2016-10-31 11:26:07 [27389] [38] DEBUG: immutable: 0 579528:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 05 00 03 5e 02 01 54 48 49 53 49 53 41 56 45 52 ...^..THISISAVER 579529:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 59 4c 4f 4e 47 4d 45 53 53 41 47 45 54 48 49 53 YLONGMESSAGETHIS 579530:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 49 53 41 56 45 52 59 4c 4f 4e 47 4d 45 53 53 41 ISAVERYLONGMESSA 579531:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 47 45 54 48 49 53 49 53 41 56 45 52 59 4c 4f 4e GETHISISAVERYLON 579532:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 47 4d 45 53 53 41 47 45 54 48 49 53 49 53 41 56 GMESSAGETHISISAV 579533:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 45 52 59 4c 4f 4e 47 4d 45 53 53 41 47 45 54 48 ERYLONGMESSAGETH 579534:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 49 53 49 53 41 56 45 52 59 4c 4f 4e 47 4d 45 53 ISISAVERYLONGMES 579535:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 53 41 47 45 54 48 49 53 49 53 41 56 45 52 59 4c SAGETHISISAVERYL 579536:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 4f 4e 47 4d 45 53 53 41 47 45 54 48 49 53 49 53 ONGMESSAGETHISIS 579537:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 41 56 45 52 59 4c 4f 4e 47 47 47 47 47 47 47 AVERYLONGGGGGGG 579538:2016-10-31 11:26:07 [27389] [38] DEBUG: Octet string dump ends. 579539:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP PDU dump ends. 579543:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP[6SeriesConn1]: Sending PDU: 579544:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP PDU 0x7f11980051b0 dump: 579545:2016-10-31 11:26:07 [27389] [38] DEBUG: type_name: submit_sm 579546:2016-10-31 11:26:07 [27389] [38] DEBUG: command_id: 4 = 0x00000004 579547:2016-10-31 11:26:07 [27389] [38] DEBUG: command_status: 0 = 0x00000000 579548:2016-10-31 11:26:07 [27389] [38] DEBUG: sequence_number: 18466 = 0x00004822 579549:2016-10-31 11:26:07 [27389] [38] DEBUG: service_type: NULL 579550:2016-10-31 11:26:07 [27389] [38] DEBUG: source_addr_ton: 0 = 0x00000000 579551:2016-10-31 11:26:07 [27389] [38] DEBUG: source_addr_npi: 1 = 0x00000001 579552:2016-10-31 11:26:07 [27389] [38] DEBUG: source_addr: "removed" 579553:2016-10-31 11:26:07 [27389] [38] DEBUG: dest_addr_ton: 1 = 0x00000001 579554:2016-10-31 11:26:07 [27389] [38] DEBUG: dest_addr_npi: 1 = 0x00000001 579555:2016-10-31 11:26:07 [27389] [38] DEBUG: destination_addr: "removed" 579556:2016-10-31 11:26:07 [27389] [38] DEBUG: esm_class: 64 = 0x00000040 579557:2016-10-31 11:26:07 [27389] [38] DEBUG: protocol_id: 0 = 0x00000000 579558:2016-10-31 11:26:07 [27389] [38] DEBUG: priority_flag: 0 = 0x00000000 579559:2016-10-31 11:26:07 [27389] [38] DEBUG: schedule_delivery_time: NULL 579560:2016-10-31 11:26:07 [27389] [38] DEBUG: validity_period: NULL 579561:2016-10-31 11:26:07 [27389] [38] DEBUG: registered_delivery: 0 = 0x00000000 579562:2016-10-31 11:26:07 [27389] [38] DEBUG: replace_if_present_flag: 0 = 0x00000000 579563:2016-10-31 11:26:07 [27389] [38] DEBUG: data_coding: 0 = 0x00000000 579564:2016-10-31 11:26:07 [27389] [38] DEBUG: sm_default_msg_id: 0 = 0x00000000 579565:2016-10-31 11:26:07 [27389] [38] DEBUG: sm_length: 17 = 0x00000011 579566:2016-10-31 11:26:07 [27389] [38] DEBUG: short_message: 579567:2016-10-31 11:26:07 [27389] [38] DEBUG: Octet string at 0x7f1198009e40: 579568:2016-10-31 11:26:07 [27389] [38] DEBUG: len: 17 579569:2016-10-31 11:26:07 [27389] [38] DEBUG: size: 1024 579570:2016-10-31 11:26:07 [27389] [38] DEBUG: immutable: 0 579571:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 05 00 03 5e 02 02 47 47 47 47 47 47 47 47 47 47 ...^..GGGGGGGGGG 579572:2016-10-31 11:26:07 [27389] [38] DEBUG: data: 47 G 579573:2016-10-31 11:26:07 [27389] [38] DEBUG: Octet string dump ends. 579574:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP PDU dump ends. 579575:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP[6SeriesConn1]: throughput (2.00,7.00) 579576:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP[6SeriesConn1]: throughput (2.00,7.00) 579577:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP[6SeriesConn1]: Got PDU: 579578:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP PDU 0x7f11980051b0 dump: 579579:2016-10-31 11:26:07 [27389] [38] DEBUG: type_name: submit_sm_resp 579580:2016-10-31 11:26:07 [27389] [38] DEBUG: command_id: 2147483652 = 0x80000004 579581:2016-10-31 11:26:07 [27389] [38] DEBUG: command_status: 1 = 0x00000001 579582:2016-10-31 11:26:07 [27389] [38] DEBUG: sequence_number: 18465 = 0x00004821 579583:2016-10-31 11:26:07 [27389] [38] DEBUG: message_id: NULL 579584:2016-10-31 11:26:07 [27389] [38] DEBUG: SMPP PDU dump ends. 579585:2016-10-31 11:26:07 [27389] [38] ERROR: SMPP[6SeriesConn1]: SMSC returned error code 0x00000001 (Message Length is invalid) in response to submit_sm PDU. The only way I can think to not receive this error is by using max-sms-octets unless there’s a way to exclude those characters from being used in the UDH. Thank you and Regards, Arif Noor. From: Paulo Correia [mailto:paulo.corr...@pdmfc.com] Sent: Monday, October 31, 2016 6:05 PM To: Arif Noor; users@kannel.org Subject: Re: Symbols in UDH Hello Arif, It seems you are mistaking UDH with the message itself ... User Data Header is used to send extra information on the message, for example information of concatenated messages. You have UDH=05 00 03 5b 02 01 which means: * 05 - UDH data length = 5 byte * 00 - TAG 00 of first TLV of UDF (concatenated message) * 03 - Length of data of TLV - 3 bytes * 5b - Common reference of all messages of same concatenated message * 02 - Number of messages of the concatenated message (2 messages) * 01 - Index of the current message on the concatenated message (1st message) After the UDH you have the message, but there will be another message after. Do note that on the normal GMS Character table, there are characters that need an escape character and thus needing two characters to be sent. Best regards, Paulo Correia On 10/31/2016 02:28 AM, Arif Noor wrote: Hi Users, Anyone can assist on this? Thank you and Regards, Arif Noor From: users [mailto:users-boun...@kannel.org] On Behalf Of Arif Noor Sent: Thursday, October 27, 2016 12:13 PM To: users@kannel.org<mailto:users@kannel.org> Subject: Symbols in UDH This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing<http://aka.ms/LearnAboutSpoofing> Feedback<http://aka.ms/SafetyTipsFeedback> Hi Users, I’ve been seeing few symbols in the UDH that caused the MT to be rejected by the SMSC. All SMS with these |^€{}[]~ symbol in the UDH will be rejected by SMSC with below error. I read somewhere that these characters in the GSM 03.38 Extension Table that can be used for the cost of two characters. That means the message below are not 159 in length? SMS are sent by calling the CGI send sms url. Configuration as per attachment. Kannel ver : svn-r5173M 730101:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP PDU 0x7f11ac000c40 dump: 730102:2016-10-27 09:59:40 [27389] [25] DEBUG: type_name: submit_sm 730103:2016-10-27 09:59:40 [27389] [25] DEBUG: command_id: 4 = 0x00000004 730104:2016-10-27 09:59:40 [27389] [25] DEBUG: command_status: 0 = 0x00000000 730105:2016-10-27 09:59:40 [27389] [25] DEBUG: sequence_number: 7243 = 0x00001c4b 730106:2016-10-27 09:59:40 [27389] [25] DEBUG: service_type: NULL 730107:2016-10-27 09:59:40 [27389] [25] DEBUG: source_addr_ton: 0 = 0x00000000 730108:2016-10-27 09:59:40 [27389] [25] DEBUG: source_addr_npi: 1 = 0x00000001 730109:2016-10-27 09:59:40 [27389] [25] DEBUG: source_addr: "38688" 730110:2016-10-27 09:59:40 [27389] [25] DEBUG: dest_addr_ton: 1 = 0x00000001 730111:2016-10-27 09:59:40 [27389] [25] DEBUG: dest_addr_npi: 1 = 0x00000001 730112:2016-10-27 09:59:40 [27389] [25] DEBUG: destination_addr: "deleted" 730113:2016-10-27 09:59:40 [27389] [25] DEBUG: esm_class: 64 = 0x00000040 730114:2016-10-27 09:59:40 [27389] [25] DEBUG: protocol_id: 0 = 0x00000000 730115:2016-10-27 09:59:40 [27389] [25] DEBUG: priority_flag: 0 = 0x00000000 730116:2016-10-27 09:59:40 [27389] [25] DEBUG: schedule_delivery_time: NULL 730117:2016-10-27 09:59:40 [27389] [25] DEBUG: validity_period: NULL 730118:2016-10-27 09:59:40 [27389] [25] DEBUG: registered_delivery: 1 = 0x00000001 730119:2016-10-27 09:59:40 [27389] [25] DEBUG: replace_if_present_flag: 0 = 0x00000000 730120:2016-10-27 09:59:40 [27389] [25] DEBUG: data_coding: 0 = 0x00000000 730121:2016-10-27 09:59:40 [27389] [25] DEBUG: sm_default_msg_id: 0 = 0x00000000 730122:2016-10-27 09:59:40 [27389] [25] DEBUG: sm_length: 159 = 0x0000009f 730123:2016-10-27 09:59:40 [27389] [25] DEBUG: short_message: 730124:2016-10-27 09:59:40 [27389] [25] DEBUG: Octet string at 0x7f11ac000f60: 730125:2016-10-27 09:59:40 [27389] [25] DEBUG: len: 159 730126:2016-10-27 09:59:40 [27389] [25] DEBUG: size: 1024 730127:2016-10-27 09:59:40 [27389] [25] DEBUG: immutable: 0 730128:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 05 00 03 5b 02 01 52 4d 30 3a 20 53 75 62 73 63 ...[..RM0: Subsc 730129:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 72 69 70 74 69 6f 6e 20 52 65 6d 69 6e 64 65 72 ription Reminder 730130:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 2e 4e 6f 20 73 75 62 73 63 72 69 70 74 69 6f 6e .No subscription 730131:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 20 66 65 65 2e 50 72 69 63 65 3a 52 4d 35 2e 30 fee.Price:RM5.0 730132:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 30 2f 53 4d 53 20 28 45 78 63 6c 2e 20 47 53 54 0/SMS (Excl. GST 730133:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 29 2e 37 53 4d 53 2f 57 65 65 6b 2e 41 75 74 6f ).7SMS/Week.Auto 730134:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 20 72 65 6e 65 77 61 6c 20 32 39 2f 31 30 2f 32 renewal 29/10/2 730135:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 30 31 36 20 75 6e 6c 65 73 73 20 63 61 6e 63 65 016 unless cance 730136:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 6c 6c 65 64 2e 54 6f 20 63 61 6e 63 65 6c 2c 20 lled.To cancel, 730137:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 73 65 6e 64 20 53 54 4f 50 20 41 50 50 53 20 send STOP APPS 730138:2016-10-27 09:59:40 [27389] [25] DEBUG: Octet string dump ends. 730139:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP PDU dump ends. 730140:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: throughput (4.00,7.00) 730141:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: Manually forced source addr ton = 0, source add npi = 1 730142:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: Manually forced dest addr ton = 1, dest add npi = 1 730143:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: Sending PDU: 730144:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP PDU 0x7f11ac000c40 dump: 730145:2016-10-27 09:59:40 [27389] [25] DEBUG: type_name: submit_sm 730146:2016-10-27 09:59:40 [27389] [25] DEBUG: command_id: 4 = 0x00000004 730147:2016-10-27 09:59:40 [27389] [25] DEBUG: command_status: 0 = 0x00000000 730148:2016-10-27 09:59:40 [27389] [25] DEBUG: sequence_number: 7244 = 0x00001c4c 730149:2016-10-27 09:59:40 [27389] [25] DEBUG: service_type: NULL 730150:2016-10-27 09:59:40 [27389] [25] DEBUG: source_addr_ton: 0 = 0x00000000 730151:2016-10-27 09:59:40 [27389] [25] DEBUG: source_addr_npi: 1 = 0x00000001 730152:2016-10-27 09:59:40 [27389] [25] DEBUG: source_addr: "38688" 730153:2016-10-27 09:59:40 [27389] [25] DEBUG: dest_addr_ton: 1 = 0x00000001 730154:2016-10-27 09:59:40 [27389] [25] DEBUG: dest_addr_npi: 1 = 0x00000001 730155:2016-10-27 09:59:40 [27389] [25] DEBUG: destination_addr: "deleted" 730156:2016-10-27 09:59:40 [27389] [25] DEBUG: esm_class: 64 = 0x00000040 730157:2016-10-27 09:59:40 [27389] [25] DEBUG: protocol_id: 0 = 0x00000000 730158:2016-10-27 09:59:40 [27389] [25] DEBUG: priority_flag: 0 = 0x00000000 730159:2016-10-27 09:59:40 [27389] [25] DEBUG: schedule_delivery_time: NULL 730160:2016-10-27 09:59:40 [27389] [25] DEBUG: validity_period: NULL 730161:2016-10-27 09:59:40 [27389] [25] DEBUG: registered_delivery: 0 = 0x00000000 730162:2016-10-27 09:59:40 [27389] [25] DEBUG: replace_if_present_flag: 0 = 0x00000000 730163:2016-10-27 09:59:40 [27389] [25] DEBUG: data_coding: 0 = 0x00000000 730164:2016-10-27 09:59:40 [27389] [25] DEBUG: sm_default_msg_id: 0 = 0x00000000 730165:2016-10-27 09:59:40 [27389] [25] DEBUG: sm_length: 14 = 0x0000000e 730166:2016-10-27 09:59:40 [27389] [25] DEBUG: short_message: 730167:2016-10-27 09:59:40 [27389] [25] DEBUG: Octet string at 0x7f11ac000f60: 730168:2016-10-27 09:59:40 [27389] [25] DEBUG: len: 14 730169:2016-10-27 09:59:40 [27389] [25] DEBUG: size: 1024 730170:2016-10-27 09:59:40 [27389] [25] DEBUG: immutable: 0 730171:2016-10-27 09:59:40 [27389] [25] DEBUG: data: 05 00 03 5b 02 02 74 6f 20 33 38 36 38 38 ...[..to 38688 730172:2016-10-27 09:59:40 [27389] [25] DEBUG: Octet string dump ends. 730173:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP PDU dump ends. 730174:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: throughput (5.00,7.00) 730175:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: throughput (5.00,7.00) 730176:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP[3SeriesConn20]: Got PDU: 730177:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP PDU 0x7f11ac000c40 dump: 730178:2016-10-27 09:59:40 [27389] [25] DEBUG: type_name: submit_sm_resp 730179:2016-10-27 09:59:40 [27389] [25] DEBUG: command_id: 2147483652 = 0x80000004 730180:2016-10-27 09:59:40 [27389] [25] DEBUG: command_status: 1 = 0x00000001 730181:2016-10-27 09:59:40 [27389] [25] DEBUG: sequence_number: 7243 = 0x00001c4b 730182:2016-10-27 09:59:40 [27389] [25] DEBUG: message_id: NULL 730183:2016-10-27 09:59:40 [27389] [25] DEBUG: SMPP PDU dump ends. 730184:2016-10-27 09:59:40 [27389] [25] ERROR: SMPP[3SeriesConn20]: SMSC returned error code 0x00000001 (Message Length is invalid) in response to submit_sm PDU. Is there any way to avoid this symbol from being used in the UDH? Looking forward to your kind assist on this. Thank you and Regards, Arif Noor, -- [PDMFC]<https://pdmfc.com/> Paulo Correia Systems Architect PDMFC telephone:+351210337700 fax:+351213572031 email: paulo.corr...@pdmfc.com<mailto:paulo.corr...@pdmfc.com> skype: pcorreia.g4m<skype://pcorreia.g4m?chat> Rua Fradesso da Silveira n 4, Piso 1 B 1300-609 Lisboa Portugal