playSMS Forum

Credit doesn't get deducted for some random SMS

Hi,

I’m experiencing issues with Playsms credit deduction. Most of the time credit deduction works fine but sometimes credit doesn’t get deducted even though the SMS was sent successfully. Is for example as per the attached logs, 4 SMS were sent but credits were deducted for 3 of them. All 4 SMS were sent to the same phone number. I’m seeing the multiple instances of same adhoc_balance for the SMS that weren’t charged. i.e.

adhoc_balance:64
adhoc_balance:63
adhoc_balance:63
adhoc_balance:62

As you are seeing on the screenshot those SMS weren’t billed, there’s difference in the values of sent and billed SMS. (1 credit = 1 SMS).

root@gateway1:/home/sms# /home/sms/bin/playsmsd check
PLAYSMSD_CONF = /etc/playsmsd.conf
PLAYSMS_PATH = /home/sms/public_html
PLAYSMS_LIB = /home/sms/lib/playsms
PLAYSMS_BIN = /home/sms/bin
PLAYSMS_LOG = /home/sms/log/playsms
DAEMON_SLEEP = 1
ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING)
IS_RUNNING = 1
PIDS schedule = 830
PIDS ratesmsd = 832
PIDS dlrssmsd = 834
PIDS recvsmsd = 836
PIDS sendsmsd = 838
root@gateway1:/home/sms# /home/sms/bin/playsmsd version
1.4.3
root@gateway1:/home/sms#  

Full log -

xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms #         start uid:3 sender_id:[1234] smsc:[]
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms # autodetect unicode:0
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms_queue_create # saving queue_code:fb7036884caf22b310f843c079a479e7 src:1234 scheduled:2022-06-27 17:03:21
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms_queue_create # saved queue_code:fb7036884caf22b310f843c079a479e7 id:94
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms # dst_count:1 sms_count:1 total_charges:1
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms_queue_push # saving queue_code:fb7036884caf22b310f843c079a479e7 dst:xxxxxxxxxxxxx
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms_queue_push # saved queue_code:fb7036884caf22b310f843c079a479e7 smslog_id:79
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:21 PID62b98e794b218 user4 L2 sendsms # end queue_code:fb7036884caf22b310f843c079a479e7 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms # start uid:3 sender_id:[1234] smsc:[]
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms # autodetect unicode:0
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms_queue_create # saving queue_code:118b2eca4c202af2061cf926dd13e141 src:1234 scheduled:2022-06-27 17:03:25
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms_queue_create # saved queue_code:118b2eca4c202af2061cf926dd13e141 id:95
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms # dst_count:1 sms_count:1 total_charges:1
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms_queue_push # saving queue_code:118b2eca4c202af2061cf926dd13e141 dst:xxxxxxxxxxxxx
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms_queue_push # saved queue_code:118b2eca4c202af2061cf926dd13e141 smslog_id:80
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:03:25 PID62b98e7c9a3f9 user4 L2 sendsms # end queue_code:118b2eca4c202af2061cf926dd13e141 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2022-06-27 17:03:25 PID62b98e7be010f - L2 sendsmsd # start processing queue_code:fb7036884caf22b310f843c079a479e7 chunk:0 queue_count:1 sms_count:1 scheduled:2022-06-27 17:03:21 uid:3 gpid:0 sender_id:1234
- - 2022-06-27 17:03:25 PID62b98e7be010f - L2 sendsmsd # sending queue_code:fb7036884caf22b310f843c079a479e7 smslog_id:79 to:xxxxxxxxxxxxx sms_count:1 counter:1
- - 2022-06-27 17:03:26 PID62b98e7be010f - L2 recvsms_process # using default SMSC smsc:[generic]
- - 2022-06-27 17:03:26 PID62b98e7be010f - L2 sendsms_process # start
- - 2022-06-27 17:03:26 PID62b98e7be010f - L2 simplerate_hook_rate_cansend # allowed user uid:3 sms_to:xxxxxxxxxxxxx adhoc_credit:65 count:1 rate:1 charge:1 adhoc_balance:64
- - 2022-06-27 17:03:26 PID62b98e7be010f - L2 sendsms # saving smslog_id:79 u:3 parent_uid:0 g:0 gw:generic smsc:generic s:1234 d:xxxxxxxxxxxxx type:json unicode:0 status:0
- - 2022-06-27 17:03:26 PID62b98e7be010f - L2 sendsms_process # saved smslog_id:79 id:79
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 generic_hook_sendsms # sent smslog_id:79 message_id:1101 smsc:generic
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 simplerate_hook_rate_deduct # enter smslog_id:79
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 simplebilling_hook_billing_post # saving smslog_id:79 rate:1 count:1 charge:1
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 simplebilling_hook_billing_post # saved smslog_id:79 id:79
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 sendsms_process # end
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 sendsmsd # result queue_code:fb7036884caf22b310f843c079a479e7 to:xxxxxxxxxxxxx flag:1 smslog_id:79
- - 2022-06-27 17:03:27 PID62b98e7be010f - L2 sendsmsd # finish processing queue_code:fb7036884caf22b310f843c079a479e7 uid:3 sender_id:1234 queue_count:1 sms_count:1
- - 2022-06-27 17:03:27 PID62ae353c0f0d4 - L2 simplebilling__finalize # saving smslog_id:79
- - 2022-06-27 17:03:27 PID62ae353c0f0d4 - L2 simplebilling__finalize # saved smslog_id:79
- - 2022-06-27 17:03:28 PID62b98e7fd49d2 - L2 sendsmsd # start processing queue_code:118b2eca4c202af2061cf926dd13e141 chunk:0 queue_count:1 sms_count:1 scheduled:2022-06-27 17:03:25 uid:3 gpid:0 sender_id:1234
- - 2022-06-27 17:03:28 PID62b98e7fd49d2 - L2 sendsmsd # sending queue_code:118b2eca4c202af2061cf926dd13e141 smslog_id:80 to:xxxxxxxxxxxxx sms_count:1 counter:1
- - 2022-06-27 17:03:29 PID62b98e7fd49d2 - L2 recvsms_process # using default SMSC smsc:[generic]
- - 2022-06-27 17:03:29 PID62b98e7fd49d2 - L2 sendsms_process # start
- - 2022-06-27 17:03:29 PID62b98e7fd49d2 - L2 simplerate_hook_rate_cansend # allowed user uid:3 sms_to:xxxxxxxxxxxxx adhoc_credit:64 count:1 rate:1 charge:1 adhoc_balance:63
- - 2022-06-27 17:03:29 PID62b98e7fd49d2 - L2 sendsms # saving smslog_id:80 u:3 parent_uid:0 g:0 gw:generic smsc:generic s:1234 d:xxxxxxxxxxxxx type:json unicode:0 status:0
- - 2022-06-27 17:03:29 PID62b98e7fd49d2 - L2 sendsms_process # saved smslog_id:80 id:80
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 generic_hook_sendsms # sent smslog_id:80 message_id:1101 smsc:generic
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 simplerate_hook_rate_deduct # enter smslog_id:80
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 simplebilling_hook_billing_post # saving smslog_id:80 rate:1 count:1 charge:1
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 simplebilling_hook_billing_post # saved smslog_id:80 id:80
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 sendsms_process # end
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 sendsmsd # result queue_code:118b2eca4c202af2061cf926dd13e141 to:xxxxxxxxxxxxx flag:1 smslog_id:80
- - 2022-06-27 17:03:31 PID62b98e7fd49d2 - L2 sendsmsd # finish processing queue_code:118b2eca4c202af2061cf926dd13e141 uid:3 sender_id:1234 queue_count:1 sms_count:1
173.249.11.232 sms.hostname.tld 2022-06-27 17:06:40 PID62b98f4077b2d - L2 auth_validate_login # valid login u:golamakondo uid:4 ip:173.249.11.232
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms # start uid:3 sender_id:[1234] smsc:[]
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms # autodetect unicode:0
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms_queue_create # saving queue_code:1cef96cc93344fe44f2ae997630677a5 src:1234 scheduled:2022-06-27 17:06:51
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms_queue_create # saved queue_code:1cef96cc93344fe44f2ae997630677a5 id:96
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms # dst_count:1 sms_count:1 total_charges:1
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms_queue_push # saving queue_code:1cef96cc93344fe44f2ae997630677a5 dst:xxxxxxxxxxxxx
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms_queue_push # saved queue_code:1cef96cc93344fe44f2ae997630677a5 smslog_id:81
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 17:06:51 PID62b98f4b014c1 user4 L2 sendsms # end queue_code:1cef96cc93344fe44f2ae997630677a5 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 sendsmsd # start processing queue_code:1cef96cc93344fe44f2ae997630677a5 chunk:0 queue_count:1 sms_count:1 scheduled:2022-06-27 17:06:51 uid:3 gpid:0 sender_id:1234
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 sendsmsd # sending queue_code:1cef96cc93344fe44f2ae997630677a5 smslog_id:81 to:xxxxxxxxxxxxx sms_count:1 counter:1
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 recvsms_process # using default SMSC smsc:[generic]
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 sendsms_process # start
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 simplerate_hook_rate_cansend # allowed user uid:3 sms_to:xxxxxxxxxxxxx adhoc_credit:64 count:1 rate:1 charge:1 adhoc_balance:63
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 sendsms # saving smslog_id:81 u:3 parent_uid:0 g:0 gw:generic smsc:generic s:1234 d:xxxxxxxxxxxxx type:json unicode:0 status:0
- - 2022-06-27 17:06:53 PID62b98f4c3c5d8 - L2 sendsms_process # saved smslog_id:81 id:81
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 generic_hook_sendsms # sent smslog_id:81 message_id:1101 smsc:generic
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 simplerate_hook_rate_deduct # enter smslog_id:81
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 simplebilling_hook_billing_post # saving smslog_id:81 rate:1 count:1 charge:1
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 simplebilling_hook_billing_post # saved smslog_id:81 id:81
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 sendsms_process # end
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 sendsmsd # result queue_code:1cef96cc93344fe44f2ae997630677a5 to:xxxxxxxxxxxxx flag:1 smslog_id:81
- - 2022-06-27 17:06:54 PID62b98f4c3c5d8 - L2 sendsmsd # finish processing queue_code:1cef96cc93344fe44f2ae997630677a5 uid:3 sender_id:1234 queue_count:1 sms_count:1
- - 2022-06-27 17:06:55 PID62ae353c0f0d4 - L2 simplebilling__finalize # saving smslog_id:81
- - 2022-06-27 17:06:55 PID62ae353c0f0d4 - L2 simplebilling__finalize # saved smslog_id:81
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms # start uid:3 sender_id:[1234] smsc:[]
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms # autodetect unicode:0
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms_queue_create # saving queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 src:1234 scheduled:2022-06-27 18:02:46
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms_queue_create # saved queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 id:99
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms # dst_count:1 sms_count:1 total_charges:1
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms_queue_push # saving queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 dst:xxxxxxxxxxxxx
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms_queue_push # saved queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 smslog_id:84
xxx.xxx.xxx.xxx sms.hostname.tld 2022-06-27 18:02:46 PID62b99c6592eb3 user4 L2 sendsms # end queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 sendsmsd # start processing queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 chunk:0 queue_count:1 sms_count:1 scheduled:2022-06-27 18:02:46 uid:3 gpid:0 sender_id:1234
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 sendsmsd # sending queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 smslog_id:84 to:xxxxxxxxxxxxx sms_count:1 counter:1
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 recvsms_process # using default SMSC smsc:[generic]
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 sendsms_process # start
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 simplerate_hook_rate_cansend # allowed user uid:3 sms_to:xxxxxxxxxxxxx adhoc_credit:63 count:1 rate:1 charge:1 adhoc_balance:62
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 sendsms # saving smslog_id:84 u:3 parent_uid:0 g:0 gw:generic smsc:generic s:1234 d:xxxxxxxxxxxxx type:json unicode:0 status:0
- - 2022-06-27 18:02:50 PID62b99c692b0a5 - L2 sendsms_process # saved smslog_id:84 id:84
- - 2022-06-27 18:02:52 PID62b99c692b0a5 - L2 generic_hook_sendsms # sent smslog_id:84 message_id:1101 smsc:generic
- - 2022-06-27 18:02:53 PID62b99c692b0a5 - L2 simplerate_hook_rate_deduct # enter smslog_id:84
- - 2022-06-27 18:02:53 PID62b99c692b0a5 - L2 simplebilling_hook_billing_post # saving smslog_id:84 rate:1 count:1 charge:1
- - 2022-06-27 18:02:53 PID62b99c692b0a5 - L2 simplebilling_hook_billing_post # saved smslog_id:84 id:84
- - 2022-06-27 18:02:53 PID62b99c692b0a5 - L2 sendsms_process # end
- - 2022-06-27 18:02:53 PID62b99c692b0a5 - L2 sendsmsd # result queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 to:xxxxxxxxxxxxx flag:1 smslog_id:84
- - 2022-06-27 18:02:53 PID62b99c692b0a5 - L2 sendsmsd # finish processing queue_code:f28d68ad3e9c26ac36dc687c77fa6cf3 uid:3 sender_id:1234 queue_count:1 sms_count:1

Unfortunately I can’t reproduce the issue whenever I want. It just happens on random SMS. Can you please look into the logs pasted above and suggest me something to fix this?

Thanks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.