[solved] SMS count issue on unicode message

Dear Anton, Big like for new release because solving SMS divider 63 for long SMS is important, after upgrade to 1.1 Unicode SMS not count correctly when send to queue, it means counter in compose page shows “70 chars: 1 SMS” but after send SMS it shows 2 message queued and accordingly 2 credit will be deducted

Hi,

Ok, can you paste here the example text you’ve sent.

anton

این یک پیامک تست می باشد
این یک پیامک تست می باشد
این یک پیامک تست است

are those 3 lines in single SMS or 3 example SMSes ?

anton

Yes these 3 lines are in single SMS

ok, looks good on my server, your SMS counted only 1 SMS

I’m using playSMS 1.1

here’s the log:

127.0.0.1 localhost 2015-07-12 15:35:34 PID55a226d6b7759 admin L2 sendsms # start uid:1 sender_id:[TESTSENDER] smsc:[]
127.0.0.1 localhost 2015-07-12 15:35:34 PID55a226d6b7759 admin L3 sendsms # maxlen:1071 footerlen:0 footer:[] msglen:124 message:[این یک پیامک تست می باشد این یک پیامک تست می باشد این یک پیامک تست است]
127.0.0.1 localhost 2015-07-12 15:35:34 PID55a226d6b7759 admin L2 sendsms_queue_create # saving queue_code:db1c212388800c2f66f2d3020cc3d7c6 src:TESTSENDER scheduled:2015-07-12 15:35:34
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L2 sendsms_queue_create # saved queue_code:db1c212388800c2f66f2d3020cc3d7c6 id:51
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[XXXXXXXX]
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[XXXXXXXX]
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L3 simplerate_hook_rate_getbyprefix # rate not found to:XXXXXXXXX default_rate:0
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:124 unicode:1 to:XXXXXXXXX enable_credit_unicode:1 count:1 rate: charge:0
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L2 sendsms # dst:1 sms_count:1 total_charges:0
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L2 sendsms_queue_push # saving queue_code:db1c212388800c2f66f2d3020cc3d7c6 dst:XXXXXXXXX
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L2 sendsms_queue_push # saved queue_code:db1c212388800c2f66f2d3020cc3d7c6 smslog_id:160
127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L2 sendsms # end queue_code:db1c212388800c2f66f2d3020cc3d7c6 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

It was charged only 1 SMS:

127.0.0.1 localhost 2015-07-12 15:35:35 PID55a226d6b7759 admin L2 sendsms # dst:1 sms_count:1 total_charges:0

When composing SMS:

Submit message and only counted 1 queue, it means 1 SMS:

In SMS queue:

In All sent messages:

anton

I can’t send screenshot because “new user” but in my test all of result was different than you, if upload permission allow me I will send you my screenshots

You mean you can just drag and drop to the form ? If not you can post to google photos and link here

Type something like this to show the image:

![Some text](http://the-image-url-here)

anton

Compose message:

Queued:

Sent Message:

Log:

Exactly the same length like in my server, 124 chars (when counted non-unicode):

L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:124 unicode:1 to:XXXXXXXXX enable_credit_unicode:1 count:1 rate: charge:0

Try again but this time with logstate set to 3, edit your config.php and look for logstate, change it to 3 and then restart playsmsd, test 1 more time

seek the log again, but this time paste the part from “sendsms # start” to “sendsms # end”, like my pasted log above

anton

- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 sendsmsd # start processing queue_code:8ab3c778fa93f0b3df2b3a92e975b67c queue_count:1 sms_count:2 scheduled:2015-07-12 14:39:27 uid:1 gpid:0 sender_id:TEST
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 sendsmsd # sending queue_code:8ab3c778fa93f0b3df2b3a92e975b67c smslog_id:20 to:+XXXXXXXXXXX sms_count:2 counter:1
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 sendsms_intercept # msgtemplate modified sms_sender:[TEST] sms_footer:[] sms_to:[+XXXXXXXXXXX] sms_msg:[این یک پیامک تست می باشد این یک پیامک تست می باشد این یک پیامک تست است] uid:[1] gpid:[0] sms_type:[text] unicode:[1] queue_code:[8ab3c778fa93f0b3df2b3a92e975b67c] smsc:[]
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 outgoing_hook_sendsms_intercept # found SMSCs:[kannel]
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 outgoing_hook_sendsms_intercept # using prefix based smsc smsc:[kannel] uid:1 parent_uid:0 from:TEST to:+XXXXXXXXXXX
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 sendsms_intercept # outgoing modified sms_sender:[TEST] sms_footer:[] sms_to:[+XXXXXXXXXXX] sms_msg:[این یک پیامک تست می باشد این یک پیامک تست می باشد این یک پیامک تست است] uid:[1] gpid:[0] sms_type:[text] unicode:[1] queue_code:[8ab3c778fa93f0b3df2b3a92e975b67c] smsc:[kannel]
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 sendsms_process # start
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:XX rate:10.000 description:XXXX to:+XXXXXXXXXXX
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:124 unicode:1 to:+XXXXXXXXXXX enable_credit_unicode:0 count:2 rate:10.000 charge:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 simplerate__cansend # allowed user uid:1 sms_to:+XXXXXXXXXXX credit:620.000 count:2 rate:10.000 charge:20 balance:600
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 sendsms # saving smslog_id:20 u:1 g:0 gw:kannel smsc:kannel s:TEST d:+XXXXXXXXXXX type:text unicode:1 status:0
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 sendsms_process # saved smslog_id:20 id:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 sendsms # final smslog_id:20 gw:kannel smsc:kannel message:این یک پیامک تست می باشد این یک پیامک تست می باشد این یک پیامک تست است len:124
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 kannel_hook_sendsms # enter smsc:kannel smslog_id:20 uid:1 to:+XXXXXXXXXXX
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 kannel__outgoing # smslog_id:20 response:0: Accepted for delivery
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 dlr # isdlrd:1 smslog_id:20 p_status:0 uid:1
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 kannel__outgoing # end smslog_id:20 p_status:0
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 simplerate__deduct # enter smslog_id:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:XX rate:10.000 description:XXX to:+XXXXXXXXXXX
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:124 unicode:1 to:+XXXXXXXXXXX enable_credit_unicode:0 count:2 rate:10.000 charge:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 credit_hook_rate_setusercredit # saving uid:1 balance:600
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 credit_hook_rate_setusercredit # saved uid:1 balance:600
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:20 msglen:124 count:2 rate:10.000 charge:20 credit:620.000 balance:600
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 simplebilling__post # saving smslog_id:20 rate:10.000 credit:620.000 count:2 charge:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L2 simplebilling__post # saved smslog_id:20 id:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 simplerate__deduct # deduct successful uid:1 parent_uid: smslog_id:20
- 2015-07-12 14:39:28 PID55a23cd8063a7 - L3 simplerate__deduct # credit_lowest_limit:0 balance:600 charge:20
-2015-07-12 14:39:28 PID55a23cd8063a7 - L2 sendsms_process # end

enable_credit_unicode:0 is the difference

go to Settings → Main configuration and set Enable credit unicode SMS as normal SMS, set to Yes.

anton

1 Like

Thanks, it works like a charm