Hi,
Is there any way to retrieve the ServiceType field from a DeliverSm object (just like in SubmitSm)?
Thanks.
Service type
Moderator: alt
ServiceType property has been added.
Please download http://www.inetlab.ru/Download/SmppClient.zip
Please download http://www.inetlab.ru/Download/SmppClient.zip
Thanks very much.
I had found a workaround (posted below in case it's useful to anyone), but having it on the library is much handier.
I had found a workaround (posted below in case it's useful to anyone), but having it on the library is much handier.
Code: Select all
string serviceType = GetServiceType(data.PacketBytes);
...
private string GetServiceType( byte[] data )
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
for(int i = 16; i < data.Length; i++)
{
if(data[i] == 0x00) break;
sb.Append(System.Text.Encoding.Default.GetString(data, i, 1));
}
return sb.ToString();
}