Only available in Diafaan SMS Server - basic and full editions.
Edit gateway script
Click on the Edit C# Script or Edit Visual Basic .Net Script link to edit the script. Use the Compile button to check if the script has syntax errors. If the script uses functions that are not in the System.dll assembly, a reference to the required assembly DLL must be added in the Advanced ReferenceList property.

Advanced properties
LogCommunicationToFile
Log all trace log communication to file. You can use this option in combination with the PostTraceLog script function to debug your script. If enabled, the status windows of the Scripting gateway provides a link to the location on the hard disk where the file is stored.
MaximumBatchSize
The maximum number of messages this gateway will process in one batch. If this value is higher than one and a number of messages are sent at the same time, the gateway loads multiple messages concurrently. This increases the speed in which the messages are sent. Leave the MaximumBatchSize on 1 if the script is processor heavy or takes a long time to send a message (more than a few seconds). For small scripts you can increase this value to speed up handling multiple messages.
ReferenceList
A list of all assembly DLL's required by the script. For the skeleton script, only the System.dll assembly is loaded. Possible useful .NET assemblies are:
System.Web.dll |
Classes for web or html functions. |
System.Data.dll |
Classes to handle database requests. |
System.XML.dll |
Classes to handle XML files. |
Gateway skeleton script
The gateway skeleton script that is installed after adding the gateway makes it easier to handle events and provides a number of methods you can use to send messages, enter received messages and add log entries.
OnMessageToSend is called when there is a message the script should send out.
OnStatusRequest is called when the script should query the status of a previously sent message.
PostSendResult sets the send result of a previous handled OnMessageToSend message.
PostSendResultUpdate updates the send result of a previously handled OnMessageToSend message.
PostDispatchMessage dispatches the OnMessageToSend message to a different gateway.
PostReceiveMessage adds a new received message.
PostEventLog adds a line to the event log.
PostTraceLog Adds a line to the communication file.