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
Scripting Gateway Plugin not found
sp_NewPost Add Reply sp_NewTopic Add Topic
January 26, 2011
9:28 pm
Henk Helmantel
Guest
Guests

What happens if you stop and start the Service? (Use the Stop and Start buttons in the Service control).

With regard to your second question, the Web Connector cannot be used to forward a message to different URL's. You can use two Web Connectors that each forwards the message to a different URL but that only makes sense if you use multiple GSM modems and want to forward the message from modem 1 to URL 1 and from modem 2 to URL 2. Filtering is not possible in this scenario.

If you want to forward messages to different URL's depending on their content or originator number you need to use a Scripting Connector. Below you find an example of a (partial and untested!) script that forwards a message to two URL's. One note: if you want to use this code you have to add the line:
System.Web.dll
to the ReferenceList in the Advanced Properties of the Scripting Gateway.

using System.Web;
using System.Net;

private void OnMessageReceived(string fromAddress, string toAddress,
string message, string messageType,
string messageId, string smsc, string pdu,
string gateway, DateTime sendTime,
DateTime receiveTime)
{
string url = "";

try{
if (message.StartsWith("URL1")) {
url = @"http://www.url1.com?from="+HttpUtility.UrlEncode(fromAddress);
url += @"&message="+HttpUtility.UrlEncode(message);
}
else {
url = @"http://www.url2.com?from="+HttpUtility.UrlEncode(fromAddress);
url += @"&message="+HttpUtility.UrlEncode(message);
}
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
response.GetResponseStream();
}
catch (Exception e) {
PostEventLog("Cannot forward the message to URL: "+url, e.Message, EventLog.Error);
}
}

January 26, 2011
7:27 pm
Shalabh
Guest
Guests

When setting up 2nd Gateway (Scripting) -- Above error is thrown by the interface.
Also following folder is empty -- C:\Program Files\Diafaan SMS Server\Plugins

Another Qs:I have connected one GSM Phone Modem to the Machine and have added "Web Connector" to the Gateway. In this combo System gives option of "forwarding" the SMS to a URL.
Is it possible to add 2nd URL for forwarding.
That is -- We want to filter the incoming SMS and forward it to either of the URL.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 494

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 365

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 533

Posts: 1849

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 554