Page 1 of 1

Multy Part message asynchronously with sequence Number

Posted: Wed Dec 09, 2015 9:36 am
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

Re: Multy Part message asynchronously with sequence Number

Posted: Wed Dec 09, 2015 5:37 pm
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

Re: Multy Part message asynchronously with sequence Number

Posted: Mon Dec 14, 2015 11:54 am
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

Re: Multy Part message asynchronously with sequence Number

Posted: Mon Dec 14, 2015 5:59 pm
by alt
You can find it by sequence_number in sms_message_parts.
see also http://www.inetlab.com/support/post3135.html#p3135