Closed krstdmr closed 5 months ago
PR review from any of you is appreciated. @linxGnu || @goten4 || @laduchesneau. Thanks in advance.
Ive reviewed the changes, all looks good. I will also run test on my end.
To be honest, packed GSM never worked for me with gosmpp, even thou my SMSC supports it. So ill test these changes today and get back to you.
@laduchesneau Thanks. I have just pushed one minor fix more. Please see the ref. below; Ref : https://en.wikipedia.org/wiki/GSM_03.38 "When there are 1 to 6 spare bits in the last octet of a message, these bits are set to zero (these bits do not count as a character but only as a filler). When there are 7 spare bits in the last octet of a message, these bits are set to the 7-bit code of the CR control (also used as a padding filler) instead of being set to zero (where they would be confused with the 7-bit code of an '@' character)."
LGTM (mostly)
I opened a comment/question for the code block added in Shortmessage.go
Hi @laduchesneau. Have you had chance to test your SMSC? We had to active 7-bit coding in SMSC before using it.
Hi, I did test and it did not work....but its not the library, its the SMSC, its currently configured for 8bit GSM.
That said, I did test your code with our old internal tool using cloudhopper-commons and the bytes match.
I cant test the split function, we don't use it, but the encoders work.
Yeah, makes sense. As I said, that was something configurable in our SMSC, worked after we activated. Great that you verified with cloudhopper-commons.
@laduchesneau I don't have the SMSC here to test 7bitpacked too. Since it work for @krstdmr with his SMSC, I think its good enough to merge this PR. HDYT?
@krstdmr
the PR also breaks gsm7bit none-packed. Could you please revert the change, only update packed part.
Something like this:
*gsm7bit
packed
field in another PRIn this way, it's easy to review + keep working version of gsm7bit non-packed
Hi @linxGnu . Sure, I can try to change as you suggested in the beginning of the next week. But could you please point the place where it breaks, or any hints about what happens so that it might be easier for me to understand the problem?
@linxGnu Hi again. I have pushed the changes as you requested. (Introduced gsm7bitPacked type instead). I appreciate if any of you review the PR when you have time.
It's great to hear that @laduchesneau
For SMPP, battle test in PROD is the best trustable source.
Thank you for great contribution @krstdmr @laduchesneau
Great to see the changes er merged. Thanks for a nice collaboration @laduchesneau @linxGnu
Handling escape chars during Split/ShouldSplit Esacpe characters occupy 2 octets/septets Ref1: https://en.wikipedia.org/wiki/GSM_03.38 Ref2: https://www.developershome.com/sms/gsmAlphabet.asp
Fix for UCS2-> ShouldSplit where the first segment should be split just after 70 UCS2 chars (rune check, pls see unit tests), but the next after 67 chars.
Fix for EsmClass when Split returns a single part