Defining an SMS gateway

Use the smsgw_define command to define an SMS gateway.

smsgw_define smsgw=SMSGatewayName email_address=email subject_line=SubjectLineScheme email_b
ody=EmailBodyScheme [ smtpgw=<SMTPGW1[,SMTPGW2]...|ALL> ]

Parameters

Name Type Description Mandatory Default
smsgw Object name SMS gateway name. Y N/A
email_address Token String Format for the email address. Y N/A
subject_line Token String Format for the subject line. Y N/A
email_body Token String Format for the email body. Y N/A
smtpgw Object name List of SMTP gateways to be used. N The SMTP gateways defined in the smtpgw_prioritize command.

SMS gateways are used to send event notifications via SMS messages. SMS messages are sent via SMS-to-email servers. To definw a new SMS gateway, it is necessary to know how SMS messages are encapsulated in the email message.

When the system sends an SMS message, it uses the actual message text that describes the event and the destination number. The destination number is comprised from an area code and the local number. Both are specified when a destination is defined as described in the Defining a new event notification destination command.

The message text and the destination numbers can be embedded into the email message into various parts of the email message: destination address, subject line, or email body. This command defines how email messages are formatted, and how they contain the information of the specific SMS.

When defining an SMS gateway, three parameters must be specified in order to define the formatting:

  • email_address: This is the email address used for sending the SMS via the email-to-SMS gateway.
  • subject_line: This is the subject line of the outgoing email that will be converted to an SMS.
  • email_body: This is the body of the outgoing email that will be converted to an SMS.

For each of these parameters, the value can be either fixed text, or an event text, or the destination phone number. This is done by embedding the following escape sequences into the text:

  • {areacode}. This escape sequence is replaced by the destination's cellular number area code.
  • {number}. This escape sequence is replaced by the destination's cellular local number.
  • {message}. This escape sequence is replaced by the text to be shown to the user.
  • \{, \}, \\. These are replaced by the {, } or \ respectively.

By default, the email to the email-to-SMS server is sent through the defined SMTP servers, prioritized by the Prioritizing SMTP gateways command. If needed, the user may define a specific SMTP gateway or gateways to be used for sending email to this email-to-SMS gateway.

Several SMS gateways can be defined. The system will try the SMS gateways, in the order specified in Prioritizing SMS gateways until it successfully connects to one of them. It is possible to define that specific SMS destinations will use specific SMS gateways (see Defining a new event notification destination).

Example:


smsgw_define smsgw=SMSGW1 email_address={areacode}{number}@sms2emailserver.example.com subj
ect_line=SMS email_body={message}

Output:


Command executed successfully.

Access control

User Category Permission
Storage administrator Allowed
Storage integration administrator Disallowed
Application administrator Disallowed
Security administrator Disallowed
Read-only users Disallowed
Technicians Disallowed

Return codes

  • GATEWAY_MAX_REACHED

    The maximum allowed number of gateways is already reached.

  • SMSGW_CANNOT_BE_DEFINED_WITHOUT_SMTPGW

    The SMS gateway cannot be defined if no SMTP gateway is defined.

  • GATEWAY_NAME_DOES_NOT_EXIST

    The gateway name does not exist.

  • GATEWAY_NAME_APPEARS_TWICE

    The gateway name appears twice on the list.

  • GATEWAY_NAME_ALREADY_EXISTS

    The gateway name already exists.