-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for receipted_message_id
& fix correlation_handler bug
#97
Comments
user_message_reference
user_message_reference
& fix correlation_handler bug
Here's an alternative correlation workflow.
|
user_message_reference
& fix correlation_handler bug* receipted_message_id
& fix correlation_handler bug
* receipted_message_id
& fix correlation_handler bugreceipted_message_id
& fix correlation_handler bug
What: - Fix a bug of correlation between `submit_sm_resp` and `deliver_sm` Why: - The way `naz` was handling correlations was: - when sending `submit_sm` we save the `sequence_number` - when we get `submit_sm_resp` we use its `sequence_number` and look it up from Correlater - when we get a `deliver_sm` request, we use its `sequence_number` and look it up from Correlater The way `naz` now does it after the fix is; - when sending `submit_sm` we save the `sequence_number` - when we get `submit_sm_resp` we lookup `sequence_number` and use it for correlation - Additionally, `submit_sm_resp` has a `message_id` in the body. This is the SMSC message ID of the submitted message. - We take this `message_id` and save it. - when we get a `deliver_sm` request, it includes a `receipted_message_id` in the optional body parameters. - we get that `receipted_message_id` and use it to lookup from where we had saved the one from `submit_sm_resp` - This implementation is not without fault; as before Correlation is still on a best effort. We are using `receipted_message_id` to correlate `submit_sm_resp` and `deliver_sm`; However, `receipted_message_id` is an optional tag that SMSC can omit; and they do omit[1][2][3] - fixes: #97 References: 1. opentelecoms-org/jsmpp#62 2. praekeltfoundation/vumi#298 3. praekeltfoundation/vumi#637
We are currently using
sequence_numbers
to correlate a request to smsc and a response from smsc:naz/naz/client.py
Lines 380 to 386 in 881c1fe
The SMSC spec has an optional parameter
user_message_reference
that you can send to SMSC as part of the request(submit_sm
) and SMSC will send it back in the response(deliver_sm
)see section 4.4.1 & 4.6.1 of smpp spec.
Two things to note:
when you send
submit_sm
the sequence_number you specify is returned in thesubmit_sm_resp
.However, that sequence_number is not available in the
deliver_sm
request from SMSC.This means that our correlation as it currently exists;
naz/naz/client.py
Lines 380 to 386 in 881c1fe
is broken.
We need to implement
user_message_reference
to try and fix thatWhen you send a
user_message_reference
insubmit_sm
, it is not returned insubmit_sm_resp
. it is only returned indeliver_sm
.So way forward:
submit_sm
andsubmit_sm_resp
receipted_message_id
to correlatesubmit_sm
anddeliver_sm
One is a bug while the second one is a feature request.
We should at the very least fix the bug
The text was updated successfully, but these errors were encountered: