Page 1 of 1

Delivery Report Data

Posted: Thu Dec 09, 2010 3:55 pm
by james
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 ?

Re: Delivery Report Data

Posted: Thu Dec 09, 2010 3:59 pm
by alt
You received delivery receipt. So data.Receipt should be not null.

data.Receipt.ErrorCode is the same as "err:000"

Re: Delivery Report Data

Posted: Fri Dec 10, 2010 2:29 pm
by james
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...

Re: Delivery Report Data

Posted: Sun Dec 19, 2010 5:59 pm
by alt
You was right, ErrorCode had bug.
Please try version 1.0.4