Session Number
Session Number
How do I get Session Number from DeliverSm, Am processing USSD requests via SMPP
Re: Session Number
Hello ndiefi,
USSD over SMPP very oft is vendor specific. Try to check description from provider. I can try to help you if you send me this description.
You can also try following code
USSD over SMPP very oft is vendor specific. Try to check description from provider. I can try to help you if you send me this description.
You can also try following code
Code: Select all
public void GetItsSessionInfoFromDeliverSm(DeliverSm deliverSm)
{
byte[] bytes = deliverSm.Optional[OptionalTags.ItsSessionInfo];
ushort id = GetUssdSessionId(bytes);
bool end = GetUssdSessionEnd(bytes);
}
private ushort GetUssdSessionId(byte[] bytes)
{
return BitConverter.ToUInt16(new[] { bytes[0], (byte)(bytes[1] >> 1) }, 0);
}
private bool GetUssdSessionEnd(byte[] bytes)
{
return (bytes[1] & 0x1) == 0x1;
}