How To get PDU created whle sending SubmitSM and on Submitsm Response

.NET library for SMPP protocol
Locked
vineet
Posts: 28
Joined: Sat May 06, 2017 7:06 pm

How To get PDU created whle sending SubmitSM and on Submitsm Response

Post by vineet » Fri Sep 18, 2020 7:34 am

Hi,

byte srcTon = byte.Parse("0");
byte srcNpi = byte.Parse("0");
string srcAdr = "xxxxx";

byte dstTon = byte.Parse("1");
byte dstNpi = byte.Parse("1");
string dstAdr = "xxxxxxx";

ISubmitSmBuilder builder = SMS.ForSubmit()
.From(srcAdr, srcTon, srcNpi)
.To(dstAdr, dstTon, dstNpi)
.Coding(coding)
.Text("Heello")
.ExpireIn(TimeSpan.FromDays(2))
.DeliveryReceipt();
SubmitMode mode = SubmitMode.ShortMessage;
switch (mode)
{
case SubmitMode.Payload:
builder.MessageInPayload();
break;
case SubmitMode.ShortMessageWithSAR:
builder.ConcatenationInSAR();
break;
}

//Here before submiting can we get the pdu created

_client.SubmitAsync(builder);

And is there any function to decode pdu to object.

Thanks
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: How To get PDU created whle sending SubmitSM and on Submitsm Response

Post by alt » Tue Sep 22, 2020 8:34 pm

Locked