javaapache-camelsmpp

Cannot setup Apache Camel SMPP to receive messages from SMSC node using GSM-7


This question is regarding Apache camel SMPP and GSM-7

using camel-smpp-starter 4.2.0

Our SMSC sends sms messages to our application using SMSC Default Alphabet according to the header. This is according to SMSC docs GSM-7. When I try to set encoding to GSM-7. it throws an error. I can see that the code uses String(body, ) to decode the body.

I'm wondering if anyone has used camel smpp with GSM-7 and could provide some details

camel:
springboot:
main-run-controller: true
component:
enabled: true
smpp:
encoding: GSM-7
    2024-01-29T07:33:26.154+01:00  WARN 11636 --- [pool-2-thread-1] 
    o.a.camel.component.smpp.SmppConsumer    : Cannot create exchange. This exception will 
    be ignored.. Caused by: [java.io.UnsupportedEncodingException - GSM-7]

    java.io.UnsupportedEncodingException: GSM-7
        at java.base/java.lang.String.lookupCharset(String.java:861) ~[na:na]
        at java.base/java.lang.String.<init>(String.java:1401) ~[na:na]
        at org.apache.camel.component.smpp.SmppUtils.decodeBody(SmppUtils.java:372)

Solution

  • Answering this myself:

    the apache camel smpp component doesnt support gsm-7, it only supports formats installed in the jvm out-of-the-box. What we did was to change the config of the smsc to send messages in latin1 format.