Output SMS event adapter is used to send message notifications via Short Message Peer-to-Peer Protocol (SMPP). It uses Axis2 SMS e when sending SMSs from WSO2 products. SMPP allows Axis2 to connect to a Short Messaging Service Center (SMSC) and send/receive SMSs. SMS event adapter can be configured with
Before the configuration starts, follow the steps below to configure the SMS sender.
password, and other relevant properties of SMS sender configuration in
<PRODUCT_HOME>/repository/conf/axis2/axis2_client.xml file. For example,
Copy following libraries to
Follow the instructions below to configure output SMS event adapter using the management console. This deploys the event adapter in the
outputSMSAdaptor for Event Adaptor Name, and select
sms for Event Adaptor Type as shown below.
Follow the instructions below to configure output SMS event adapter using a configuration file.
Create an XML file with the following output SMS event adapter configurations. Output event adapter implementation must start with
<outputEventAdaptor> as the root element.
<PRODUCT_HOME>/repository/deployment/server/outputeventadaptors/directory. Since hot deployment is supported in the product, you can simply add/remove output event adapter configuration files to deploy/undeploy output event adapters to/from the server.
After an adapter is successfully added, it gets added to the list of adapters displayed under Event Processor Configs in the Configure menu of the product's management console. Click Edit to change its configuration and redeploy it. This opens an XML-based editor allowing you to edit the event adapter configurations from the UI. Do your modifications and click Update. You can also delete it, enable/disable statistics or enable/disable tracing on it using the provided options in the UI.
Navigate to SMSC Simulator directory, and add the following name-value pairs to
users.txt file. (The folder must also contain
Enter the value of the
systemId parameter defined in the above SMS transport sender configuration as the value of the
name parameter in the below list.
java -cp smpp.jar:smscsim.jar com.logica.smscsim.Simulator
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.
smsoutput event adapter type can be configured as follows.
Click the name of the event formatter to which the relevant output event adapter is connected. This opens the Event Formatter Details page.
The message properties of an
sms output event adapter are described below. Change the property values as required.
|Phone No||Phone number of the SMS receiver.|
|Output Event Type||The outgoing event type to be mapped. The output SMS event adapter supports text, XML, and JSON mappings.|