Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Slow status update to 201
sp_NewPost Add Reply sp_NewTopic Add Topic
September 5, 2018
2:40 pm
Henk Helmantel
Admin
Forum Posts: 934
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

I'm sorry, I did not look properly at your license information and presumed that you had a license for the full edition. You are correct, the free update and support period for your license for the basic edition of Diafaan SMS Server expired three years ago.

Regards, Henk

September 5, 2018
12:59 pm
Roger
Guest
Guests

Thanks Henk,
I'll just check one thing more. You say
"The free update and support period of your license has just expired but you can still download and install the latest version (4.2.0.2) because it was released before the update period of your license expired."

That's probably not true as we purchased version 2.0.0.0 in year 2012 ?

Regards Roger.

September 5, 2018
11:53 am
Henk Helmantel
Admin
Forum Posts: 934
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

The HTTP Gateway will function more or less the same as your current script for the BulkSMS service, with an extra option to use HTTP callbacks for incoming messages and delivery reports.

Unfortunately, we are not able to provide scripting and programming support for Diafaan SMS Server.

Regards, Henk

September 5, 2018
8:03 am
Roger
Guest
Guests

Hi Henk,
Do you think that the HTTP Gateway with polling would manage the same way as our script does today, ie. a bit slow updating to 201?

However I would like to point out that we are very satisfied with the Diafaan product. It has managed very well, and today we send up to 3000 messages a day and most of those are long messages longer than 160 characters. The sending is quite fast and it's only the updating to status "201 Received on handset" that is a bit slow.

I will soon update to a newer version and I think I 'll do it by buying the license, to get some prolonged support-time.
If the update wont help, do you think that you could help us with the script, of course against a reasonable reward?

Regards Roger.

September 4, 2018
4:14 pm
Henk Helmantel
Admin
Forum Posts: 934
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

The HTTP Gateway was introduced in Diafaan SMS Server 3.2.0.0 and support for the BulkSMS HTTP API in version 3.3.0.0. The free update and support period of your license has just expired but you can still download and install the latest version (4.2.0.2) because it was released before the update period of your license expired.

If you don't want to use the HTTP callback method then you could implement a custom timer in the script and do the polling in the timer event without using the 'OnStatusRequest' method. This is not trivial because you have to keep a list of all the message IDs of the sent messages in the script and determine when to send a polling request to BulkSMS for the message(s) to get the status.

Regards, Henk

September 4, 2018
2:23 pm
Roger
Guest
Guests

Thanks Henk,

We do have quite an old version of Diafaan (2.0.0.0).
You say "The HTTP Gateway in Diafaan SMS Server also supports the BulkSMS HTTP service and it supports both delivery report polling and also delivery report HTTP callbacks from BulkSMS.".

Is this something that isn't available in our version?
Perhaps we wouldn't have started using a custom script if something prebuilt for BulkSMS had been available?
I have thought about updating the Diafaan program.

However although this
"Diafaan SMS Server must expose an HTTP server port to the internet..."
would perhaps offer a fast status update, it is a bit complicated compared to the polling...

Regards Roger.

September 4, 2018
1:53 pm
Henk Helmantel
Admin
Forum Posts: 934
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

If you are using a custom script for BulkSMS in a scripting Gateway and use polling to get the delivery reports then the updates of the status can be quite slow. The 'OnStatusRequest' method is called a number of times with increasing time intervals as long as the message status is not permanent. If the message status is not a permanent status after the first two requests then it will take some time before it is called again.

The HTTP Gateway in Diafaan SMS Server also supports the BulkSMS HTTP service and it supports both delivery report polling and also delivery report HTTP callbacks from BulkSMS. The last option means that Diafaan SMS Server must expose an HTTP server port to the internet but if it is implemented correctly, BulkSMS will send the delivery report to Diafaan SMS Server as soon as it is available.

Regards, Henk

September 4, 2018
12:49 pm
Roger
Guest
Guests

Hi,
I can't see any change by clearing the log, or perhaps after that I won't get any status-update, which perhaps is ok. I hope that it starts to update the status again for new messages.
However, what do you mean by "...then it is also possible that your SMS provider just delivers the delivery reports slowly". We do use BulkSMS and as I have understood, the status of each messageid is asked for by the script....
I can't see anything in the communication-log but the stop and start of the gateway.

private void OnStatusRequest(string messageId)
{
HttpWebRequest httpWebRequest;
HttpWebResponse httpWebResponse;
byte[] byteData;
string queryString;
string responseText;
string[] responseLines;
string[] responseList;

try {
queryString = "username=" + HttpUtility.UrlEncode(userName) +
"&password=" + HttpUtility.UrlEncode(password) +
"&batch_id=" + HttpUtility.UrlEncode(messageId);
httpWebRequest = (HttpWebRequest)WebRequest.Create(@"https://bulksms.vsms.net/eapi/status_reports/get_report/2/2.0");
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Method = "POST";
byteData = UTF8Encoding.UTF8.GetBytes(queryString);
httpWebRequest.ContentLength = byteData.Length;
using (Stream postStream = httpWebRequest.GetRequestStream()) {
postStream.Write(byteData, 0, byteData.Length);
}
using (httpWebResponse = (HttpWebResponse) httpWebRequest.GetResponse()) {
responseText = new StreamReader(httpWebResponse.GetResponseStream()).ReadToEnd();
responseLines = responseText.Split(new char[] {'
','
'}, StringSplitOptions.RemoveEmptyEntries);
responseList = responseLines[0].Split('|');
if (responseList[0].Trim() == "0") {
responseList = responseLines[1].Split('|');
if (responseList[1].Trim() == "11") {
PostSendResultUpdate(messageId, StatusCode.Received, "Success: Message received on handset",
"", "", DateTime.Now);
}
}
}
}
catch (Exception e) {
PostEventLog(e.Message, e.ToString(), EventLog.Error);
}
}

Regards Roger.

September 4, 2018
9:51 am
Henk Helmantel
Admin
Forum Posts: 934
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Roger,

Limiting the database size in itself does not make the file size smaller. But if you select one of the menu items 'File-Clear-... log' the whole log database file will be cleaned up and reduced in file size. If that is not sufficient to solve the problem and you don't mind losing the data in the log file then you can also try removing the database file completely.

By default, Diafaan SMS Server limits the amount of items in the log database to 10,000 records per log. If the log gets larger than 100,000 records per log there could be performance problems depending on the specs of the server. The same problem could also happen in the external SQL database of the SQL Connector. It is important to keep the database size limited so that the performance remains acceptable.

If a smaller log file size does not solve the problem then it is also possible that your SMS provider just delivers the delivery reports slowly. You can use the communication log to check when the SMS service sends the delivery report to Diafaan SMS Server.

Regards, Henk

September 3, 2018
2:38 pm
Roger
Guest
Guests

Hi,
Now as we do send several thousand of messages each day, we have got problems with very slow update from status=Sent 200 to status=Received 201. There could sometimes be 700 records with status Sent=200, and the change to 201 happens very slow, sometimes it lasts several minutes per message.
Looking at our provider pages, we see that they do change the status to "Delivered to mobile" almost immediately, ie. the info should be available.

We do use the Sql Connector.
However I'm a bit afraid that the problem could be "MessageLog.sqlite", which is 523.420 KB.
Today I tried setting on "Remove log items and events after: 1 month". This didn't decrease the size of "MessageLog.sqlite". But it saved removed items to XML-files, ie. xml-files xxxx_SendLog.xml and xxx_EventLog.xml were created.

Do you think that the messagelog.sqlite should be removed?

Some more info: We do use a "backup" gateway which is very seldom used, but it looks that those messages are very fast updated to Retrieved (201).

Regards Roger.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 494

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 497

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 771

Posts: 2663

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 934