SMS event publisher is used to send message notifications via Short Message Peer-to-Peer Protocol (SMPP). It uses Axis2 SMS events when sending SMSs from WSO2 products. SMPP allows Axis2 to connect to a Short Messaging Service Center (SMSC) and send/receive SMSs. SMS event publisher can be configured with XML, text, and JSON output mappings.
Follow the steps below to complete the prerequisites before starting the event publisher configurations.
Add the following configuration under transport senders section in the
<PRODUCT_HOME>/repository/conf/axis2/axis2_client.xmlfile, to enable SMS Transport .
Configure WSO2 CEP by adding relevant jars to support SMS transport.
Creating a SMS event publisher
For instructions on creating a SMS event publisher, see Configuring CEP to Create Alerts.
Configuring adapter properties
Specify the Dynamic Adapter Properties, when creating a SMS event publisher using the management console as shown below.
After entering the above adapter properties, select the Message Format that you want to apply on the published events. Also, click Advanced to define custom output mappings based on the Message Format you selected. For more information on custom output mapping types, see Output Mapping Types.
You can also d efine the respective adapter properties of the event publisher based on the transport type within the
<to> element of the event publisher configuration in the
<PRODUCT_HOME>/repository/deployment/server/eventpublishers/ directory as follows.
The above adapter properties are described below.
|Configuration file property||Example|
Phone number of the SMS receiver in the following format: [country-code][number]
Other post configurations that use SMS event publisher
Enter the value of the systemId
parameter defined in the above SMS transport sender configuration as the value of the nameparameter in the below list.
- Start SMSC Simulator by executing the following command:
java -cp smpp.jar:smscsim.jar com.logica.smscsim.Simulator
- In the console where the command runs:
- Enter 1 for the prompt to start simulation.
Enter 2775 as the port number (this port is equal to the port defined in the SMS transport sender configuration.)
Starting listener... startedlog is displayed on the console, the SMSC simulator is ready to accept messages as shown below.
For more information on
sms event publisher type, see the following sample.