CommuniGate Pro
Version 6.4

SMPP Module

The CommuniGate Pro SMPP Module implements the SMPP protocol via TCP/IP networks.

The SMPP module implements the client (ESME) part of the SMPP protocol. The module can connect to the specified SMPP servers (SMSC, Short Message Service Centre) and relay IM (Instant Message) Real-Time Signal requests as SMS messages to recipient mobile phones.

The SMPP module can also receive SMS messages from SMPP servers and send them as IM Signal requests to the specified recipients.

Short Message Peer to Peer Protocol (SMPP)

The CommuniGate Pro SMPP Module implements the SMPP protocol functionality. When the Server Administrator specifies one or several SMPP servers (SMSC systems), the SMPP Module opens a TCP connection to the specified server address and "binds" using the specified credentials.
When an IM Signal is routed to the SMPP Module, the Module finds the SMPP server it is routed to, and sends it to that server via the SMPP connection.

To maintain a connection when it is idle (no IM Requests to relay), the module periodically sends the enquire_link request to the SMPP server.

If a connection to the server cannot be established, or it has been broken and it is being re-established, the IM Signals are enqueued. They are relayed to the server when a connection is established.

The SMPP module processes only the MESSAGE Real-Time requests, all other requests are rejected.

Configuring the SMPP Module

Use the WebAdmin Interface to configure the SMPP module. Open the Real-Time pages page in the Settings realm, then open the SMPP page.

Log Level: Reject if not Relayed in: Dialog Timeout: Source IP Address:
Use the Log Level setting to specify what kind of information the SMPP module should put in the Server Log. Usually you should use the Major (Signal relay reports) or Problems (relay reports and non-fatal errors) levels. But when you experience problems with the SMPP module, you may want to set the Log Level setting to Low-Level or All Info: in this case protocol-level or link-level details will be recorded in the System Log as well. When the problem is solved, set the Log Level setting to its regular value, otherwise your System Log files will grow in size very quickly.

The SMPP records in the System Log are marked with the SMPP tag.

Reject if not Relayed in
If a Signal request to be relayed to a SMPP server is enqueued longer than this period of time, the Signal request is rejected.
Dialog Timeout
This option specifies the SMS Dialog binding time-out.
Source IP Address
This option selects the source network address for outgoing SMPP connections. You can allow the CommuniGate Pro server OS to select the proper address or your can explicitly select one of the server IP addresses.

Configuring SMPP Server Records

You can specify one or several SMPP servers the SMPP module should connect to.

Name Mode SMSC Address System ID Password Sender Recipient Dialogs Encoding Ping Period
This is an internal name of this SMPP server configuration. Any name can be used, but there should be no two SMPP server configurations with the same name. An empty name is allowed.
The operation mode for this SMPP server configuration: send-only, receive-only, send-and-receive. The SMPP module logs into the SMPP server as "Transmitter", "Receiver", or "Transceiver".
To disable the SMPP server configuration without removing it, select the Off mode.
SMSC Address
The SMPP server (SMSC) domain name or Network IP Address, with the port number to connect to, separated using the colon (:) symbol.
If the port number is not specified, the port 2775 is used.
If the connection to the SMPP server should be established securely (using the TLS protocol), add the tls: prefix before the server domain name.
System ID, Password
These fields contain the credentials to be used to "bind" (log into) the SMPP server.
By default the SMPP module uses the CommuniGate string as SMPP "System Type". Some SMPP servers require some other string to be used as "System Type". You can specify that string in the System ID field, after the actual System ID, separating it with the @ symbol. For example, if the System ID is user1234, and the requires System Type is SMPP, then specify the user1234@SMPP value in the System ID field.
This field is used to compose the "sender" for the SMS messages sent. Usually it is a phone number assigned to the SMPP account you bind to. Use the +countryCodephoneNumber format to specify the "international" sender format.
If this field contains the * symbol, the actual sender E-mail address is substituted. If this address is +number@telnum, only the number part is used. If this address is userName@null, only the userName part is used.
If this field is empty, it is processed as if it has the * value.
If the resulting address starts with the + symbol, it is removed and the address is sent to the SMPP server as an "international" one. Otherwise it is sent either as a "local" one (if it starts with a digit) or as an "alphanumeric" one.
When this option is selected, messages sent and received via this SMPP configuration will be processed to support SMS Dialogs.
An empty string or an E-mail address of the default recipient. If specified, incoming messages are sent to the specified address if:
  • the Dialogs option is disabled
  • the Dialogs option is enabled, but no address for the incoming message sender has been remembered (no "binding" found)
  • the Dialogs option is enabled, and a "binding" address is found, but the incoming message has the @@ prefix (two "at" symbols and a space)

If this setting is not specified (left blank):
  • if the Dialogs option is enabled, but no address for an incoming message sender has been remembered (no "binding" found), that incoming message is rejected.
  • if the Dialogs option is disabled, a message is routed to the destination address specified with the SMPP protocol: if a message is directed to the phone number +74992713154, then it is sent to the +74992713154@telnum address, which can be routed to some local Account (via the Telnum or other mechanism).
The preferred character set (encoding) to use for message sending. If a message cannot be encoded using this character set, it is sent using the Unicode encoding.
Keep Alive
This option specifies the maximum time period between commands sent to the SMPP server.
If there is no message to send to the SMPP server within this time period, the enquire_link command is sent to prevent the server from closing the connection.

To create a new SMPP server configuration, enter the server name and other settings into the last (empty) element, and click the Update button.

To remove an SMPP server configuration, enter an empty string into its Server (not the Name!) field, and click the Update button.

Routing Signal Requests to the SMPP Module

To route a Signal to the SMPP module:
  • route it to the phonenumber@smpp address, where phonenumber is the target telephone number in the E.164 format (with the leading + sign). The Signal request will be sent to the first available (enabled) SMPP server configured. If there is an enabled SMPP server with an empty name, the Signal will be sent to that server.
  • route it to the phonenumber@name._smpp address, where name is the internal name of a configured and enabled SMPP server.

with the SMPP server configuration displayed above, Signals directed to +74992713152@smpp will be sent to provider1 (the SMPP server), while Signals directed to +74992713152@masslist._smpp will be sent to masslist (the smpp.provider.dom:950 SMPP server).

Usually, SMS Messages are directed to a regular phone number, i.e. to some +countryCode phoneNumber@telnum address. By default, this address is routed to the gatewaycaller application that relays incoming Instant Messages to one of the SMPP servers. It can take take the SMPP server name from the PSTNSMSGateway setting of the sender, or, if this setting is empty, from the application parameter (used as a default gateway).
To use the provider1 SMPP server as the default one, add the following record to the Router Table:

IM:<*@telnum> = gatewaycaller{*,provider1}#pbx

SMS Dialogs

This SMPP Module implements "SMS Dialogs": when a CommuniGate Pro user sends an Instant Message to some SMPP endpoint (such as a mobile phone), the endpoint user can reply and the reply will be sent to the CommuniGate Pro user as an SMS.

When an instant message sent from some user1@domain1 address is relayed as an SMS message to the phone number XXXXXXX, the SMPP module adds a prefix to the message text:
@a=user1@domain1 message text

Subsequent instant messages from the same user1@domain1 address are relayed to the XXXXXXX phone number with the "short" prefix:
@a message text

When an instant message sent from some other user2@domain2 address is relayed as an SMS message to the same phone number XXXXXXX, the SMPP module adds a different prefix to the message text:
@b=user2@domain2 message text

Subsequent instant messages from the same user2@domain2 address are relayed to the XXXXXXX phone number with the "short" prefix:
@b message text

The SMPP module remembers these "bindings", consisting of the sender address, the destination phone number, and the prefix (a low-case letter) assigned.

When a user of the XXXXXXX phone replies to a message, the SMPP module checks all bindings for the XXXXXXX phone number. If there is exactly one binding, the module relays the received SMS message as an instant message to the address from that binding.
If no binding is found, or if there are two or more binding for this phone number, the SMS message is not accepted.

The user can reply with an SMS message starting with the @x: or @x_ prefix, where "_" is the space symbol.
In this case the SMPP module tries to find a binding for the XXXXXXX phone number and the x prefix. If it is found, the SMS message is relayed to the address in the found binding, otherwise the SMS message is not accepted.

Example: single dialog as seen on the mobile phone screen:

@a=smith@company.dom Hi! Got good news about that contract.
Great. Signed?
@a They've signed it, we'll get it tomorrow.
Congrats, CU!

Example: two dialogs as seen on the mobile phone screen:

@a=susan@company.dom Will you be in town this weekend?
@a Please come visit us on saturday, we'll be at home all day long.
@b=smith@company.dom Hey, just received their signed contract!
@b good! I'll be there in 30m
@a Thnx a lot, I will!

The SMPP Module retires each "binding" if the there it was not used in either direction for the specified Binding Timeout time period.
If the Binding Timeout value is too low, then a cell phone user may not be able to answer to a recenlty received SMS message, because by the time the user discovers the SMS, the binding could have expired. If the Binding Timeout value is too high, then cell phone users may have several active bindings too often, forcing them to use @x prefixes too often.

CommuniGate Pro Guide. Copyright © 2020-2023, AO StalkerSoft