How can we help?

Add new channel type (WISe only)


In the Auron WISe, you can add custom channel types. A channel type is any communication medium or interface that sends or receives messages. Channels run asynchronously and may also implement business logic specific to that channel. Learn more about channels here.

While the Auron SMS Server comes with a fixed set of channel types, you can add your own custom channel types to the Auron WISe.

Please note that to add a new channel type requires some technical knowledge. If you are unsure how to do this, feel free to contact us.

For the remainder of this article we’ll assume that you’re able and authorized to connect to the Auron WISe server and database.

Channel_Types table

Add a new channel type to the Auron WISe by adding a new record to the Channel_Types table. You’ll also need to add a data table to the WISe message database. Here’s a relation diagram.

Channel_Types table in a relation diagram

These are the fields in the Channel_Types table:

Field nameDescription
IDPrimary key and identifier. Must be an all caps string without spaces, no longer than 32 characters. For example: ‘CUSTOM_CHANNEL_TYPE’.
MessageTypeIDForeign key, refers to the primary message type for this channel type. Leave it empty to have a channel that can handle any type or multiple types of messages.

Must be an all caps string without spaces, no longer than 32 characters. For example: ‘CUSTOM_MESSAGE_TYPE’.
DataTableThis is the name of the table that holds channel data. The channel data table links to the channels table and holds the channel type specific data. The structure of the data table describes the channel type specific fields for this channel type.

This table does not already exist and you’ll have to create it manually. Learn more about this below.
DescriptionThe display name
InfoUrl(Optional) Link to a URL with more information about this channel type
LongDescriptionThe full description
IsManaged1 if this channel is managed by the WISe. 0 if this is an external channel.

A managed channel must be a Windows console app on the same server as the Auron WISe. The WISe service will attempt to start the app when the channel is enabled and stop it on disable or when the service stops. On startup the WISe adds two arguments:
/ID <channel ID> /LOG <path the Activity Log>

When making a managed channel in .Net consider referring to ‘plugin.dll’. This is an assembly that’s packed with the WISe and exports the class ‘CChannelBase’ which implements and interface that helps you streamline your managed channel

An external channel is not managed by the WISe. It’s lifecycle is disconnected from the WISe service. This can be an application running on a different server or a web application. You’ll have to determine the channel ID and log path independently.

And external channel can also be ‘virtual‘, meaning that there is no implementation and the channel definition serves only to structure your WISe configuration.
ProcessPathIf IsManaged = 1 this is the path the channel process. This must we a Windows console app on the same server following the description for ‘IsManaged’ above.
EditorPath(Optional) This is the path to a specialized editor for the channel properties. Leave it empty to use the default channel property editor.

When making an editor in .Net consider referring to ‘plugin.dll’. This is an assembly that’s packed with the WISe and exports the CChannelWizard class. This class can help you setup a channel properties wizard in the same style as the standard WISe channels.

When editing a channel from the WISe manager the program starts with two arguments: /CTID <Channel Type ID> /CD <Channel Description>
Icon(Optional) This binary field contains a binary dump of a 48×48 PNG image that represents the channel type.

To make a binary dump of an existing .png image use this SQL command:
SELECT * FROM OPENROWSET(BULK N’C:\dir\filename.png’, SINGLE_BLOB) rs
DisplayOrderThe location of this channel type in the channel select dialog in the WISe manager. A lower number is nearer to the top.

Data table

The data table is both the storage for your custom channel fields as well as the structure definition for you custom channel. When creating a data table only field field is required:

ChannelID NVARCHAR(32)

The following SQL data types are supported in the data table:

  • DATETIMEOFFSET, DATETIME; Date values; prefer DATETIMEOFFSET
  • INT; Natural numbers
  • FLOAT; Real numbers
  • BIT; Boolean values
  • NVARCHAR, VARCHAR; Strings; prefer NVARCHAR

Example

To add an example channel type we can run the following SQL statement:

INSERT INTO Channel_Types(ID, MessageTypeID, Description, LongDescription, 
  InfoUrl, DataTable, EditorPath, Icon, DisplayOrder, IsManaged, ProcessPath) 
VALUES(
  'CUSTOM_CHANNEL_TYPE',      -- ID
  'CUSTOM_MESSAGE_TYPE',      -- MessageTypeID
  'Custom channel',           -- Description
  '', '',                     -- LongDescription, InfoUrl
  'Channels_CustomChannel',   -- DataTable
  '"ChnCustomChannel.exe"',   -- EditorPath
  NULL, 1, 1,                 -- Icon, DisplayOrder, IsManaged
  'ChnProcCustomChannel.exe') -- ProcessPath

This statement assumes that ‘CUSTOM_MESSAGE_TYPE’ is an already existing message type, ChnCustomChannel.exe is an existing editor and ChnProcCustomChannel is an existing channel process.

Find an example for how to setup a custom channel process in the Auron Software GitHub.

To create the data channel we can run a SQL statement link this:

CREATE TABLE Channels_CustomChannel
(
  ChannelID NVARCHAR(32),
  TestConfigString NVARCHAR(MAX)
  -- add more custom properties
)

Reset service and restart manager

After adding a new channel type you’ll need to restart both the Auron WISe service and manager to be able to use the new channel type.

We can now add and remove channel of your custom channel type.