SubmitText and delivery

.NET library for SMPP protocol
Locked
mobilyws
Posts: 14
Joined: Sat Jan 14, 2012 1:25 pm

SubmitText and delivery

Post by mobilyws » Mon Mar 26, 2012 9:30 am

Dear alt,

1- how could i set RegisteredDelivery when sending using SubmitText to be able to handle the delivery for long message?
2- my SMSC send DLR message for delivery messages, i attach evDeliverSm to handle it but i could not handle the message id. it come differnent that i have using SubmitSmResp, this is the log.

10:35:18 ص: Sending Data: 228200000072000000040000000070625c160005014164766963653200010139363635333531363833323700000000003132303332383130333531383030302b00010008002e0627064406470645002006350644064a002006390644064900200633064a062f0646062700200645062d0645062f
10:35:18 ص: Received Data: 50200000019800000040000000070625c16333830363931343700
10:35:18 ص: SubmitSmResp received. Status: 0, Message Id: 38069147, Sequence: 1885494294
10:35:24 ص: Received Data: 3802000000be00000005000000000000000300010139363635333531363833323700050141647669636532000400000000000000006e69643a30393339393534353033207375623a30303120646c7672643a303031207375626d697420646174653a3132303332363130333520646f6e6520646174653a3132303332363130333520737461743a44454c49565244206572723a30303020746578743a0627064406470645000e0001010006000101001e00093338303639313437000427000102
10:35:24 ص: daoud deliverytype : 4 state: ESME_ROK Sequence:3 seg:0 MessageReferenceNumber:0
10:35:24 ص: DeliverSm received : Sequence : 3 SourceAddr : 966535168327 Coding : 0 MessageText : id:0939954503 sub:001 dlvrd:001 submit date:1203261035 done date:1203261035 stat:DELIVRD err:000 text:ù'ùDùGùE message id :0939954503
10:35:24 ص: Sending Data: 3420000001180000005000000000000000300

could you suggest me

best regards
alt
Site Admin
Posts: 918
Joined: Tue Apr 25, 2006 9:45 am

Re: SubmitText and delivery

Post by alt » Wed Mar 28, 2012 7:32 pm

Dear mobilyws,

You can try following code instead of SubmitText

Code: Select all

List<SubmitSm> reqList = client.PrepareSubmit(
                    SubmitMode.ShortMessage,
                    srcTon, srcNpi, srcAdr,
                    dstTon, dstNpi, dstAdr,
                    DataCodings.Default,
                    text);

                foreach (SubmitSm sm in reqList) 
                {
                    sm.RegisteredDelivery = 1;
                }

                List<SubmitSmResp> resp = client.Submit(reqList);
DeliverSm contains really different MessageId. Are you sure that this delivery receipt belongs to submitted message? I think you'd better to ask SMSC technician it happened.

And I'm still wondering why your log contains leading bytes in received and submitted data.
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Re: SubmitText and delivery

Post by majortargets » Tue Jul 03, 2012 7:17 am

Hello Alt,

I am having this same issue, the ID that I get through resp(0).MessageId id different from what i received when I queried
Dim messageId As String = data.Receipt.MessageId in client_evDeliverSm
mobilyws
Posts: 14
Joined: Sat Jan 14, 2012 1:25 pm

Re: SubmitText and delivery

Post by mobilyws » Tue Jul 03, 2012 8:31 am

dear majortargets

when i ask SMSC technician and found that they retun it optional parameter,
try this code (ALT supported me with it)

string messageId = client.GetMessageText(data.Optional[OptionalTags.ReceiptedMessageId], data.DataCoding);

and check if they return it in optional parameter as my SMSC
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Re: SubmitText and delivery

Post by majortargets » Tue Jul 03, 2012 8:55 am

Ok, i will try it.
majortargets
Posts: 54
Joined: Mon Nov 16, 2009 3:48 pm
Location: United Kingdom
Contact:

Re: SubmitText and delivery

Post by majortargets » Tue Jul 03, 2012 4:13 pm

Hi,

Thanks, It worked.
Locked