Delivery Report and Event Handlers
Added by pradip35 almost 5 years ago
I tried to send an approximately 600 character long message through your demo project
and I got a MessageReferenceNumber like 23,24,25,26
also I got the delivery report four times at random.
I used the following event handler:
private void OnMessageReceived(object sender, MessageReceivedEventArgs e) {
txtMessageLog.BeginInvoke(displayMessageLog, e);
MessageBox.Show(e.Message.ReferenceNo.ToString());
}
I just want to ask 2 questions:
1.Can I get the delivery report just once for a single message?
2.Is there any other event handler for delivery report or we have to work on with the MessageReceivedEventArgs only?
Replies (18)
RE: Delivery Report and Event Handlers - Added by admin almost 5 years ago
Hi,
1. Even though you received the large message as 1, actually your phone received 3 messages, each around 200 characters for ASCII message. What you should do is match the ref no in the delivery reports with the ref no you get when sending the messages. When you receive the delivery reports for all, then only you can confirm that the message is sent successfully.
2. Yes. Use the MessageReceived event to get the delivery report. YOu should be able to tell what kind of message is received through the message type indicator.
Thanks
Regards
admin
RE: Delivery Report and Event Handlers - Added by pradip35 almost 5 years ago
Thanx a lot for quick reply
one more thing
Can you please provide me the BulkSMS Sender in VB.Net.
RE: Delivery Report and Event Handlers - Added by admin almost 5 years ago
Hi,
Right now for BulkSMS the source code is only available in C#. We will let you know when we have the VB.NET version ready.
Meantime, you can also refer to the sample VB.NET source code provided if you want to use it in VB.NET.
Thanks
Regards
admin
RE: Delivery Report and Event Handlers - Added by pradip35 almost 5 years ago
OK Thnx 4 ur reply
For your knowledge I have converted BulkSMS sender to VB.Net
if you want this I will send you
And one more doubt
In your latest version 1.61 "MessagingToolkit.BulkGateway"
I have uncommented following line for activating Delivery report request but it is not enabling Delivery notification
// Uncomment this part to enable message receiving
mobileGateway.MessageReceived += new MessageReceivedEventHandler(OnMessageReceived);
mobileGateway.EnableNewMessageNotification(MessageNotification.StatusReport);
mobileGateway.PollNewMessages = true;
But
following code is working very fine in your "MessagingToolkit.Core.Utilities"
sms__1.StatusReportRequest = MessageStatusReportRequest.SmsReportRequest
Please check and reply
RE: Delivery Report and Event Handlers - Added by admin almost 5 years ago
Hi,
Please attached the log file here so that we can further investigate.
Thanks
Regards
admin
RE: Delivery Report and Event Handlers - Added by pradip35 almost 5 years ago
Dear Admin,
I have attached the file for you.
messagingtoolkit_201210.log (1.5 kB)
RE: Delivery Report and Event Handlers - Added by admin almost 5 years ago
Hi,
From the log file, I can see that message indication command is sent to enable the library to receive delivery report and incoming message, but there is no SMS sent.
Can you perform a full test and attach the log file?
If you have enable delivery report during message sending, the delivery report indication should come in and it should be logged in the application log file.
Thanks
Regards
admin
RE: Delivery Report and Event Handlers - Added by pradip35 almost 5 years ago
Dear Admin,
Attached log file
I have uncommented following line for activating Delivery report request but the Delivery notification has not yet been enabled
// Uncomment this part to enable message receiving
mobileGateway.MessageReceived += new MessageReceivedEventHandler(OnMessageReceived);
mobileGateway.EnableNewMessageNotification(MessageNotification.StatusReport);
mobileGateway.PollNewMessages = true;
And I added a statement:
MessageBox.Show("DeliveryNotification");
in following Sub but still I was not able to get the messagebox
private void OnMessageReceived(object sender, MessageReceivedEventArgs e)
{
MessageInformation sms = (MessageInformation)e.Message;
string msg = "Received message from " + sms.PhoneNumber + ". Content: " + sms.Content;
Logger.LogThis(msg, LogLevel.Info);
MessageBox.Show("DeliveryNotification");
}
messagingtoolkit_201210.log (1.4 kB)
RE: Delivery Report and Event Handlers - Added by admin almost 5 years ago
Hi,
In your SMS, i don't see that you enable the status report request. Can you check if you do this in your SMS object?
<< SmsSubmitPdu >>
Raw Pdu: 0791194943909979117B0A81491311546900000B05C8329BFD06
SMSC Address: [Length: 7 (07) octets, Type: 91 (10010001), Address: 919434099997]
First Octet: 11 [TP-MTI: (SMS-SUBMIT), TP-VPF: (validity format, integer, TP-UDHI: (no UDH)]
Message Reference: 7B
Destination Address: [Length: 10 (0A), Type: 81 (10000001), Address: 9431114596]
TP-PID: 00 (00000000)
TP-DCS: 00 (7-bit GSM Alphabet) (00000000)
TP-VPF: 1 hours
User Data Length: 5 (05) septets
User Data (pdu) : C8329BFD06
User Data (decoded): [Hello]
RE: Delivery Report and Event Handlers - Added by pradip35 almost 5 years ago
I dont know how to check that.Please guide me ahead.
RE: Delivery Report and Event Handlers - Added by pradip35 almost 5 years ago
Thank You Sir,
Finally
I got it......
RE: Delivery Report and Event Handlers - Added by omoridi about 4 years ago
Hi,
I have same problem,
My Report Status Never Raised.
I Check with below code and pooling. in both I don't received any status report event.
mobileGateway.Configuration.DeleteReceivedMessage = true;
mobileGateway.DisableMessageNotifications();
mobileGateway.EnableNewMessageNotification(MessageNotification.StatusReport | MessageNotification.ReceivedMessage);
mobileGateway.PollNewMessages = false;
mobileGateway.MessageReceived += OnMessageReceived;
mobileGateway.MessageSending += OnMessageSending;
mobileGateway.MessageSendingFailed += OnMessageFailed;
mobileGateway.MessageSent += OnMessageSent;
mobileGateway.CallReceived += OnCallReceived;
mobileGateway.CallDialled += CallDialled;
mobileGateway.GatewayDisconnected += OnGatewayDisconnect;
mobileGateway.WatchDogFailed += OnWatchDogFailed;
mobileGateway.UssdResponseReceived += OnUssdResponseReceived;
TEST_201306.log - Log (8.6 kB)
RE: Delivery Report and Event Handlers - Added by admin about 4 years ago
Hi,
Can you try the followings
// Comment out this line
// result = mobileGateway.EnableNewMessageNotification(MessageNotification.StatusReport);
// Disable incoming notifications since we want to use polling
result = mobileGateway.DisableMessageNotifications();
// Incoming SMS will be polled periodically
mobileGateway.PollNewMessages = true;
From the log file, I can see that the status report is received. Somehow the status is already in a READ status, that is why it is not processed successfully.
By the way, what modem are you using?
Thanks
Regards
admin
RE: Delivery Report and Event Handlers - Added by admin about 4 years ago
Hi,
Alternatively try with the attached patches to handle the status report with read status to see if it works for you.
Thanks
Regards
admin
MessagingToolkit.Core.dll (681.5 kB)
MessagingToolkit.Pdu.dll (148 kB)
RE: Delivery Report and Event Handlers - Added by omoridi about 4 years ago
it can't send message!
Sending message: Unsupported feature: SendSmsFeature: Send SMS (Method not found: 'Void MessagingToolkit.Pdu.SmsSubmitPdu.set_ValidityPeriod(Int32)'.)
my Modem is wavecom fastrack wismo
this image sample http://ts1.mm.bing.net/th?id=H.5044934040094916&pid=15.1
TEST_201306.log (4 kB)
RE: Delivery Report and Event Handlers - Added by admin about 4 years ago
Are you using the pdu library as attached ?
RE: Delivery Report and Event Handlers - Added by omoridi about 4 years ago
yes, i copy that files and show me that errors
RE: Delivery Report and Event Handlers - Added by admin about 4 years ago
Hi,
There is a change in the method signature which causes this error. Have you tried to rebuild the application and see if the error still persists?
Alternatively we shall release the new version soon. The new version should contains the patch for this defect.
Thanks
Regards
admin
(1-18/18)