Output SMS event adapter 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 adapter can be configured with XML, text, and JSON output mappings.
...
Edit
systemId
,password
, and other relevant properties of SMS sender configuration in<PRODUCT_HOME>/repository/conf/axis2/axis2_client.xml
file. For example,
Code Block language html/xml <axisconfig name="AxisJava2.0"> ... <transportSender class="org.apache.axis2.transport.sms.SMSSender" name="sms"> <parameter name="systemType"></parameter> <parameter name="systemId">cep1</parameter> <parameter name="password">cep123</parameter> <parameter name="host">localhost</parameter> <parameter name="port">2775</parameter> <parameter name="phoneNumber">CEP1</parameter> </transportSender> ... </axisconfig>
Copy following libraries to
<PRODUCT_HOME>/repository/components/lib/
directory.
...
- Log in to product's management console, and click Configure.
- Click Output Event Adaptors in the Event Processor Configs menu, and then click Add Output Event Adaptor.
Enter
outputSMSAdaptor
for Event Adaptor Name, and selectsms
for Event Adaptor Type as shown below.- Click Add Event Adaptor.
...
sms
type can be configured as follows. - Log into the BAM Management Console. For detailed instructions, see Running the Product.
- In the Main tab, click Event Streams to open the AvailableEvent Streams page.
- Click the Outflows link of the event stream to which the relevant output event adapter is connected. As a result, Event Out-Flows (<Output_Event_Adapter_Name>) opens.
Click on the relevant event builder name to open the Event Formatter Details page.
The message properties of ansms
output event adapter are described below.
Change the property values as required.
Property Description 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.