Skip to content

[help wanted] How to parse decimal id in deliver receipt with leading zero  #178

Open
@mario45211

Description

@mario45211

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions