Delivery Report Data

.NET library for SMPP protocol
Locked
james
Posts: 5
Joined: Thu Dec 02, 2010 3:15 pm

Delivery Report Data

Post by james » Thu Dec 09, 2010 3:55 pm

Hi,

The handler for evDeliverSm has the following signature:

private void OnDeliverSm(object sender, DeliverSm data)

1) In this context what is data.Receipt.ErrorCode?
2) if we call
string messageText = data.Client.GetMessageText(data.UserDataPdu.ShortMessage, data.DataCoding);

we get a string like
MessageText : id:3073b831 sub:001 dlvrd:001 submit date:1012092304 done date:1012092304 stat:DELIVRD err:000 text: Text:é

is there any other way to obtain the error value which in this string is presented as err:000 ?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Delivery Report Data

Post by alt » Thu Dec 09, 2010 3:59 pm

You received delivery receipt. So data.Receipt should be not null.

data.Receipt.ErrorCode is the same as "err:000"
james
Posts: 5
Joined: Thu Dec 02, 2010 3:15 pm

Re: Delivery Report Data

Post by james » Fri Dec 10, 2010 2:29 pm

Hi,

Something strange is happening here.

We are using the following code to try and get the ERR: xxx value.

private void OnDeliverSm(object sender, DeliverSm data)
{
if (data != null)
{
string messageId = data.Receipt.MessageId.Trim(' ', '\0');

string message = string.Format(
"DLR: messageId={0}, status={1}, DLR={2}, ErrorCode={3}",
messageId, data.Status, data.Receipt.State, data.Receipt.ErrorCode);

this.LogInfo(message);

Debug.WriteLine(
message);

InvokeMessageDelivered(messageId, data.Receipt.State, data.Receipt.ErrorCode);
}
}

On one computer, the ErrorCode is always Null, on my computer it displaying: DELIVRD * UNDELIV like this:

MessageProcessing.SMSTransceiver - DLR: messageId=62648ac6, status=ESME_ROK, DLR=Undeliverable, ErrorCode=UNDELIV

Can you help at all? I have checked the SMPP PDU Deliver_SM, and everything looks fine there...
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Delivery Report Data

Post by alt » Sun Dec 19, 2010 5:59 pm

You was right, ErrorCode had bug.
Please try version 1.0.4
Locked