Setting messageId on Server Site

.NET library for SMPP protocol
Locked
marko
Posts: 2
Joined: Mon Apr 02, 2012 9:35 am

Setting messageId on Server Site

Post by marko » Mon Apr 02, 2012 9:48 am

Hello,

I'am trying to use SMPP Client and Server. When I post a message from Client I hadle receive (Server) with ClientSubmitSmEventHandler. But after then I need to set messageId and response to client. Where and how can I do it on Server?? Later I need post delivery report with this messageId.
Thank you.
marko
Posts: 2
Joined: Mon Apr 02, 2012 9:35 am

Re: Setting messageId on Server Site

Post by marko » Wed Apr 04, 2012 8:18 am

Ok,

I found solution:

Code: Select all

void server_evClientSubmitSm(object sender, SmppServerClient client, Inetlab.SMPP.PDU.SubmitSm data)
{
    data.Response.MessageId = "1";
 }
Is it OK?
But what is about Sequence. I do like in demo.
I set SubmitSm.Sequence=1 and on client_evSubmitComplete I received correct Sequence but on client_evQueryComplete I received wrong Sequence

Thnaks.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Setting messageId on Server Site

Post by alt » Mon Apr 09, 2012 4:17 pm

Yes, this code should work.

SubmitSm Sequence and QuerySm Sequence must be different in one SMPP session.
Alon
Posts: 8
Joined: Mon May 07, 2012 4:26 pm

Re: Setting messageId on Server Site

Post by Alon » Mon May 28, 2012 2:33 pm

Hi Alt,

Can you elaborate a bit about this subject? I'm evaluating your product and trying to understand if it suits my needs...
The scenario I'm looking for is storing every outgoing SMS (MT) in my DB and update its status (DELIVER_SM) as it changes. What will be the best way to do it?
I mean, should I assign an ID before submitting the SMS (is it 'Sequence'? of 'SubmitSm' or 'SubmitSmResp'? Can you post a sample?) or should I use the SMSC 'MessageId' (How can it be done? I mean, how do I know to which SMS the 'MessageId' belongs when it comes back from the SMSC after submitting?)
This needs to work for both single SMS and Destination List, samples for both cases will be very helpful.

Related request: I know it is a lot of work, but as the demo project is rather basic, is it possible to attached code samples and a bit of more detailed explanation about the scenario used for each of the members in the documentation? As I'm not coming directly from the SMPP world, many of the members are not clear to me even if they have some short description, while others do not have any description...

Thank you!
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Setting messageId on Server Site

Post by alt » Mon May 28, 2012 7:49 pm

Hi Alon,

Does this post helps to understand?
post1681.html#p1681

in database you may have tables outgoing_messages and outgoing_parts. They are connected one to many, because long messages > 140 bytes are sent as concatenated parts.
In outgoing_parts you need to store Sequence of SubmitSm and MessageId of SubmitSmResp. When you receive DeliverSm receipt you can update delivery status in table outgoing_parts by MessageId. When you submit to destination list you need to process SubmitMultiResp.UnsuccessAddresses.

1. List<SubmitSm> list = PrepareSubmit(...)
2. store all SubmitSm with its sequence_number to database
3. client.Submit(list);
4. in event handler of evSubmitComplete update MessageId by sequence_number
5. in event handler of evDeliverSm check that delivery receipt is received data.MessageType == MessageTypes.SMSCDeliveryReceipt
and update delivery status from data.Receipt.State by data.Receipt.MessageId.

Yes, you are right documentation must contain more examples.
Alon
Posts: 8
Joined: Mon May 07, 2012 4:26 pm

Re: Setting messageId on Server Site

Post by Alon » Tue May 29, 2012 3:48 am

Thank you!
imikanwar
Posts: 1
Joined: Fri Dec 13, 2013 7:24 am

Re: Setting messageId on Server Site

Post by imikanwar » Fri Dec 13, 2013 7:27 am

I received error on below messages when i configure new version from old version of Inetlab.SMPP 1.0.0.0 dll file. please check below, and give me the right solutions soon as possible.
paul111
Posts: 1
Joined: Thu Jan 23, 2014 12:34 pm

Re: Setting messageId on Server Site

Post by paul111 » Thu Jan 23, 2014 12:45 pm

void server_evClientSubmitSm(object sender, SmppServerClient client, Inetlab.SMPP.PDU.SubmitSm data)
{
data.Response.MessageId = "1";
}


i use it but it is not working properly


www.solitairechamp.biz
Locked