This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Configuring SMPP Inbound Operations
The SMPP inbound endpoint allows you to consume messages from SMSC via WSO2 ESB.
WSO2 ESB SMPP inbound endpoint acts as a message consumer. It creates a connection with the SMSC, then listen a port to consume only SMS messages from the SMSC and injects the messages to the ESB sequence. It will not receive alert notification or will not notify when a data short message accepted.
Before you begin
To use the SMPP inbound endpoint, download the following files:
- Go to https://store.wso2.com/store/assets/esbconnector/details/1f5ca0e2-3fe0-42e5-ae9b-05af1f8e361b and click Download Streaming Connector to download org.apache.synapse.smpp.listen.class-1.0.1.jar and copy inside
<ESB_HOME>/repository/components/dropins
directory. Please delete old smpp jar, if you have already added. - Download jsmpp-2.1.0-RELEASE.jar from http://central.maven.org/maven2/com/googlecode/jsmpp/jsmpp/2.1.0-RELEASE/ and copy inside
<ESB_HOME>/repository/components/lib
directory. - Download asyncretry-jdk7-0.0.6.jar from https://mvnrepository.com/artifact/com.nurkiewicz.asyncretry/asyncretry-jdk7/0.0.6 and copy inside
<ESB_HOME>/repository/components/lib
directory.
Sample configuration
The inbound configuration can be added in the Inbound UI.
Inbound configuration
<?xml version="1.0" encoding="UTF-8"?> <inboundEndpoint xmlns="http://ws.apache.org/ns/synapse" name="SMPP" sequence="request" onError="fault" class="org.wso2.carbon.inbound.smpp.SMPPListeningConsumer" suspend="false"> <parameters> <parameter name="inbound.behavior">eventBased</parameter> <parameter name="sequential">true</parameter> <parameter name="coordination">true</parameter> <parameter name="port">2775</parameter> <parameter name="addressNpi">UNKNOWN</parameter> <parameter name="host">localhost</parameter> <parameter name="reconnectInterval">3000</parameter> <parameter name="addressTon">UNKNOWN</parameter> <parameter name="systemType">CPT</parameter> <parameter name="retryCount">-1</parameter> <parameter name="bindType">BIND_RX</parameter> <parameter name="addressRange">null</parameter> <parameter name="systemId">esb1</parameter> <parameter name="password">esb123</parameter> <parameter name="exponentialFactor">5</parameter> <parameter name="maximumBackoffTime">10000</parameter> </parameters> </inboundEndpoint>
We can get the message properties such as MessageId, SourceAddress, DestiationAddress, DataCoding, DestinationAddressNPI, DestinationAddressTON, ESMClass, PriorityFlag, ProtocolId, RegisteredDelivery, ReplaceIfPresentFlag, ReplaceIfPresentFlag, ScheduleDeliveryTime, SequenceNumber, ServiceType, SourceAddressNPI, SourceAddressTON, ValidityPeriod from the sequence as below.
<?xml version="1.0" encoding="UTF-8"?> <sequence xmlns="http://ws.apache.org/ns/synapse" name="request" onError="fault"> <log level="custom"> <property xmlns:ns="http://org.apache.synapse/xsd" name="MessageId" expression="get-property('SMPP_MessageId')"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="SourceAddress" expression="get-property('SMPP_SourceAddress')"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="DataCoding" expression="get-property('SMPP_DataCoding')"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="ScheduleDeliveryTime" expression="get-property('SMPP_ScheduleDeliveryTime')"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="SequenceNumber" expression="get-property('SMPP_SequenceNumber')"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="ServiceType" expression="get-property('SMPP_ServiceType')"/> </log> <log level="full"/> </sequence>
Parameter | Description | Required | Possible Values | Default Value |
---|---|---|---|---|
| IP address of the SMSC. | yes | N/A | N/A |
| Port to access the SMSC. | yes | N/A | N/A |
systemType | Identifies the type of ESME system requesting to bind as a receiver with the SMSC. | yes | "" - (NULL) CMT - Cellular Messaging CPT - Cellular Paging VMN - Voice Mail Notification VMA - Voice Mail Alerting WAP - Wireless Application Protocol USSD - Unstructured Supplementary Services Data | "" - (NULL) |
systemId | Identifies the ESME system requesting to bind as a receiver | yes | N/A | N/A |
password | The password may be used by the SMSC to authenticate | yes | N/A | N/A |
addressNpi | Numbering Plan Indicator for ESME address. | yes | Unknown ISDN (E163/E164) Land Mobile (E.212) National Internet (IP) WAP Client Id (to be defined by WAP Forum) | N/A |
addressTon | Indicates Type of Number of the ESME address. | yes | Unknown International Subscriber Number Alphanumeric | N/A |
bindType | An ESME bound as a Receiver or Transceiver is authorised to receive short messages from the SMSC. | yes | BIND_RX BIND_TRX | N/A |
addressRange | A single ESME address or a range of ESME addresses served via this SMPP receiver session. | No | N/A | null |
enquireLinktimer | Used to check whether SMSC is connected or not. | No | N/A | 10000 |
transactiontimer | Time elapsed between SMPP request and the corresponding response. | No | N/A | 200 |
reconnectInterval | The Initial retry interval to reconnect with the SMSC while SMSC is not available. | No | N/A | 3000ms |
retryCount | The no of times need to retry to connect with SMSC, while connection with the SMSC is closed. If you want to retry forever, give the retry count value as less than 0. | No | N/A | 5 |
exponentialFactor | Start with Initial reconnectInterval delay until first retry attempt is made but if that one let’s say we start with exponentialFactor 2 and 100ms delay until first retry attempt is made but if that one fails as well, we should wait two times more (200ms). And later 400ms, 800ms… | No | N/A | 5 |
maximumBackoffTime | The above one is an exponential function that can grow very fast. Thus it’s useful to set maximum backoff time at some reasonable level, e.g. 10 seconds: | No | N/A | 10000ms |