Sequence number problem

.NET library for SMPP protocol
Locked
Rich
Posts: 1
Joined: Fri Sep 09, 2011 12:56 pm

Sequence number problem

Post by Rich » Tue Feb 19, 2013 3:26 pm

If I prepare the submit as below to get the sequence number:

Code: Select all

 var pduBuilder = SMS.ForSubmit()
                                .Text(message.Message)
                                .From(message.Source)
                                .To(message.Destination)
                                 .DeliveryReceipt()
                                 .Coding(coding); ;

 foreach (var pdu in pduBuilder.Create(bindClient))
  {
           pdu.PriorityFlag = (byte) message.Priority;                                             

            message.Sequence = pdu.Sequence;                                   
  }

  message.TimeProcessed = DateTime.Now;

 db.SubmitChanges();       

 bindClient.SubmitAsync(pduBuilder);                                                                                                              
If the client has sent other pdu's in the meantime, like an enquirelink for example, then the actual sequence number used is different.
Then I cannot tie the submitsmresp to the sequence number to get the smsc messageid.

Is there another way to go about this?

This is pretty urgent, I am upgrading a live system with the 1.1 version and this is holding things up, a quick response will be appreciated :)
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Sequence number problem

Post by alt » Wed Feb 20, 2013 1:19 pm

Code: Select all

var pduBuilder = SMS.ForSubmit()
                                .Text(message.Message)
                                .From(message.Source)
                                .To(message.Destination)
                                 .DeliveryReceipt()
                                 .Coding(coding); ;

foreach (var pdu in pduBuilder.Create(bindClient))
  {
           pdu.PriorityFlag = (byte) message.Priority;                                             
            bindClient.SubmitAsync(pdu);
            message.Sequence = pdu.Sequence;                                   
  }

  message.TimeProcessed = DateTime.Now;

db.SubmitChanges();       
After pduBuilder.Create you need to send created PDUs.

Code: Select all

bindClient.SubmitAsync(pduBuilder);


This submit creates PDUs again.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Sequence number problem

Post by alt » Wed Feb 20, 2013 1:23 pm

And actually message variable should save list of sequence numbers. Now you store only last sequence number.
Locked