Skip to main content
Skip table of contents

Smpp adapter

The SMPP Adapter allows you to send SMS's, a possible use case is to send otp passwords.

Prerequisites

The adapter requires an SMPP-server.

Configuration

AdapterUniqueID

Unique name assigned to this adapter; the name is used to reference the adapter in the workflow. The ID has following requirements:

  • START with a letter or _ (underscore)

  • FOLLOWED by a combination of following characters: Letter, Number, '.' (dot), '-' (dash), '_' (underscore)

  • Host Hostname of the smpp serverx

  • Port Port of your smpp server to send an sms to x

  • SystemId SystemId to connect to the smsc x

  • SystemType Type of smsc to connect to

  • Password Password to autenticate

Workflow Settings

A request for the adapter is prepared by specifying the following properties/scripts in the adapter activity:

  • Input Property: the variable containing the instructions the adapter have to execute

  • Output Property: the variable the adapter will store the response in after execution

  • Before Adapter Script: script that will be executed before calling the adapter

  • After Adapter Script: script that will be executed after the adapter fulfilled its task

Request - API

smtpRequest

CODE
var sms = tb.smppRequest({ from : "+32477777777", to : "+32477777777", msg: 'my sms' ,predefinedMsg: 1 /*optional*/ ,numberingPlanIndicator: 1 /* optional number */ ,typeOfNumber: 1 /* optional number */ }) 

Either predefinedMsg or msg should be present, if both are defined the smsc decides what takes precedence.

Response - API

Common Properties

The response API can be applied to the variable specified in the "output property" (see "Workflow Settings"): to verify whether the action performed by the adapter was successful, to query for the data returned by the adapter.

All responses have four properties in common:

  • status Status flag indicating whether the response is ok (0) or not (1).

  • substatus Response specific number indicating what the problem was, eg. http status code

  • message Response specific message in case there was a problem (can be null)

  • rc Return Code, a human readable code based on the substatus

Response Codes

If all is ok, the status is zero, for non-zero statusses you can find the description below.

  • 1 = Unreachable SMSC

  • 2 = PDU exception generally an invalid character

  • 3 = Invalid response received from SMSC

  • 4 = Negative responce received

  • 5 = Timeout while waiting for response

Additional Notes

Performance remark

When using the SAML adapter the CPU is used more intensive than other adapters for signing the templates. You should test your system to get an idea how many requests can be handled at the same time.

Mixing IBM and SUN JDK's

When using for example TFIM , the IBM JDK encodes the x509 different as the SUN JDK. IBM sets the x509 certificate on 1 line. Sun sets the x509 use lines breaks in the certificate. To solve this issue you have to add an attribute to your Sun JVM Arguments.

CODE
-Dorg.apache.xml.security.ignoreLineBreaks=true 

Examples

Request

CODE
function sendsms(workItem){ var options = { from : 32499123456, to : 32499654321, msg : "Hello World!", numberingPlanIndicator : 1, typeOfNumber : 1 }; workItem.smsIn = tb.smppRequest(options); } 

Response

CODE
if (status == 0) { log("status: good"); //sms was send } 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.