Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4491

dataCoding not working properly in camel-smpp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.0, 2.8.0, 2.9.0
    • 2.9.0
    • camel-smpp
    • None
    • Patch Available
    • Unknown

    Description

      This is related to CAMEL-3093.

      The way the dataCoding option works is incorrect (or at least very confusing). After reading the documentation I was under the impression that the given value would be used in the data_coding-part of the submit_sm PDU-packets, but this is not the case. When 0 is given as dataCoding 0x11 (hexadecimal) is sent in the PDU-packets. If 4 is specified 0x15 is sent, and if 8 is specified then 0x19 is sent. This is caused in SmppProducer by the use of the constructor with several parameters:

      new GeneralDataCoding(
              false,
              true,
              MessageClass.CLASS1,
              Alphabet.valueOf(submitSm.getDataCoding()))
      

      It constructs a DCS-value as defined in the GSM 03.38 specification, not as specified in the SMPP specification. 0x11 is for example a valid DCS-value in GSM 03.38, but is reserved in SMPP. I think that it would be better and more logical if the constructor with one parameter was used instead:

      new GeneralDataCoding(submitSm.getDataCoding())
      

      This is more flexibal (DCS-values can still be created manually) and is a better default value (0 instead of 0x11). With my SMS-center (this probably varies between centers though) a data_coding of 0x11 forces me to do the 7-bit GSM decoding myself. When 0 is specified (or 3) all I have to do is to pass it ISO-8859-1 encoded bytes.

      Attachments

        1. patch.txt
          1.0 kB
          Jonas Bengtsson

        Issue Links

          Activity

            People

              muellerc Christian Müller
              ljb Jonas Bengtsson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: