I cant get SMS Delivery Report to work

Smpp v3.4 client

Moderator: alt

Locked
eng.mohammad
Posts: 9
Joined: Wed Oct 13, 2010 6:40 am

I cant get SMS Delivery Report to work

Post by eng.mohammad » Wed Oct 13, 2010 6:58 am

Hi,
first of all thanks for this great library, i am having problem to
acquire sms delivery report i tried every post in this forum that is
related to this topic but unfortunately no luck (although i doubt that it anything to do with luck :D ) .
my approaches was as follows :
1- i registered the value for delivery to 1 RegisteredDelivery = 1
and also tried with these parameters and without them the same
nothing
sm.Notification = IntermediateNotification.Requested
sm.MessageType = MessageTypes.SMSCDeliveryReceipt
sm.SMSCReceipt = SMSCDeliveryReceipt.SuccessFailure
the event wont fire evDeliverSm although i added a handler for it.
2- i used the
Dim qresp As QuerySmResp = client.Query(resp(0).MessageId, Byte.Parse(tbSrcAdrTON.Text), Byte.Parse(tbSrcAdrNPI.Text), tbSrcAdr.Text)
i got exception null object exception because the qresp object
doesnt have a value for the message id nor status for it empty string

the log as follows

9:43:35 AM: Sending Data: 00000010800000150000000000000002
9:43:36 AM: Sending Data: 0000007900000004000000003f93069400000030353431343937303536000
1013936363535363333323239310004000000313031303135303934323537
3030302b001100080032005400650073007400200066006f0072002000640
065006c0069007600650072007900200072006500630069006500700074
9:43:38 AM: Received Data: 0000001980000004000000003f930694303639393645334500
9:44:20 AM: Sending Data: 0000002600000003000000003f93069630363939364533450000003035343134393730353600
9:44:21 AM: Received Data: 0000001080000000000000033f930696
9:44:22 AM: Sending Data: 0000001000000015000000003f930697
9:44:23 AM: Received Data: 00000010000000150000000000000003
9:44:24 AM: Sending Data: 00000010800000150000000000000003
9:44:25 AM: Received Data: 00000010000000150000000000000004000000108000001500000000
3f930697
9:44:26 AM: Sending Data: 00000010800000150000000000000004
9:44:29 AM: EnquireLink received
9:44:31 AM: GenericNack received with status ESME_RINVCMDID
9:44:32 AM: EnquireLink received
9:44:34 AM: EnquireLink received
9:45:02 AM: Received Data: 00000010000000150000000000000005
9:45:02 AM: Sending Data: 00000010800000150000000000000005
9:45:02 AM: EnquireLink received


Really sorry for this long post ,
I appreciate any help
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Sat Oct 16, 2010 1:50 pm

1. In order to request delivery receipt from SMSC you need to set only
sm.RegisteredDelivery = 1;

in your log for SubmitSm packet i found RegisterDelivery=0x11;

Please also make sure that you bind to SMSC in Transceiver mode.

2. It looks like SMSC that you connect to doesn't support QuerySm command.
eng.mohammad
Posts: 9
Joined: Wed Oct 13, 2010 6:40 am

Post by eng.mohammad » Sun Oct 17, 2010 9:42 am

alt wrote:1. In order to request delivery receipt from SMSC you need to set only
sm.RegisteredDelivery = 1;

in your log for SubmitSm packet i found RegisterDelivery=0x11;

Please also make sure that you bind to SMSC in Transceiver mode.

2. It looks like SMSC that you connect to doesn't support QuerySm command.
Hi,
Thanks ALt,
You really helped me , i done all what you said at the beginning before i
posted the issue , but i was surprised and you were right they don't
support QuerySm , and they only support to send DLR message can you guide me what to do what are the steps that i should do to parse this DLR
what event should i handle what is required overall.
I have another issue i cant send MultiSubmit although i used the code
written previously in this forum but for a older version is it changed , if
possible can you provide me with sample code for submitting 2 msgs only
using multi submit ?
Thanks Again
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Mon Oct 18, 2010 10:25 am

1. in order to receive deliver_sm messages you need to attach to the event evDeliverSm. There you need to check message type so that you know if it is incomming message from mobile phone or delivery receipt

Code: Select all

if (data.MessageType  == MessageTypes.SMSCDeliveryReceipt) 
{
     // delivery receipt
}

2.

Code: Select all

            List<DestinationAddress> msisdnList = new List<DestinationAddress>();

            DestinationAddress da1 = new DestinationAddress();
            da1.Address = "11111111111";
            da1.Npi = byte.Parse(tbDestAdrNPI.Text);
            da1.Ton = byte.Parse(tbDestAdrTON.Text);
            msisdnList.Add(da1);

            DestinationAddress da2 = new DestinationAddress();
            da2.Address = "22222222222";
            da2.Npi = byte.Parse(tbDestAdrNPI.Text);
            da2.Ton = byte.Parse(tbDestAdrTON.Text);
            msisdnList.Add(da2);

            List<SubmitMulti> sMulti = client.PrepareSubmit(SubmitMode.ShortMessage, byte.Parse(tbSrcAdrTON.Text), byte.Parse(tbSrcAdrNPI.Text), tbSrcAdr.Text, msisdnList, DataCodings.UCS2, tbSend.Text);
            client.SubmitAsync(sMulti);
eng.mohammad
Posts: 9
Joined: Wed Oct 13, 2010 6:40 am

Post by eng.mohammad » Wed Oct 20, 2010 5:35 am

alt wrote:1. in order to receive deliver_sm messages you need to attach to the event evDeliverSm. There you need to check message type so that you know if it is incomming message from mobile phone or delivery receipt

Code: Select all

if (data.MessageType  == MessageTypes.SMSCDeliveryReceipt) 
{
     // delivery receipt
}

2.

Code: Select all

            List<DestinationAddress> msisdnList = new List<DestinationAddress>();

            DestinationAddress da1 = new DestinationAddress();
            da1.Address = "11111111111";
            da1.Npi = byte.Parse(tbDestAdrNPI.Text);
            da1.Ton = byte.Parse(tbDestAdrTON.Text);
            msisdnList.Add(da1);

            DestinationAddress da2 = new DestinationAddress();
            da2.Address = "22222222222";
            da2.Npi = byte.Parse(tbDestAdrNPI.Text);
            da2.Ton = byte.Parse(tbDestAdrTON.Text);
            msisdnList.Add(da2);

            List<SubmitMulti> sMulti = client.PrepareSubmit(SubmitMode.ShortMessage, byte.Parse(tbSrcAdrTON.Text), byte.Parse(tbSrcAdrNPI.Text), tbSrcAdr.Text, msisdnList, DataCodings.UCS2, tbSend.Text);
            client.SubmitAsync(sMulti);
Dear Alt,
I attached the event but still i cant get it to Fire i dont know why ,
i went back to the SMSC he said they send the delivery receipt as
DLR message!!!
and regrading the code you wrote i tried no use , the code executes with
errors but the messages are not delivered and according to the SMSC
they say they support multi submit.
I dont know what do more it seems its a dead end.

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

Post by alt » Sat Oct 23, 2010 2:13 pm

1. In SmppClient you need to attach to the event evReceiveData. Then send SubmitSm and store MessageId from SubmitSmResp.
After that you need to get log from SMSC where they send DeliverSm receipt with your MessageId in the field ShortMessage f.i "id:123 sub:001 dlvrd:001 submit date:1010201139 done date:1010201139 stat:DELIVRD err:000 Text:Test"

2. What errors you have with code above?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Fri Oct 29, 2010 8:25 pm

Please also ask how SMSC sends delivery receipt in DELIVER_SM or DATA_SM message?
Locked