Pownyan
Pownyan

Reputation: 503

Different encodings in Kannel for sms ID in submit_sm_response

We have multiple working SMPP connections set up working well with DLRs for outgoing messages, but one new operator seems to be sending the "message_id" paramater as a regular string that is hex-koded instead of the usual Octet string we get from the other operators.

Example of how our usual message_id field looks (from kannel.log)

  message_id:
   Octet string at 0x7fb584042eb0:
   len:  32
   size: 33
   immutable: 0
   data: 31 38 32 37 64 61 33 30 34 33 61 30 30 30 31 37   1827da3043a00017
   data: 35 33 36 36 65 64 63 61 37 32 38 63 62 33 37 31   5366edca728cb371

This works fine, and the ID ("1827da3043a000175366edca728cb371") gets decoded fine and is the same as in the DLR

For this new route however it looks like this:

message_id: "763307F1"

which is the hex encoded version of the ID (but without 0x in the beginning). Then we get the DLR PDU with id: 1983055857 (which is 0x763307F1 in decimal). This causes the sql query to match the DLR with the outgoing message to fail, and the DLR is thrown away.

Is it possible to force kannel to store the ID in decimal instead of hex, or is this a error that needs to be corrected on the operators side for this to work? What causes the two IDs to be encoded and sent differently?

Upvotes: 2

Views: 158

Answers (0)

Related Questions