SMPP
Send and receive SMS messages through an SMSC (Short Message Service Center) with the SMPP protocol.
What’s inside
-
SMPP component, URI syntax:
smpp:host:port -
SMPP (Secure) component, URI syntax:
smpps:host:port
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-smpp-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 48 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.smpp.address-range | The address_range of the bind request of the consumer: the SME addresses that this ESME serves, as defined in section 5.2.7 of the SMPP 3.4 specification. The SMSC uses it to select the messages that it delivers to the consumer. Empty by default. | String | |
camel.component.smpp.allow-system-id-and-password-from-headers | Whether a producer with lazySessionCreation=true may take the system id and the password, with which it connects to the SMSC, from the 'CamelSmppSystemId' and 'CamelSmppPassword' headers of the first exchange. When both headers are present, the producer connects with them in place of the systemId and password of the endpoint, and keeps using them when it reconnects. This is disabled by default, and the headers are then ignored. Enable this only when the route sets these headers itself. | false | Boolean |
camel.component.smpp.alphabet | The alphabet in which the producer encodes and splits the text of the short message for SubmitSm, SubmitMulti and ReplaceSm: 0 (the SMSC default alphabet) encodes it in the charset of the encoding option, 8 (UCS2) in UTF-16BE, and 4 (8-bit) sends a byte array body as it is. It does not set the data_coding that is sent, which comes from the dataCoding option. The CamelSmppAlphabet header replaces it; the default is 0. | Byte | |
camel.component.smpp.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.smpp.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.smpp.configuration | A shared SmppConfiguration as the base of the endpoints: each endpoint uses a copy of it, which the options of its URI change. The option is a org.apache.camel.component.smpp.SmppConfiguration type. | SmppConfiguration | |
camel.component.smpp.data-coding | The data_coding that the producer sends with SubmitSm, SubmitMulti and DataSm, as defined in section 5.2.19 of the SMPP 3.4 specification, for example 0 for the SMSC default alphabet, 3 for Latin 1, 4 for 8-bit binary data and 8 for UCS2. An 8-bit value sends a byte array body as it is; the alphabet and encoding options, not this option, select how a text body is encoded. The CamelSmppDataCoding and CamelSmppAlphabet headers replace it; the default is 0. | Byte | |
camel.component.smpp.dest-addr | The destination address that the producer sends with SubmitSm, SubmitMulti, CancelSm and DataSm, for example the phone number of the recipient of a mobile terminated message. The CamelSmppDestAddr header replaces it, with a list of addresses for SubmitMulti. | 1717 | String |
camel.component.smpp.dest-addr-npi | The numbering plan indicator (NPI) of the destination address that the producer sends with SubmitSm, SubmitMulti, CancelSm and DataSm, with the values of the sourceAddrNpi option. The CamelSmppDestAddrNpi header replaces it; the default is 0. | Byte | |
camel.component.smpp.dest-addr-ton | The type of number (TON) of the destination address that the producer sends with SubmitSm, SubmitMulti, CancelSm and DataSm, with the values of the sourceAddrTon option. The CamelSmppDestAddrTon header replaces it; the default is 0. | Byte | |
camel.component.smpp.enabled | Whether to enable auto configuration of the smpp component. This is enabled by default. | Boolean | |
camel.component.smpp.encoding | The charset in which the producer encodes the text of the short message for SubmitSm, SubmitMulti and ReplaceSm, unless the alphabet is UCS2, and in which the consumer decodes a received message in the SMSC default alphabet. The CamelSmppEncoding header replaces it for the producer. | ISO-8859-1 | String |
camel.component.smpp.enquire-link-timer | The time in milliseconds without data from the SMSC after which the session sends an enquire_link to check the connection, or 0 to send none. Camel also uses it as the timeout to connect to the SMSC or the HTTP proxy, and for the TLS handshake. | 60000 | Integer |
camel.component.smpp.hostname-verification | Whether to check that the certificate of the SMSC matches the host Camel connects to, when SSL is used. When disabled, any certificate trusted by the JVM is accepted, whatever host it was issued for. | true | Boolean |
camel.component.smpp.http-proxy-host | The host name or IP address of an HTTP proxy through which Camel tunnels the SMPP connection, with an HTTP CONNECT request. When not set, Camel connects to the SMSC directly. | String | |
camel.component.smpp.http-proxy-password | The password for Basic authentication with the HTTP proxy. It is sent only together with the httpProxyUsername option. | String | |
camel.component.smpp.http-proxy-port | The port of the HTTP proxy that the httpProxyHost option sets. | 3128 | Integer |
camel.component.smpp.http-proxy-username | The user name for Basic authentication with the HTTP proxy. It is sent only together with the httpProxyPassword option. | String | |
camel.component.smpp.initial-reconnect-delay | The delay in milliseconds before the first attempt to reconnect, after the consumer or producer lost its session to the SMSC (the connection was closed, or the SMSC unbound). A failed connect when the consumer or producer starts is not retried. | 5000 | Long |
camel.component.smpp.interface-version | Defines the interface version to be used in the binding request with the SMSC. The following values are allowed, as defined in the SMPP protocol (and the underlying implementation using the jSMPP library, respectively): legacy (0x00), 3.3 (0x33), 3.4 (0x34), and 5.0 (0x50). The default (fallback) value is version 3.4. | 3.4 | String |
camel.component.smpp.lazy-session-creation | Whether the producer connects to the SMSC when it sends its first exchange instead of when it starts, so that the route can start while the SMSC is not available. The producer binds with the systemId and password options, or with headers when allowSystemIdAndPasswordFromHeaders is enabled. | false | Boolean |
camel.component.smpp.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.smpp.max-reconnect | The maximum number of attempts to reconnect after the session to the SMSC was lost. When the last attempt fails, a consumer stays disconnected until it is restarted, and a producer fails its exchanges, unless lazySessionCreation is enabled, which connects again for the next exchange. | 2147483647 | Integer |
camel.component.smpp.message-receiver-route-id | The id of a route whose consumer receives the messages that the SMSC sends to this producer. The producer then binds as a transceiver (bind_transceiver) instead of a transmitter, and hands each received deliver_sm, data_sm and alert_notification to that route, so that no SMPP consumer is needed. Only tested with a route that starts from a direct endpoint; the route must exist when Camel starts. | String | |
camel.component.smpp.numbering-plan-indicator | The numbering plan indicator (NPI) that the producer sends in the addr_npi field of its bind request, with the values of the sourceAddrNpi option. The consumer binds with 0 (unknown). The default is 0. | Byte | |
camel.component.smpp.password | The password with which the consumer or producer binds to the SMSC. | String | |
camel.component.smpp.pdu-processor-degree | The number of threads of the SMPP session that process the received PDUs in parallel. | 3 | Integer |
camel.component.smpp.pdu-processor-queue-capacity | The number of received PDUs that can wait for a free processing thread. When the queue is full, the session answers a received request with the ESME_RTHROTTLED error, so that the SMSC slows down. | 100 | Integer |
camel.component.smpp.priority-flag | The priority_flag that the producer sends with SubmitSm and SubmitMulti, from 0 (lowest) to 3 (highest). The CamelSmppPriorityFlag header replaces it; the default is 1. | Byte | |
camel.component.smpp.protocol-id | The protocol_id that the producer sends with SubmitSm and SubmitMulti, which for GSM is set as defined in GSM 03.40. The CamelSmppProtocolId header replaces it; the default is 0. | Byte | |
camel.component.smpp.proxy-headers | Extra HTTP headers that Camel sends to the HTTP proxy with the CONNECT request. | String> | |
camel.component.smpp.reconnect-delay | The delay in milliseconds between two attempts to reconnect to the SMSC, after the first attempt failed. | 5000 | Long |
camel.component.smpp.registered-delivery | The registered_delivery that the producer sends with SubmitSm, SubmitMulti, ReplaceSm and DataSm: 0 requests no delivery receipt, 1 a delivery receipt for success and for failure, and 2 a delivery receipt for failure only. The CamelSmppRegisteredDelivery header replaces it; the default is 1. | Byte | |
camel.component.smpp.replace-if-present-flag | The replace_if_present_flag that the producer sends with SubmitSm and SubmitMulti: 1 asks the SMSC to replace a message that is still pending delivery and has the same source address, destination address and service type, 0 does not. The CamelSmppReplaceIfPresentFlag header replaces it; the default is 0. | Byte | |
camel.component.smpp.service-type | The service_type that the producer sends with SubmitSm, SubmitMulti, CancelSm and DataSm: the SMS application service of the message, such as CMT (cellular messaging), CPT (cellular paging), VMN (voice mail notification), VMA (voice mail alerting), WAP or USSD. Empty by default, for the default service of the SMSC. The CamelSmppServiceType header replaces it. | String | |
camel.component.smpp.session-state-listener | An org.jsmpp.session.SessionStateListener that is notified when the state of the SMPP session of the consumer or producer changes, for example from BOUND_RX to CLOSED. Camel still reconnects a lost session itself. The option is a org.jsmpp.session.SessionStateListener type. | SessionStateListener | |
camel.component.smpp.single-d-l-r | When true, the SMSC delivery receipt would be requested only for the last segment of a multi-segment (long) message. For short messages, with only 1 segment the behaviour is unchanged. | false | Boolean |
camel.component.smpp.source-addr | The source address that the producer sends with every command: the address of the SME (Short Message Entity) that sends the message, or, for ReplaceSm, QuerySm and CancelSm, the source address of the original message. The CamelSmppSourceAddr header replaces it. | 1616 | String |
camel.component.smpp.source-addr-npi | The numbering plan indicator (NPI) of the source address that the producer sends with every command: 0 unknown, 1 ISDN (E.163/E.164), 2 data (X.121), 3 telex (F.69), 6 land mobile (E.212), 8 national, 9 private, 10 ERMES, 13 Internet (IP) or 18 WAP client id. The CamelSmppSourceAddrNpi header replaces it; the default is 0. | Byte | |
camel.component.smpp.source-addr-ton | The type of number (TON) of the source address that the producer sends with every command: 0 unknown, 1 international, 2 national, 3 network specific, 4 subscriber number, 5 alphanumeric or 6 abbreviated. The CamelSmppSourceAddrTon header replaces it; the default is 0. | Byte | |
camel.component.smpp.splitting-policy | What the producer does with a SubmitSm or SubmitMulti whose body does not fit in one short message: ALLOW sends it in several segments, TRUNCATE sends only its first part, and REJECT fails the exchange with an SmppException caused by a NegativeResponseException with status 1. Some carriers drop the segments after the first, which TRUNCATE does not send. The CamelSmppSplittingPolicy header replaces it. | allow | SmppSplittingPolicy |
camel.component.smpp.ssl-context-parameters | The SSL context parameters used to configure TLS connections to the SMSC. This option does not enable TLS by itself; use the smpps scheme or set usingSSL=true. When not set, the JVM default SSL socket factory is used. The option is a org.apache.camel.support.jsse.SSLContextParameters type. | SSLContextParameters | |
camel.component.smpp.system-id | The system_id with which the consumer or producer binds to the SMSC: the user name that the SMSC authenticates. The user info of the URI, as in smpp://userhost, sets it too. | smppclient | String |
camel.component.smpp.system-type | The system_type of the bind request, which tells the SMSC the type of ESME (External Short Message Entity) that binds. SMPP 3.4 allows at most 13 octets, the NULL terminator included. Empty by default. | String | |
camel.component.smpp.transaction-timer | The time in milliseconds that the session waits for the response of the SMSC to a request that it sent, such as a submit_sm or an enquire_link, before the request fails. The bind request waits 60 seconds instead. | 10000 | Integer |
camel.component.smpp.type-of-number | The type of number (TON) that the producer sends in the addr_ton field of its bind request, with the values of the sourceAddrTon option. The consumer binds with 0 (unknown). The default is 0. | Byte | |
camel.component.smpp.use-global-ssl-context-parameters | Enable usage of global SSL context parameters. | false | Boolean |
camel.component.smpp.using-s-s-l | Whether to connect to the SMSC with TLS, which the smpps scheme enables. By default, the JVM default SSL socket factory is used; sslContextParameters can configure the SSL context instead. Through an HTTP proxy, TLS runs inside the tunnel. | false | Boolean |