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
forward messages
sp_NewPost Add Reply sp_NewTopic Add Topic
August 10, 2020
7:14 am
Remie van de Zande
Guest
Guests

Hi thank you very much, this will do the trick 🙂

August 9, 2020
3:24 pm
Henk Helmantel
Admin
Forum Posts: 1196
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Remie,

private void OnMessageReceived(string fromAddress, string toAddress, string message, string messageType,
string messageId, string smsc, string pdu, string gateway,
DateTime sendTime, DateTime receiveTime)
{
if (fromAddress == "+316123123123") {
PostSendMessage("+316789789789", fromAddress, message, messageType, "", "", "", 0);
PostSendMessage("+316987987987", fromAddress, message, messageType, "", "", "", 0);
}
else if (fromAddress == "+316321321321") {
PostSendMessage("+316456456456 ", fromAddress, message, messageType, "", "", "", 0);
PostSendMessage("+316654654654", fromAddress, message, messageType, "", "", "", 0);
}
else {
PostSendMessage("+316147147147", fromAddress, message, messageType, "", "", "", 0);
}
}

Regards, Henk

August 7, 2020
8:44 am
Remie van de Zande
Guest
Guests

Hello Henk,

I've succefully managed to add your code in the script.
But I would like it in a way that I can determine the receivers of the forwarded SMS based on the sender.

Example:

Sender +316123123123 Forward to: +316789789789 & +316987987987
Sender +316321321321 Forward to: +316456456456 & +316654654654
All other senders Forward to: +316147147147

Would you be so kind and help me with this.

Many thanks/ Alvast bedankt

Remie

February 19, 2018
9:20 am
Henk Helmantel
Admin
Forum Posts: 1196
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

The script below is in C#. Diafaan SMS Server supports scripts in C# or Visual Basic.NET.

Regards, Henk

February 16, 2018
9:50 pm
SMS master
Guest
Guests

Hi Henk,

Is the script on C+ or VB?

March 9, 2016
4:03 pm
Henk Helmantel
Admin
Forum Posts: 1196
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Chris,

You can use the Scripting Connector and adapt the 'OnMessageReceived' function in the standard script to forward received messages to one or more other mobile phones. The following code snippet forwards a received SMS message to numbers +44111111111 and +44222222222:

private void OnMessageReceived(string fromAddress, string toAddress, string message, string messageType,
string messageId, string smsc, string pdu, string gateway,
DateTime sendTime, DateTime receiveTime)
{
PostSendMessage("+44111111111", fromAddress, message, messageType, "", "", "", 0);
PostSendMessage("+44222222222", fromAddress, message, messageType, "", "", "", 0);
}

Regards, Henk

March 9, 2016
2:37 pm
Chris
Guest
Guests

Hi , i'm currently testing the demo for an SMS alerting system and i would like to forward received SMS to 1 or 2 other cell phones how can i do this?

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: 578

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 949

Posts: 3265

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1196