SMPP Server response custom message ID

.NET library for SMPP protocol
Locked
thangweb
Posts: 6
Joined: Thu Jun 23, 2016 2:57 am

SMPP Server response custom message ID

Post by thangweb » Fri Jul 29, 2016 3:05 am

Dear alt,

Can you tell me how to response custom message ID without using SMS.ForDeliver method? Now I am using SMS.ForDeliver method to response a client the message ID.

Plz help me ASAP. Thanks a lot.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: SMPP Server response custom message ID

Post by alt » Sat Jul 30, 2016 2:59 pm

Do you want to send SubmitSmResp or delivery receipt?
thangweb
Posts: 6
Joined: Thu Jun 23, 2016 2:57 am

Re: SMPP Server response custom message ID

Post by thangweb » Mon Aug 01, 2016 3:02 am

Dear Alt,

I send you a mail to let you understand my request. Please check and support me. Thanks
thangweb
Posts: 6
Joined: Thu Jun 23, 2016 2:57 am

Re: SMPP Server response custom message ID

Post by thangweb » Tue Aug 02, 2016 4:07 am

In this picture below, I want to response in step 2 (2. Response Message ID) without send Delivery Report. Currently, I create SMPP Server with Delivery Report method like your example (below). When I used this method, my partner can't not receive the second DR (6. send delivery report) and I have read some open source, they always have a event submitsm_response. Can you advise me this event in Inetlab? Thanks a lot.

Image

Example Coding:

client.DeliverAsync(
SMS.ForDeliver()
.From(message.SourceAddr, message.SourceAddrTon, message.SourceAddrNpi)
.To(message.DestAddr, message.DestAddrTon, message.DestAddrNpi)
.Receipt(new Receipt
{
DoneDate = DateTime.Now,
State = MessageState.Delivered,
MessageId = message.MessageId,
ErrorCode = "0",
SubmitDate = message.SubmitDate,
Text = message.Text
})
);
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: SMPP Server response custom message ID

Post by alt » Tue Aug 02, 2016 5:37 pm

It is only an example in SmppServerDemo that shows how you can send delivery receipt. In real smpp gateway you need to send it later when you get one from SMSC.
In this demo application in the method

Code: Select all

private void server_evClientSubmitSm(object sender, SmppServerClient client, Inetlab.SMPP.PDU.SubmitSm data)
You can find the comment that describes how you can specify you own MessageId in SubmitSmResp.

Code: Select all

// You can set your own MessageId
 data.Response.MessageId = "11";
Also here you can modify any property of the response.
SubmitSmResp will be sent right after this method (evSubmitSm event handler)
Locked