I want to report an issue in Inetlab.SMPP version 2.6.10 (latest release on NUGET).
The issue is when a message is using GSM 7-bit encoding, is over 160 characters in length and two or more extended-character-set characters are in the second-half of the message. The length of the first PDU becomes 154 characters in length which is subsequently rejected by the network.
To illustrate I wrote this function
Code: Select all
private static void runTest(string text_message)
{
var _smpp = new SmppClient();
var em = new EncodingMapper();
var coding = DataCodings.Default;
var sms_pdus = SMS.ForSubmit() // create pdu(s) for sms message
.From("+353870000000")
.To("+353870000000")
.Coding(coding)
.Text(text_message)
.DeliveryReceipt()
.Create(_smpp);
foreach (var Sm in sms_pdus)
{
var message = Sm.GetMessageText(em);
Console.Write("Message length: ");
Console.WriteLine(message.Length.ToString());
}
return ;
}
Code: Select all
// This works correctly
runTest("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
// This does not work with the extra { }
runTest("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{}");
The second yields text lengths of 154 and 30 which is invalid.
Is there something I can do as a work around?
many thanks
Dermot