Multy Part message asynchronously with sequence Number

.NET library for SMPP protocol
Locked
ashish
Posts: 9
Joined: Wed Dec 09, 2015 9:29 am

Multy Part message asynchronously with sequence Number

Post by ashish »

i send message with below code

//code for send multiple message asynchronously
ISubmitSmBuilder builder = SMS.ForSubmit()
.Text(objSMS.Message)
.From(SourcePrefix + (int)objSMS.messageType, (byte)SourceTon, (byte)SourceNPI)
.To(DestinationPrefix + objSMS.MobileNo, (byte)DestinationTon, (byte)DestinationNPI)
.Coding((DataCodings)Enum.Parse(typeof(DataCodings), objSMS.messageType.ToString()))
//Change SubmitSm sequence to your own number.
//.Set(delegate(SubmitSm sm) { sm.Sequence = Convert.ToUInt32(objSMS.ID); })
;
but when we set Sequence with multy part sms it's not working properly
so how can we identify message in client_evSubmitComplete Event
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: Multy Part message asynchronously with sequence Number

Post by alt »

Hi ashish,

It is not allowed to set same sequence number for all parts of concatenated messages. Each part should get its own sequence number.
Actually you have one to many relation. One objSMS.ID has many sequence numbers from SubmitSm and corresponding MessageIds from SubmitSmResp.

In database you could have two tables:
sms_messages
- ID
- Text
- Phone

sms_message_parts
- sms_messages.ID
- sequence_number
- MessageId from SMSC
- MessageStatus
ashish
Posts: 9
Joined: Wed Dec 09, 2015 9:29 am

Re: Multy Part message asynchronously with sequence Number

Post by ashish »

as you suggest we create two table
sms_messages and sms_message_parts

but how we can find sms_message.id from submitcomplate event and map with sms_message_parts
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: Multy Part message asynchronously with sequence Number

Post by alt »

You can find it by sequence_number in sms_message_parts.
see also http://www.inetlab.com/support/post3135.html#p3135
Locked