K2InformaticsGmbH / smpp_parser

A parser for SMPP protocol PDUs
Apache License 2.0
3 stars 1 forks source link

smpp:b2a failed on line 500 Reason: function_clause: data_sm #90

Closed walter-weinmann closed 6 years ago

walter-weinmann commented 6 years ago
Command: data_sm
PDU: "00 00 00 46 00 00 01 03 00 00 00 00 00 00 00 01 47 55 54 53 00 04 03 31 36 38 2E 31 32 33 2E 32 33 34 2E 33 32 31 00 01 09 31 36 38 2E 31 32 33 2E 32 33 34 2E 33 32 31 00 10 04 02 03 02 00 01 00 05 01 00 01 13"

00 00 00 46 # command_length
00 00 01 03 # command_id
00 00 00 00 # command_status
00 00 00 01 # sequence_number
47 55 54 53 00 # service_type
04 # source_addr_ton
03 # source_addr_npi
31 36 38 2E 31 32 33 2E 32 33 34 2E 33 32 31 00 # source_addr
01 # dest_addr_ton
09 # dest_addr_npi
31 36 38 2E 31 32 33 2E 32 33 34 2E 33 32 31 00 # desination_addr
10 # esm_class
04 # registered_delivery
02 # data_coding
Message Submission TLV - callback_num_press_ind
03 02 
00 01 
00 
Message Submission TLV - ussd_service_op
05 01 
00 01 
13
c-bik commented 6 years ago

@walter-weinmann unable to reproduce

walter-weinmann commented 6 years ago

Error with unpack_map_pack

*** User 2018-06-04 04:47:37.364 ***
smpp_test_utils:unpack_map_pack:54 ===> unbind
#{callback_num_pres_ind => [0],
  command_id => 259,command_length => 70,command_status => 0,data_coding => 2,
  dest_addr_npi => 9,dest_addr_ton => 1,destination_addr => "168.123.234.321",
  esm_class => 16,registered_delivery => 4,sequence_number => 1,
  service_type => "GUTS",source_addr => "168.123.234.321",
  source_addr_npi => 3,source_addr_ton => 4,ussd_service_op => 19}
{
  "callback_num_pres_ind": "\u0000",
  "command_id": 259,
  "command_length": 70,
  "command_status": 0,
  "data_coding": 2,
  "dest_addr_npi": 9,
  "dest_addr_ton": 1,
  "destination_addr": "168.123.234.321",
  "esm_class": 16,
  "registered_delivery": 4,
  "sequence_number": 1,
  "service_type": "GUTS",
  "source_addr": "168.123.234.321",
  "source_addr_npi": 3,
  "source_addr_ton": 4,
  "ussd_service_op": 19
}

*** User 2018-06-04 04:47:37.364 ***
smpp_test_utils:unpack_map_pack:57 ===> 
Expected : <<0,0,0,70,0,0,1,3,0,0,0,0,0,0,0,1,71,85,84,83,0,4,3,49,54,56,46,49,
             50,51,46,50,51,52,46,51,50,49,0,1,9,49,54,56,46,49,50,51,46,50,51,
             52,46,51,50,49,0,16,4,2,3,2,0,1,0,5,1,0,1,19>>
Got      : <<0,0,0,70,0,0,1,3,0,0,0,0,0,0,0,1,71,85,84,83,0,4,3,49,54,56,46,49,
             50,51,46,50,51,52,46,51,50,49,0,1,9,49,54,56,46,49,50,51,46,50,51,
             52,46,51,50,49,0,16,4,2,5,1,0,1,19,3,2,0,1,0>>

*** CT Error Notification 2018-06-04 04:47:37.365 ***
smpp_test_utils:'-unpack_map_pack/1-fun-1-' failed on line 60
Reason: assertEqual
walter-weinmann commented 6 years ago

Error with unpack_pack

*** User 2018-06-04 04:47:37.798 ***
smpp_test_utils:unpack_pack:71 ===> unbind
#{callback_num_pres_ind => [0],
  command_id => 259,command_length => 70,command_status => 0,data_coding => 2,
  dest_addr_npi => 9,dest_addr_ton => 1,destination_addr => "168.123.234.321",
  esm_class => 16,registered_delivery => 4,sequence_number => 1,
  service_type => "GUTS",source_addr => "168.123.234.321",
  source_addr_npi => 3,source_addr_ton => 4,ussd_service_op => 19}
{
  "callback_num_pres_ind": "\u0000",
  "command_id": 259,
  "command_length": 70,
  "command_status": 0,
  "data_coding": 2,
  "dest_addr_npi": 9,
  "dest_addr_ton": 1,
  "destination_addr": "168.123.234.321",
  "esm_class": 16,
  "registered_delivery": 4,
  "sequence_number": 1,
  "service_type": "GUTS",
  "source_addr": "168.123.234.321",
  "source_addr_npi": 3,
  "source_addr_ton": 4,
  "ussd_service_op": 19
}

*** User 2018-06-04 04:47:37.799 ***
smpp_test_utils:unpack_pack:74 ===> 
Expected : <<0,0,0,70,0,0,1,3,0,0,0,0,0,0,0,1,71,85,84,83,0,4,3,49,54,56,46,49,
             50,51,46,50,51,52,46,51,50,49,0,1,9,49,54,56,46,49,50,51,46,50,51,
             52,46,51,50,49,0,16,4,2,3,2,0,1,0,5,1,0,1,19>>
Got      : <<0,0,0,70,0,0,1,3,0,0,0,0,0,0,0,1,71,85,84,83,0,4,3,49,54,56,46,49,
             50,51,46,50,51,52,46,51,50,49,0,1,9,49,54,56,46,49,50,51,46,50,51,
             52,46,51,50,49,0,16,4,2,5,1,0,1,19,3,2,0,1,0>>

*** CT Error Notification 2018-06-04 04:47:37.799 ***
smpp_test_utils:'-unpack_pack/1-fun-1-' failed on line 77
Reason: assertEqual
c-bik commented 6 years ago

Please see : https://github.com/K2InformaticsGmbH/smpp_parser/issues/88#issuecomment-394324504

walter-weinmann commented 6 years ago

Fixed with latest version.