Case Study - Hallfield Primary School and ActiveXperts SMS and MMS Toolkit

1. Background

Hallfield Primary School is an independent primary school in the UK. It is a mixed school of Church of England religion. Hallfield has 2000 students, spread out over 2 different buildings.

All students, teachers, computers etc. are part of one single Active Directory domain: HALLFIELD.DOM. The Active Directory is not accessible from the Internet. Students and teachers are well-organized in a hierarchical OU (Organizational Unit) structure. Each student/teacher has a Mobile Number (as well as an e-mail address) defined in Active Directory.

In the past, Hallfield had a system to notify student via e-mail for special events, for instance:

  • When a teacher has become sick and lessons are cancelled;
  • When a lesson is scheduled for a different time;
  • When a lesson is teached on a different location;
  • Special event information.

This Case Study concentrates on a new system to send out small notification messages to students and teachers, via SMS.

2. Problem Statement

Hallfield had an old-fashioned way of notifying students via e-mail. This was done by an MS Excel macro. E-mail addresses were listed in an Excel document. There was a macro that actually sent out the e-mail notifications. E-mail addresses were manually synchronized with Active Directory. E-mail was the only way to notify the students.

This manual system had some drawbacks:

  • It was not possible to get the students immediate attention. SMS would make this possible;
  • There was no logging, so it was not possible to see whether a message was delivered successfully to a student or not;
  • Manual synchronization with Active Directory often resulted in missing or duplicate e-mail entries in the Excel worksheet;

3. Goals of the new System

The old notification system was replaced by a new, better system. Goals of the new system were:

  • SMS must become the primary notification message type. It must still be possible to notify students with an e-mail message;
  • SMS and e-mail addresses must be retrieved from Active Directory;
  • No more Excel macro's for the notification system;
  • It may not take more than 5 minutes to send out SMS messages to a hundred students;
  • All notifications must be logged;
  • It must be easy to add new features; preferably, the system must be developed by the internal software development departement.

4. ActiveXperts SMS and MMS Toolkit Solution

The software departement of Hallfield has written an application to replace the old notification system. The application is written in Visual Basic 6, and is responsible for the delivery of the messages.

Their VB6 based application uses the following components and techniques:

  • It uses LDAP to query the Active Directory users. Actually, Organizational Units are selected through LDAP, and students are fetched one by one from the Organizational Unit object;
  • The Active Directory User property Mobile is used to determine the students SMS information;
  • Outgoing SMS messages are stored in an MS SQL database;
  • SMS communications are done by the use of ActiveXperts SMS and MMS Toolkit.

Hallfield has first made a prototype in VBScript. This prototype only concentrates on SMS Messaging and ActiveDirectory, and has no advanced features like logging. We will further concentrate on this prototype.

Hallfield will run the ActiveXperts SMS and MMS Toolkit based application on a Windows 2003 Server. This server is member of the HALLFIELD.DOM domain.

SMPP Provider

One of the main requirements of the system is: performance. It may not take more than 5 minutes to send out an SMS message to hundred students. This throughput cannot be achieved with a GSM Modem (a GSM can send out only 1 message per 5 seconds maximum). Therefore, Hallfield subscribed with an SMPP provider: HSL Systems, based in the UK. Their throughput is around 10-20 messages/second.

By default, an SMPP account has no associated SMS number. This means that a recipient cannot reply to an SMS message that is delivered by the SMPP provider. Hallfield has plans to further develop SMS messaging in the future, and want to enable students to reply to an SMS message. Therefore, they applied for a virtual SMS number at HSL Systems, which means that their SMPP is associated with an SMS number. This has two advantages:

  • Students can send SMS messages to Hallfield (using the virtual SMS number);
  • Students can reply to SMS messages received from Hallfield;

HSL Systems offer the following subscription (subscriptions are based on volume):

  • Intro - max. 50 SMS messages p/day;
  • Entry - max. 250 SMS messages p/day;
  • Contact - max. 2500 SMS messages p/day;
  • Base - max. 25000 SMS messages p/day;
  • Corporate - > 25000 SMS messages p/day;

Hallfield decided to go for the Contact subscription, and also applied for the virtual SMS number. The costs for this Contact account: around EURO 130 (fixed) + max. 7 cents per SMS message.

After sign-up, Hallfield were sent the following account information:

SMPP Configuration Details 
System ID 8888888283
Password xxxxxxxx
System Type SMPP
Address range 20170029 / 44xxxxxxxxxx
Source TON 20170029 6
Source NPI 20170029 6
Source TON 44xxxxxxxxxx 1
Source NPI 44xxxxxxxxxx 1
Default Character Set (DCS=0) GSM 03.38
Interface Version 0x33 (v3.3) or 0x34 (v3.4)
Hosts (UK Livingston)
---.---.---.--- (UK Edinburgh Gyle) (USA Virginia)
Port 8011

(For more information about TON and NPI, click here)

Note that the+44xxxxxxxx number is the virtual SMS number assigned to Hallfield.

Most of the fields in the above table are used in the VBScript prototype.

VBScript prototype

The software departement of the school wrote the prototype in VBScript. This prototype only concentrates on the SMS communication aspects, and has no user interface.

Hallfield's final VB application is based on this VBScript prototype. The full VB application is NOT available from this web site.

Source code of Hallfield's prototype (VBScript)
   Option Explicit

   Dim objSmpp, objConstants
   Dim objOU, objStudent

   Set objSmpp             = CreateObject ( "ActiveXperts.Smpp" )  ' Create SMS and MMS Toolkit instance
   Set objConstants        = CreateObject ( "ActiveXperts.SmsConstants" )  ' Create SMS Constants instance

   ' Set communication properties

   objSmpp.Server          = ""                      ' Host (assigned by SMPP provider)
   objSmpp.ServerPort      = 8011                                  ' Port (assigned by SMPP provider)
   objSmpp.SystemID        = "8888888283"                          ' Credentails (assigned by SMPP provider)
   objSmpp.SystemPassword  = "xxxxxxxx"                            ' Credentails (assigned by SMPP provider)
   objSmpp.SystemType      = "SMPP"                                ' System Type (assigned by SMPP provider)
   objSmpp.SystemVersion   =  objConstants..asSMPPVERSION_33       ' SMPP Interface Version (assigned by SMPP provider)
   objSmpp.SystemMode      =  objConstants.asSMPPMODE_TRANSMITTER  ' Two-way account (send and receive)
   objSmpp.SystemSourceTON =  1                                    ' Type Of Number associated with 44xxxxxxxxxx
   objSmpp.SystemSourceNPI =  1                                    ' Numbering Plan Indicator associated with 44xxxxxxxxxx
   objSmpp.SystemSourceAddress = "+44xxxxxxxxxx"            ' To display +447797882390 on the remote mobile phones
   objSmpp.LogFile         = "c:\SmppLog_vbs.txt"                  ' Log file (for tracing and troubleshooting)

   objSmpp.Connect                                                 ' Connect to SMPP provider
   WScript.Echo "Connect, result: " & objSmpp.LastError

   If Not objSmpp.IsConnected = True Then
   End If

   Set objOU = GetObject( "LDAP://dc01/ou=students,dc=hallfield,dc=dom" )
   If (objOU Is Nothing) Then
      MsgBox "Unable to access the OU on the specified Domain Controller.", vbCritical, "Hallfield"
   End If

   For Each objStudent In objOU
      objSmpp.MessageRecipient = objStudent.Mobile                 ' Set recipient
      objSmpp.MessageData      = "Hello " & objStudent.Name        ' Set message text

      objSmpp.Send                                                 ' Send the message
      WScript.Echo "Message to " & objStudent.Mobile & ", result: " & objSmpp.LastError

   objSmpp.Disconnect                                              ' Disconnect
   WScript.Echo "Ready."