Priority flag

.NET library for SMPP protocol
Locked
KenD2
Posts: 2
Joined: Tue Dec 08, 2015 5:41 pm

Priority flag

Post by KenD2 » Tue Dec 08, 2015 5:44 pm

We've evaluating Inetlab.SMPP, and as it's worked great we're just about to purchase a license. However, in order to pass our SMSC's validation process, we need to demonstrate that we can send messages with and without the priority flag being set.

Currently, we're sending a message with the following code:

Code: Select all

  IList<SubmitSmResp> responses = SMSTransmitter.Submit(
          Inetlab.SMPP.SMS.ForSubmit()
          .Text(message.message)
          .From(message.sender)
          .To(message.number)
          .ExpireIn(TimeSpan.FromHours(message.expiry))
          .DeliveryReceipt()
         );
How can I set the priority flag when sending the message?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Priority flag

Post by alt » Tue Dec 08, 2015 9:04 pm

You can try following code:

Code: Select all

IList<SubmitSm> list = Inetlab.SMPP.SMS.ForSubmit()
          .Text(message.message)
          .From(message.sender)
          .To(message.number)
          .ExpireIn(TimeSpan.FromHours(message.expiry))
          .DeliveryReceipt()
          .Create(SMSTransmitter);

            foreach (SubmitSm sm in list)
            {
                sm.PriorityFlag = 3;
            }

IList<SubmitSmResp> responses = SMSTransmitter.Submit(list);
KenD2
Posts: 2
Joined: Tue Dec 08, 2015 5:41 pm

Re: Priority flag

Post by KenD2 » Wed Dec 09, 2015 9:59 am

Thank you, that works! Order on the way ...
Locked