Support forum

Advanced Search

— Forum Scope —

— Match —

— Forum Options —

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

September 15, 2015
1:36 pm
Henk Helmantel
Forum Posts: 1502
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Douglas,

The light edition of Diafaan SMS Server can only send messages to the HTTP API of Clickatell. In the basic- and full edition of Diafaan SMS Server you can use a Scripting Gateway to add support for HTTP API's of other SMS services but this requires scripting in C# or Visual Basic.NET and some programming experience.

In the Scripting Pack on the download page of our website, you can find a script for the Scripting Gateway called 'SimpleHTTPGateway.cs'. This script can be used as a basis for a customized script. You only have to change the 'OnMessageToSend' function in the script to make it suitable for the HTTP API you use. For your example the 'OnMessageToSend' function can be changed to the following (untested) code:

private void OnMessageToSend(string recordId, string toAddress, string fromAddress,
string message, string messageType)
String URI = "";

try {
// Add message text to the URI
URI += "&mensagem=" + System.Web.HttpUtility.UrlEncode(message);
// Add recipient number to the URI
URI += "&destinario=" + System.Web.HttpUtility.UrlEncode(toAddress);

// Send the web request URI to the web server with a GET request
System.Net.WebRequest req = System.Net.WebRequest.Create(URI);
System.Net.WebResponse resp = req.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
string response = sr.ReadToEnd().Trim(); //
PostSendResult(recordId, "", StatusCode.Sent, "", "", "", false);
catch (Exception e) {
PostSendResult(recordId, "", StatusCode.SendError, "Error: " + e.Message, "", "", false);

Regards, Henk

September 13, 2015
8:23 pm
douglas specht

I have a provider that sends sms for me, and the call is via http as follows.
I downloaded the trial version and would like to know if it is possible to send and receive at diafaan making the call as follows.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 529

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 677

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1149

Posts: 3928

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1502