I am not able to send with Playsms

am trying to send the message with playsms but it says queue 1 failed 0, unfortunately, I can send with kannel

when SMS submitted from playSMS web it will be saved in database, after that playsmsd (sendsmsd to be precise) will read the database and actually send it to the configured gateway

you can see whats going on by observing playsms log.

set logstate to 3 in config.php and restart playsmsd, then send 1 test SMS, see the log

paste here if you haven’t found the answer (please sanitize your log so that you dont reveal private information such as user, pass, URLs, hostnames, IPs here)

anton

127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L2 sendsms_queue_create # saved queue_code:12df69de1b99b2aec0485a222672575f id:13
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[+251]
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[+251] 127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:251 rate:1.000 description:004806 to:+25191xxxxxxx
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:13 unicode:0 to:+25191xxxxxxx enable_credit_unicode:0 count:1 rate:1.000 charge:1
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L2 sendsms # dst_count:1 sms_count:1 total_charges:1
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L2 sendsms_queue_push # saving queue_code:12df69de1b99b2aec0485a222672575f dst:+251....
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L2 sendsms_queue_push # saved queue_code:12df69de1b99b2aec0485a222672575f smslog_id:13
127.0.0.1 localhost 2020-04-05 10:14:26 PID5e899362b9fb2 admin L2 sendsms # end queue_code:12df69de1b99b2aec0485a222672575f queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

looks like theres no sendsmsd after that, do you have playsmsd running ?

anton

yes it is running… playsmsd status result looks like this playsmsd is running schedule at pid 2264 ratesmsd at pid 2266 dlrssmsd at pid 2268 recvsmsd at pid 2270 sendsmsd at pid 2272

ok, try to get more logs:

in your Terminal:

tail -n 0 -f /var/log/playsms.log | tee test1.txt

ps. use correct path for playsms.log

and then send 1 SMS from web, just 1 SMS

go back to Terminal and ctrl+c the tail command above, you will then have test1.txt, read it, edit for privacy stuff and paste here

anton

127.0.0.1 localhost 2020-04-05 13:07:59 PID5e89bc0fe387e hidden L2 sendsms # start uid:1 sender_id:[hidden] smsc:[]
127.0.0.1 localhost 2020-04-05 13:07:59 PID5e89bc0fe387e hidden L2 sendsms_queue_create # saving queue_code:f075a2d36a54fd0a6a58ac79b54ddd57 src:004806 scheduled:2020-04-05 13:07:59
127.0.0.1 localhost 2020-04-05 13:07:59 PID5e89bc0fe387e admin L2 sendsms_queue_create # saved queue_code:f075a2d36a54fd0a6a58ac79b54ddd57 id:56
127.0.0.1 localhost 2020-04-05 13:08:00 PID5e89bc0fe387e hidden L2 sendsms # dst_count:1 sms_count:1 total_charges:1
127.0.0.1 localhost 2020-04-05 13:08:00 PID5e89bc0fe387e hidden L2 sendsms_queue_push # saving queue_code:f075a2d36a54fd0a6a58ac79b54ddd57 dst:+251....
127.0.0.1 localhost 2020-04-05 13:08:00 PID5e89bc0fe387e hidden L2 sendsms_queue_push # saved queue_code:f075a2d36a54fd0a6a58ac79b54ddd57 smslog_id:45
127.0.0.1 localhost 2020-04-05 13:08:00 PID5e89bc0fe387e hidden L2 sendsms # end queue_code:f075a2d36a54fd0a6a58ac79b54ddd57 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

have you configure playSMS to use Kannel ? have you route it ?

anton

yes I have but it may not be correct. could you have a look at my kannel setting in playsms?

look actually I dont understand why its so short ? do you paste all the log or cut most of it ? and the pasted log dont have L3 logs, did you change the logstate ?

you just need to follow what I asked, and then paste everything here (but edit the privacy stuff), well not everything but log that happened after you send the test SMS

anton

this is an example of complete log:

172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms # start uid:1 sender_id:[1234] smsc:[]
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L3 sendsms # maxlen:459 footerlen:7 footer:[ @admin] msglen:26 message:[Hi u there, good morning!!]
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms_queue_create # saving queue_code:c46bc4d0c88016921eb62d057f91b643 src:1234 scheduled:2020-04-05 11:45:43
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms_queue_create # saved queue_code:c46bc4d0c88016921eb62d057f91b643 id:9
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[123456789]
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[123456789]
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:1 rate:1.000 description:Test to:123456789
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:33 unicode:0 to:123456789 enable_credit_unicode:0 count:1 rate:1.000 charge:1
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms # dst_count:1 sms_count:1 total_charges:1
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms_queue_push # saving queue_code:c46bc4d0c88016921eb62d057f91b643 dst:123456789
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms_queue_push # saved queue_code:c46bc4d0c88016921eb62d057f91b643 smslog_id:7
172.17.0.1 localhost 2020-04-05 11:45:43 PID5e89c4e6eeb39 admin L2 sendsms # end queue_code:c46bc4d0c88016921eb62d057f91b643 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsmsd # start processing queue_code:c46bc4d0c88016921eb62d057f91b643 chunk:0 queue_count:1 sms_count:1 scheduled:2020-04-05 11:45:43 uid:1 gpid:0 sender_id:1234
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsmsd # sending queue_code:c46bc4d0c88016921eb62d057f91b643 smslog_id:7 to:123456789 sms_count:1 counter:1
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 sendsms_intercept # msgtemplate modified sms_sender:[1234] sms_footer:[@admin] sms_to:[123456789] sms_msg:[Hi u there, good morning!!] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queue_code:[c46bc4d0c88016921eb62d057f91b643] smsc:[]
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 outgoing_hook_sendsms_intercept # no SMSC found uid:1 parent_uid:0 from:1234 to:123456789
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 recvsms_process # using default SMSC smsc:[dev]
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsms_process # start
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:1 rate:1.000 description:Test to:123456789
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:33 unicode:0 to:123456789 enable_credit_unicode:0 count:1 rate:1.000 charge:1
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 simplerate_hook_rate_cansend # allowed user uid:1 sms_to:123456789 adhoc_credit:99 count:1 rate:1.000 charge:1 adhoc_balance:98
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsms # saving smslog_id:7 u:1 parent_uid:0 g:0 gw:dev smsc:dev s:1234 d:123456789 type:text unicode:0 status:0
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsms_process # saved smslog_id:7 id:7
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 sendsms # final smslog_id:7 gw:dev smsc:dev message:Hi u there, good morning!! @admin len:33
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 dev_hook_sendsms # enter smsc:dev smslog_id:7 uid:1 to:123456789
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 dlr # isdlrd:1 smslog_id:7 p_status:3 uid:1
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 simplerate_hook_rate_deduct # enter smslog_id:7
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:1 rate:1.000 description:Test to:123456789
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:33 unicode:0 to:123456789 enable_credit_unicode:0 count:1 rate:1.000 charge:1
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 simplebilling_hook_billing_post # saving smslog_id:7 rate:1.000 count:1 charge:1
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 simplebilling_hook_billing_post # saved smslog_id:7 id:6
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L3 simplerate_hook_rate_deduct # deduct successful uid:1 parent_uid:0 smslog_id:7
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsms_process # end
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsmsd # result queue_code:c46bc4d0c88016921eb62d057f91b643 to:123456789 flag:1 smslog_id:7
- - 2020-04-05 11:45:44 PID5e89c4e819d3d - L2 sendsmsd # finish processing queue_code:c46bc4d0c88016921eb62d057f91b643 uid:1 sender_id:1234 queue_count:1 sms_count:1
- - 2020-04-05 11:45:45 PID5e89c4d78c254 - L3 dlrd # id:7 smslog_id:7 p_status:3 uid:1
- - 2020-04-05 11:45:45 PID5e89c4d78c254 - L2 simplebilling__finalize # saving smslog_id:7
- - 2020-04-05 11:45:45 PID5e89c4d78c254 - L2 simplebilling__finalize # saved smslog_id:7

mine does not have L3 log

this one have

check again your config.php, see logstate is it 3 ? make sure its 3.

and then restart your playsmsd

and then do the tail -f … | tee … like I showed you above, do the test SMS and see the test1.txt

your test1.txt must have logs similar to my example above, theres sendsms part, and then theres sendsmsd parts

anton

127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms # start uid:1 sender_id:[004806] smsc:[]
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L3 sendsms # maxlen:1530 footerlen:7 footer:[ @admin] msglen:2 message:[hi]
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms_queue_create # saving queue_code:2d5c7ad27add0b3f304bd05a11e410d5 src:004806 scheduled:2020-04-05 13:57:14
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms_queue_create # saved queue_code:2d5c7ad27add0b3f304bd05a11e410d5 id:58
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L3 sendsms_manipulate_prefix # before prefix manipulation:[+251917092830]
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L3 sendsms_manipulate_prefix # after prefix manipulation:[+251917092830]
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L3 simplerate_hook_rate_getbyprefix # rate not found to:+251917092830 default_rate:1
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:9 unicode:0 to:+251917092830 enable_credit_unicode:1 count:1 rate:1 charge:1
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms # dst_count:1 sms_count:1 total_charges:1
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms_queue_push # saving queue_code:2d5c7ad27add0b3f304bd05a11e410d5 dst:+251917092830
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms_queue_push # saved queue_code:2d5c7ad27add0b3f304bd05a11e410d5 smslog_id:47
127.0.0.1 localhost 2020-04-05 13:57:14 PID5e89c79a27bec admin L2 sendsms # end queue_code:2d5c7ad27add0b3f304bd05a11e410d5 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms # start uid:1 sender_id:[004806] smsc:[]
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L3 sendsms # maxlen:1530 footerlen:7 footer:[ @admin] msglen:2 message:[hi]
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms_queue_create # saving queue_code:e0db83aa4ed54ef3e9581d1343b1e127 src:004806 scheduled:2020-04-05 13:58:01
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms_queue_create # saved queue_code:e0db83aa4ed54ef3e9581d1343b1e127 id:59
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L3 sendsms_manipulate_prefix # before prefix manipulation:[+251917092830]
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L3 sendsms_manipulate_prefix # after prefix manipulation:[+251917092830]
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L3 simplerate_hook_rate_getbyprefix # rate not found to:+251917092830 default_rate:1
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:9 unicode:0 to:+251917092830 enable_credit_unicode:1 count:1 rate:1 charge:1
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms # dst_count:1 sms_count:1 total_charges:1
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms_queue_push # saving queue_code:e0db83aa4ed54ef3e9581d1343b1e127 dst:+251917092830
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms_queue_push # saved queue_code:e0db83aa4ed54ef3e9581d1343b1e127 smslog_id:48
127.0.0.1 localhost 2020-04-05 13:58:01 PID5e89c7c970e5b admin L2 sendsms # end queue_code:e0db83aa4ed54ef3e9581d1343b1e127 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
127.0.0.1 localhost 2020-04-05 14:08:19 PID5e89ca33c2e92 - L3 auth_validate_login # login attempt u:admin uid:1 p:21232f297a57a5a743894a0e4a801fc3 ip:127.0.0.1
127.0.0.1 localhost 2020-04-05 14:08:19 PID5e89ca33c2e92 - L2 auth_validate_login # valid login u:admin uid:1 ip:127.0.0.1
127.0.0.1 localhost 2020-04-05 14:08:19 PID5e89ca33c2e92 - L2 login # u:admin uid:1 status:2 sid:f5jnms9euog2jdlal88ildhc1q ip:127.0.0.1

Your playsmsd may not be installed properly. There should be sendsmsd after sendsms end queue_code

Which manual did you follow to install playSMS ?

anton

What should I do then?

If its new instalaltion, try to redo it. Even default installation, no configuration, you should see sendsmsd reading queues and send it (send to nowhere, but the log will show something)

see my blog https://antonraharja.com/tag/playsms/ pick 1.4.3 manual

anton

i will do that and come back. thanks