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.
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?
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.
Hi, I'm trying to make an Scripting gateway to connect to an HTTP service, my question is how can I request the DLR on this service like 10 seconds after sending an SMS, in this service I must send and HTTP GET request to obtain the DLR
Most Users Ever Online: 494
Currently Browsing this Page:
Guest Posters: 578
Newest Members:, Henk Helmantel
Administrators: Henk Helmantel: 1196