Get report from short_message
sergey-chechaev opened this issue · 3 comments
Some operator return status of delivered SMS in a short message. Is there a method in SMPPEX Library to invoke delivery information from short_message
: date, stat and err e.t.c?
Example:
%SMPPEX.Pdu{
command_id: 5,
command_status: 0,
mandatory: %{
data_coding: 0,
dest_addr_npi: 0,
dest_addr_ton: 5,
destination_addr: "TEST",
esm_class: 4,
priority_flag: 0,
protocol_id: 0,
registered_delivery: 0,
replace_if_present_flag: 0,
schedule_delivery_time: "",
service_type: "",
short_message: "id:rdwjwxns18krxr9936ey96ymcw sub:000 dlvrd:000 submit date:180711070003912+ done date:180711070000012+ stat:UNDELIV err:000",
sm_default_msg_id: 0,
sm_length: 124,
source_addr: "79222222222",
source_addr_npi: 1,
source_addr_ton: 1,
validity_period: ""
},
optional: %{},
ref: #Reference<0.655675225.434896897.260194>,
sequence_number: 4
}
Hello!
Is this a full deriver_sm message from SMSC?
The appropriate way to determine message status is by message_state
TLV field, but it seems to be absent.
As far as I know, the format of short_message isn't strictly specified and may vary from SMSC to SMSC, so it's difficult to create a universal parser.
@savonarola yes this is a full deriver_sm
message.
Is the format of short_message
specified by SMSC version? I mean SMPP 3.4 have the same format of short_message
so I can write a parser for this version? If it is, can I create PR? I add SMPP default version to config this lib and also you can pass the version of SMPP as a parameter.
The format isn't defined by SMPP version, it depends on SMSC implementation.
I have even met some SMSC's sending short_message in delivery reports in a binary format.