K2InformaticsGmbH / smpp_parser

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

protocol_id 52 not supported (ESME_RINVPRTFLG) #65

Closed c-bik closed 6 years ago

c-bik commented 6 years ago

image

> Pdu = {4,0,13,
 [{short_message,"..."},
  {sm_default_msg_id,0},
  {data_coding,0},
  {replace_if_present_flag,0},
  {registered_delivery,17},
  {validity_period,"180425184348000-"},
  {schedule_delivery_time,[]},
  {priority_flag,0},
  {protocol_id,52},
  {esm_class,0},
  {destination_addr,"41790000000"},
  {dest_addr_npi,1},
  {dest_addr_ton,1},
  {source_addr,"11111111111"},
  {source_addr_npi,1},
  {source_addr_ton,1},
  {service_type,[]}]}.
> smpp:pack(Pdu).
{error,4,6,13}
> smpp:err(6).  
{'ESME_RINVPRTFLG',"ESME_RINVPRTFLG",
                   "Invalid Priority Flag"}

Ref : GSM 03.40 Protocol Identifiers

c-bik commented 6 years ago

Test case to reproduce

{"submit_sm_protocol_id_52_issue_65",
  "00 00 00 44 00 00 00 04 00 00 00 00 00 00 00 01 00 01 01 34 31 30 33 37 00 "
  "01 01 30 37 39 34 36 35 30 31 31 35 00 00 34 00 00 00 11 00 00 00 14 74 65 "
  "73 74 20 73 77 69 73 73 63 6F 6D 20 28 53 4D 50 50 29",
  #{command_id => <<"submit_sm">>,command_length => 68,
    command_status => <<"ESME_ROK">>,
    data_coding => <<"MC Specific">>,
    dest_addr_npi => <<"ISDN (E163/E164)">>,
    dest_addr_ton => <<"International">>,
    destination_addr => <<"0794650115">>,esm_class => 0,
    priority_flag => 0,protocol_id => 52,
    registered_delivery => 17,replace_if_present_flag => 0,
    schedule_delivery_time => <<>>,sequence_number => 1,
    service_type => <<>>,
    short_message => <<"test swisscom (SMPP)">>,
    sm_default_msg_id => 0,source_addr => <<"41037">>,
    source_addr_npi => <<"ISDN (E163/E164)">>,
    source_addr_ton => <<"International">>,
    validity_period => <<>>}