Support forum
You can call the 'OnStatusRequest' method in the script immediately after sending the message, or after a small delay with a 'Thread.Sleep(2000);' call if you need to wait 2 seconds for the status to update on the SMS service.
Using 'Thread.Sleep(2000)' causes the script to pause and decreases message throughput, a better (but slightly more complicated) way to wait a few seconds before calling the 'OnStatusRequest' method is to use a timer or the 'Task.Delay' method. With both methods the script keeps processing the outgoing messages during the delay. The 'Task.Delay' method is probably the easiest to implement.
Regards, Henk
6:50 pm
Hi team, hoping you're going well in this pandemic times, regarding to the DLR in my script, now I can get the DLR from my provider, but it is taking too much time to obtain, like 30 seconds, when I do this in a python script I can get the DLR in 2 seconds, what I'm doing bad, do you need the code?
Regards
Ricardo
Hello Ricardo,
When you set the 'sendStatusRequest' parameter of the 'PostSendResult' method in the script to 'true', the script will call the 'OnStatusRequest' method one or more times in increasing time intervals until you call the 'PostSendResultUpdate' method. In the 'sendStatusRequest' method, you can send a DLR request to the SMS service and set the final status of the message when it is available.
You can find and example on how to use the 'OnStatusRequest' method in the 'BulkSMS.com.cs' script in the Scripting Pack on the download page of this website.
Regards, Henk
Most Users Ever Online: 529
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 672
Members: 0
Moderators: 0
Admins: 1
Forum Stats:
Groups: 2
Forums: 3
Topics: 1141
Posts: 3899
Newest Members:
, Henk HelmantelAdministrators: Henk Helmantel: 1488