fiorix / go-smpp

SMPP 3.4 Protocol for the Go programming language
MIT License
218 stars 135 forks source link

disconnect when receive data_sm #116

Open parsibox opened 1 year ago

parsibox commented 1 year ago

hi when i get this packet my client goes down and reconnect again

PDU {
  '10091': <Buffer 31 30 2e 32 32 34 2e 32 35 31 2e 37 00>,
  command_length: 42,
  command_id: 259,
  command_status: 0,
  sequence_number: 1584658,
  command: 'data_sm',
  service_type: '',
  source_addr_ton: 2,
  source_addr_npi: 0,
  source_addr: '3355',
  dest_addr_ton: 2,
  dest_addr_npi: 0,
  destination_addr: '984040102003',
  esm_class: 0,
  registered_delivery: 0,
  data_coding: 4
}

0000003b000001030000000000182e120002003333353500020039383430343031303230303300000004276b000d31302e3232342e3235312e3700
``

error is :  PDU not implemented: 0x44617461534d
parsibox commented 1 year ago

0x44617461534d is

0x44 = 'D'
0x61 = 'a'
0x74 = 't'
0x61 = 'a'
0x53 = 'S'
0x4d = 'M'

0x44617461534d49444 is

0x44 - 'D'
0x61 - 'a'
0x74 - 't'
0x61 - 'a'
0x53 - 'S'
0x4d - 'M'
0x49 - 'I'
0x44 - 'D'
parsibox commented 1 year ago

i fix this by add this line in method Decode in file codec.go

    if hdr.ID ==0x103 {
        return decodeFields(newDeliverSM(hdr), b)
    }