Q
Q
qpPeW2017-07-04 11:17:50
Asterisk
qpPeW, 2017-07-04 11:17:50

How to merge long SMS?

Good day, there is a problem with long SMS messages coming to Asterisk.
extensions.conf

exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,System(echo '${STRFTIME(${EPOCH}, ,%Y-%m-%d %H:%M:%S)} - ${DONGLENAME} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' >> /var/log /asterisk/sms.txt)
exten => sms,n,Hangup()

sms.txt
2017-07-04 08:42:50 - dongle0 - lifecell: Service package was not charged due to low balance. Call tariff - 0,
2017-07-04 08:42:53 - dongle0 - lifecell: 50 UAH/min. To get a package of services for 30 days, it is enough to
replenish 2017-07-04 08:42:55 - dongle0 - lifecell: thread account. Details: *111# and *121#.

It turns out 3 separate SMS, but in fact these are 3 pieces of one SMS, but how to combine them into one is not entirely clear.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Q
qpPeW, 2017-07-22
@qpPeW

The issue is resolved at the PHP level.

W
whiteadmin, 2017-07-04
@whiteadmin

Mat.chast. https://en.wikipedia.org/wiki/SMS

The text can consist of alphanumeric characters. The maximum message size in the GSM standard is 140 bytes (1120 bits). Thus, when using a 7-bit encoding (Latin alphabet and numbers), you can send messages up to 160 characters long. When using 8-bit encoding (German, French), you can send messages up to 140 characters long. To support other national alphabets (Chinese, Arabic, Russian, etc.), a 2-byte (16-bit) UCS-2 encoding is used. Thus, an SMS written in Cyrillic cannot exceed 70 characters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question