Description
Hi,
Recently, SMSC which whom I integrate starts sending decimal id in deliver receipt with leading zero like this id:0221067780 sub:001 dlvrd:001 [...]
. Based on example I wrote parsing logic, which use below snippet:
var longId = Long.parseLong(decimalIdFromReceipt)
var messageIdHex = Long.toString(longId, 16)
which obviously truncates leading zero on first line, parsing String
to Long
and fails matching with messageId from submit_sm_resp.
Is there any known better approach to parse messageId from deliver receipts ? Or maybe anyone knows how SMSC converts messageId into decimal representation, which I can invert on my side (assuming there is some well-known technic, not the custom one in each SMSC) ?
I know some deliver receipt's type can include messageId in optional parameter but as far I am concerned that SMSC does not support it...
Thanks for any tips in advance!