2009
Feb 
19

Defining SMS for Big Brother

Filed under: Big Brother — admin @ 4:34 pm  

Requirements for configuring SMS Notifications in Big Brother

To send an SMS message there are two options: 1.Through an email to pager gateway. This requires the user to define, in bbwarnrules.cfg, the recipient as ep-XXXXXXXXXX where “XXXXXXXXXX” is the email address by the provider. 2. Install a modem on the BBPAGER server and configure the recipient as sms-smsrecipient where smsrecipient is a name that is defined and configured in bbwarnsms.cfg For detail steps for setup instructions (for bbwarnsetup.cfg and bbwarnrules.cfg) please see solution (23566) at the following link https://support.quest.com/eSupport/solution.asp?WAid=268468886

Defining SMS Notification Recipients

To send notifications via SMS, you must define the type of device, the provider, and the recipient name and phone number in the etc\bbwarnsms.cfg file. Once you’ve entered the information in this file, you can then include the recipient’s name in notification rules in bbwarnrules.cfg , and in pager groups in bbwarnsetup.cfg . The first step in SMS configuration is defining the device being used. The format for a device definition is:

device: <modem initialization string> <modem dial string>

For example:

COM9: NONE NONE TAPI5: AUTO ATDP The first line defines a COM9 device. The second defines a TAPI5 device which uses your modem’s INF windows and pulse dials. When you are defining a provider (see below), you can specify a device name that is not defined here. If you do, Big Brother will use its default device type, which is equivalent to:

TAPI: AUTO NONE

The next step is to define the SMS provider. The format for this is:

provider: Phone# protocol password baudrate DPS maximumChars device

  • Provider is the provider name.

  • Protocol is either TAP or UCP .

  • Password is the password. If no password is required, enter NONE .

  • Baudrate is the baudrate the modem uses.

  • DPS stands for “data bits, parity, and stop bits.” For example: 7E1 or 8N1 .

  • MaximumChars is the maximum number of characters to send.

  • Device is the device name, as defined in this file (see above).

For example:

bellmobilitymtl: 5142353162 TAP NONE 300 7E1 150 TAPI

Once you’ve defined one or more providers, you can enter the recipients who use those providers. The format for a recipient definition is:

recipient: phone# provider

  • Recipient is the recipient name. This is the name you’ll enter in bbwarnrules.cfg or bbwarnsetup.cfg.

  • Phone# is the phone number to dial for this recipient.

  • Provider is the provider to use, as defined above.

For example:

robert: 9991234567 bellmobilitymtl

Note . You do not need to include any dashes or other punctuation in the phone number. If the provider is FiDO, do not include any punctuation or it will not work.

3rd Party Applications

If you are using the qpage application to send SMS notifications, you can enter SMS recipients in the format qp-recipient. If you are using the smsclient application for SMS recipients, use the format smsclient-recipient. Note that both qpage and smsclient are third-party applications, and are not supported by Quest Software. Specify all recipients that do not allow long messages in the briefrcpt token in etc/bbwarnsetup.cfg. You can define an initial delay (which determines how long before the next notification occurs) for a specific recipient by appending the time value to the recipient: recipient:XX where XX is the value in minutes.

http://www.smsclient.org/

http://www.qpage.org/

SMS.SCR

The file %BBHOME%/etc/sms.scr needs to be edited. This is the format:

#
# Kermit script that sends SMS messages through a Nokia SMSC server
# using the CIMD protocoll
#
# By: Jacob Lundqvist jaclu@ibk.se
# 1997-01-11
#
# Tested with GSM provider: Europolitan (Sweden), using faked checksum
#
# Terms
# —–
# SMS Short Message Service
# SMSC Short Message Service Center
# CIMD Computer Interface to Message Distribution
#
#
# Modem — SMSC — GSM/PCN phone (with SMS capacity)
#
DEFINE \%a \&@[2] # modem line
DEFINE \%b 123456 # number to your SMSC server
DEFINE \%c cimd3 # login to access CIMD, to select kind of service
# cimd3 = fake all checksums
DEFINE \%d user # CIMD account, identifying application for Provider
DEFINE \%e paswword # CIMD password
DEFINE \%f \{9}11EE\10 # End of command sequence 11=Faked CRC EE=Stop

#
# other variables
#
# \%i loop
# \%m message

#======================================================
#
# Macro deffinitions
#

#
# Pressentation
#
define ABOUT_PGM \
echo, \
echo Kermit SMS ver 1.2 by Jacob Lundqvist – jaclu@ibk.se, \
echo

#
# Terminate script
#
define TERMINATE hangup,quit

#
# Help
#
define SHOW_HELP \
ABOUT_PGM, \
echo Syntax: kermit sms.scr line file number [number [number [...]]], \
echo (multiple numbers can be specified),\
echo only first line of file is used – file MUST be terminated with LF!!!, \
echo, \
echo Example: kermit sms.scr /dev/cua0 /tmp/smsc.msg 4670890510 4670812345, \
echo, TERMINATE

#
# No message
#
define NO_MSG echo ERROR: no message in file \%1, set exit status 3, TERMINATE

#
# To few Arguments
#
define TO_FEW_ARGS echo ERROR: to few arguments (try ?), \
set exit status 3, TERMINATE

#
# No such device
#
define NO_DEV echo ERROR: no such device: \%1, set exit status 1, TERMINATE

#
# Check if device exists
#
define CHECK_DEV if < \Ffiles(\%1) 1 NO_DEV \%1

#
# No Connection
#
define NO_CONNECT echo ERROR: No Connection, set exit status 1, TERMINATE

#
# If No Ack is received, do a output, so this is noted in logfile,
# hopefully remote end wont care, since it’s gone anyhow
#
define NO_ACK echo ERROR: No ACK, set exit status 2, TERMINATE

#
# _ is not valid, remove
# Actually it is a escape character, but we don’t handle it for now…
#
define REMOVE_USCORE define \%i \Freplace(\%n,_,\32), \
assign \%n \%i, \

#
# Collect message into variable, max 160 chars!!
#
define GET_MSG open read \&@[3], \
read \%n, \
REMOVE_USCORE, \
define \%m \Fsubstr(\%n,1,160), \
echo message is[\Flength(\%m)]: \%m, \
if < \Flength(\%m) 1 NO_MSG \&@[3], \
close read

#
# CIMD Login As User
#
define CIMD_LOGIN output AA01\{9}\%d\{9}\%e\%f, input 20 AAAck, \
if failure NO_ACK

#
# CIMD Submit A New Message
# since remote end echoes output, we must catch our own Ack
#
#
define CIMD_SUBMIT output AA03\{9}\%1\{9}\%m\%f, input 60 AAAck, \
if failure NO_ACK, \
input 10 11EE, sleep 1, output AAAck\%f, input 20 11EE

#
# CIMD Logout Of Session
#
define CIMD_LOGOUT output AA02\%f, input 10 AAAck if failure NO_ACK


#========================================================
#
# Main
#

#
# Want help?
#
if equal \&@[2] ? SHOW_HELP

ABOUT_PGM

#
# Check params
#
if < \v(args) 5 TO_FEW_ARGS

CHECK_DEV \%a

#
# Check message
#
GET_MSG

#
# Set line params
#
set modem hayes # plain normal modem
set line \&@[2]
set flow xon/xoff # My SMSC server demands XON/XOFF
set speed 9600

#
# Debugging
#
#log session session.log new

#
# Connect to host
#
hangup # Make sure line is available
dial \%b
if failure NO_CONNECT
sleep 5

#
# Start CIMD application
#
output \%c\10
sleep 1


#
# CIMD session starts
#

CIMD_LOGIN

#
# Send to all recipients
#
assign \%j \v(args)
decrement \%j
for \%i 4 \%j 1 { CIMD_SUBMIT \&@[\%i] }

CIMD_LOGOUT

#
# Terminate kermit
#
set exit status 0
TERMINATE

No Comments »

Leave a comment