-
Notifications
You must be signed in to change notification settings - Fork 361
concatenating sms parts to a long sms from UDH #100
Comments
Hello behard, Below code snippet will return Message Parts Into Byte Array
You can loop generated byte Array to submit each part to connected smsc Thanks |
thank you @gruntday but I was looking for the reverse operation code, I have a list of message parts and I want to construct long sms bodies from them :) |
take a look on these methods: |
@behrad do you have the reference number and total parts and current seq per each message what i mean how current parts saved at your side ? so that i can give you exact example for concatenation |
they are standard smpp parts, the information you mean is in UDH headers. |
Hi I am trying to solve the same problem. @krasa - thanks for pointing to the GSM Utils methods. Using getShortMessageUserData and decoding based on the the relevant coding scheme I can get the message information. But to get the information from the User Data Header (i.e. number of total messages, message id, number of this message) I am battling. getShortMessageUserDataHeader returns a byte[] which I don't know how to parse to get the information. Is there any example code for processing the User Data Header in cloudhopper? In the provided example code I don't see any parsing of the actual user data header to get the information. |
Hello @gruntday, Therefore my question is, do padding bits need to be added between the UDH and the encoded bytes? Or, because the 7-bit characters are packed into octets, can we ignore the padding bits? Cheers, |
@JaimieW The specification is correct, you need those padding bits - I had a problem with that once. |
@krasa Thanks for that. I have the UDH determined which is in octets. I'm really struggling to see how to add the padding bits. Cheers, |
Hi @JaimieW Not sure if this will help - I battled to get the UDH 7 bit packing sorted and eventually modified @gruntday provided method to be like this - using PduBitPacker static class. Seems a bit of a hack but it works when integrating with out SMPP transit partner.
|
Also to answer my original question in case anyone else is battling with this:
I managed to sort this as follows:
|
Is there any code implementing concatenation of a list of single sms parts based on UDH into long messages (what that normally mobile phones do)?
P.S. may be considered as an off-topic issue but found it a good idea to ask in related repositories
The text was updated successfully, but these errors were encountered: