RoEdAl / asterisk-chan-quectel

Asterisk channel driver for Quectel and SimCOM modules
GNU General Public License v2.0
18 stars 6 forks source link

Fix SMS Segment Ordering Issue in smsdb_put #12

Closed sparkcyf closed 5 months ago

sparkcyf commented 5 months ago

Related issue: https://github.com/RoEdAl/asterisk-chan-quectel/issues/11#issuecomment-1923205774

The condition check in the smsdb_put function now ensures all segments are received before processing. (when order == parts, (e.g. the quectel receive the msg parts in the order of 1, 3, 2, after received the third msg, the res > 0 && order == parts conditions will be satisfied, however part 2 of the msg still not received.

This commit may fixes the issue where the segments were received out of order and the message was not being reassembled correctly.