We have to connect to a SMPP server that our SMSC operator specified to use DCS = 241 (Class1) and pack septets to octets.
We initialize the smpp client MapEncoding and build Submit_sm as below:
Code: Select all
smppClient.MapEncoding(Inetlab.SMPP.Common.DataCodings.Class1, new Inetlab.SMPP.Encodings.GSMPackedEncoding());
Inetlab.SMPP.SMS.ForSubmit()
.Coding(Inetlab.SMPP.Common.DataCodings.Class1)
.From(sourceAddr, srcTON, srcNPI)
.To(destAddr, destTON, destNPI)
.Text(text)
;
How can we convert septects to octects?If you use GSM 7bits characters (DCS = 241) then the maximum lenght of the sms should be 140 bytes (it means that maximum number of 7bits characters is 160 = 140 bytes). But you need to pack septects into octets.
Could someone give us help on this?
Thanks.