[Solved] Incorrect sms count in unicode


(Hamidreza Mahmoudi) #1

Hello
Playsms calculate incorrectly unicode sms after send.
Here is screenshots.
3 SMS is correct


(Anton Raharja) #2

Its unicode sms, basically 1 sms for utf7 text will be half for utf16 text.

The length of 1 sms in utf7 is 160, and in utf8 its 140, with unicodes its only 70 chars per sms.

Anton


(Hamidreza Mahmoudi) #3

How can I do for calculate send messages exactly like compose message ?
Unicode SMSes brfore sending in compose message is different when SMS going to sent messages.
Before sending SMS count will be correctly calculate but after send SMS calculate cost and count incorrectly.


(Anton Raharja) #4

Can you show me screenshot, what kind differences.

And try setting this option to yes in Main configuration and test again

Anton


(Hamidreza Mahmoudi) #5

Enable credit unicode SMS as normal SMS already set to ‘yes’

Here is screenshot.
Unicode sms count in compose sms is 3 SMSes
And in outbox and sent message is calculate and count for 2 SMSes.


(Anton Raharja) #6

Oh it could be because of setting to yes, what happen when its no ?

Anton


(Hamidreza Mahmoudi) #7

Its same.
No different


(Anton Raharja) #8

I tested it, there is differences, but its not related to your report.

The problem is in text counter used by playSMS. Theres nothing I can do with it for now, its a known issue. The way it calculate SMS is different from playSMS when the text is unicode.

anton


(Hamidreza Mahmoudi) #9

How can I fix it?
Because I’m currently losing money for every SMS.
And its so important.


(Anton Raharja) #10

I dont have time to fix it.

Here:

And here:

Just remove the counter perhaps ? Remove from sendsms.html.

anton


(Hamidreza Mahmoudi) #11

Not working.
Please consider time for fix it, Because we have a problem and economic losses
Thank you in advance.


(Anton Raharja) #12

What is not working?

Anton


(Hamidreza Mahmoudi) #13

I removed counter perhaps from sendsms.html
but not fixed


(Anton Raharja) #14

If you remove the counter then how did you compare ? You compared between the counter and the report previously.

Anton


(Hamidreza Mahmoudi) #16

I sent this SMS
تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تست تس تست تست تست تست
Actually this SMS is 3pages and playsms compose calculate 3 SMS, but after send playsms calculate 2 credit and only 2 messages are deducted from the user’s credit. and SMS sent completely.


(Anton Raharja) #17

I tested in my playSMS, if you set no to Enable credit unicode SMS as normal SMS in Main configuration you will get 4 credits.

So as a workaround you could set that for now, until a fix available. It does looks like a bug, so I’m working on it.

anton


(Anton Raharja) #18

Ok, I have some modification that needs some testing, if you want to please download here and replace some of your playSMS files (fn.php in sendsms, simplebilling and simplerate). Restart playsmsd and test again.

Here is the patch:
https://ngoprek.org/pub/patch_sms_len.tar.gz

Please note you must set no to Enable credit unicode SMS as normal SMS in Main configuration

anton


(Hamidreza Mahmoudi) #19

Fixed.
Thank you in advance.