Closed bluewithanas closed 4 months ago
Any help is much appreciated @tahseenjamal @linhduonggnu @linxGnu
the thing I want to achieve by doing this is to get a refernece string in my messages callbacks so that i can submit the statistics accordingly. Now the providers can have multiple submit_SM_RESPs in case of long messages which is getting tricky to handle on application end.
If we can get some sort of reference string attached on submit_SM and could recieve it along submit_SM_RESPs and Deliver_SM, i would be saved :p
@bluewithanas
I don't remember correctly about SMPP 3.4 Specs indicates that submit_sm_resp
will retain submit_sm
optional parameters.
No matter what, I highly recommend you to track everything by message_id
. Before submitting submit_sm
, you save (message_id, metadata) in any cache / key-value storage. Once receiving submit_sm_resp
, you get those metadata from cache throughout the message_id
key.
@bluewithanas The code submitted in the PR #134 does exactly what you want. Look at this example transeiver_with_request_window_and_custom_submitSm.
You can technically add any type you want in the CustomPdu, like a messageId or even a channel, as long as the customPDU has a pdu.PDU type.
If you want to test the PR before it gets merged, you can add this line to your go.mod:
replace github.com/linxGnu/gosmpp v0.2.1 => github.com/laduchesneau/gosmpp add_window_setting
This issue is resolved in the latest release.
@bluewithanas When you submit a message you have sequence number. Delivery response comes back with sequence number and message id
Later DLR has message id. So now you can the them with this approach
I want to assign some additional info text field and get the same while recieving submit_sm_resp and Deliver_SM. I am experimenting the possiblity of it but i have no idea how to unmarshal the response and get the optional parameters field.
I am doing this after
submitSm.Message.SetMessageWithEncoding step.
P.S: I am not getting optionalParameter data in submit_SM_RESP & Deliver_SM. It's null/ blank inside the field.
Any example how to propely assign it and parse the response?