PlaySMS not sending messages to SMSTool

I’ve installed PlaySMS 1.0 and SMSTools 3

SMSTools 3 is working correctly sending and receiving messages, but when I send a message through PlaySMS it never reaches the cellphone or the SMSTool directories. Here’s smsd:

`# Global configuration

devices = GSM1,GSM2,GSM3

loglevel = 5

logfile = /var/log/sms/smsd.log
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent

delaytime = 2
errorsleeptime = 4
blocktime = 180
autosplit = 3
receive_before_send = yes

Modem configuration

[GSM1]
device = /dev/ttyUSB1
incoming = yes
baudrate = 115200
report = yes
primary_memory = SM
secondary_memory = SR

[GSM2]
device = /dev/ttyUSB4
incoming = yes
baudrate = 115200
report = yes
primary_memory = SM
secondary_memory = SR

[GSM3]
device = /dev/ttyUSB7
incoming = yes
baudrate = 115200
report = yes
primary_memory = SM
secondary_memory = SR
`

Here’s PlaySMS log

`192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms # start uid:1 sender_id:[1234] smsc:[]
192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms_queue_create # saving queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 src:1234 scheduled:2016-01-22 05:55:26
192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms_queue_create # saved queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 id:3
192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms # dst:1 sms_count:1 total_charges:0
192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms_queue_push # saving queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 dst:87991439
192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms_queue_push # saved queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 smslog_id:3
192.168.25.6 192.168.25.15 2016-01-22 05:55:26 PID56a1e06d7f9f3 admin L2 sendsms # end queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsmsd # start processing queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 queue_count:1 sms_count:1 scheduled:2016-01-22 05:55:26 uid:1 gpid:0 sender_id:1234
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsmsd # sending queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 smslog_id:3 to:87991439 sms_count:1 counter:1
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsms_process # start
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 simplerate__cansend # allowed user uid:1 sms_to:87991439 credit:0.000 count:1 rate: charge:0 balance:0
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsms # saving smslog_id:3 u:1 g:0 gw:dev smsc:dev s:1234 d:87991439 type:text unicode:1 status:0
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsms_process # saved smslog_id:3 id:3
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 simplerate__deduct # enter smslog_id:3
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 credit_hook_rate_setusercredit # no changes uid:1 balance:0
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:3 msglen:28 count:1 rate: charge:0 credit:0.000 balance:0
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 simplebilling__post # saving smslog_id:3 rate: credit:0.000 count:1 charge:0
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 simplebilling__post # saved smslog_id:3 id:3
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsms_process # end
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsmsd # result queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 to:87991439 flag:1 smslog_id:3
    • 2016-01-22 05:55:27 PID56a1e06ef1803 - L2 sendsmsd # finish processing queue_code:d3c694b238667c5bdd5cdfdfcfc4def8 uid:1 sender_id:1234 queue_count:1 sms_count:1
    • 2016-01-22 05:55:28 PID56a1dedb0a771 - L2 simplebilling__finalize # saving smslog_id:3
    • 2016-01-22 05:55:28 PID56a1dedb0a771 - L2 simplebilling__finalize # saved smslog_id:3
      192.168.25.6 192.168.25.15 2016-01-22 05:56:23 PID56a1e0a709e6e admin L2 user_pref # saving username:admin error_string:[Preferences have been saved]
      `

Have you configured your SMSC in PlaySMS?

Yes, I’ve selected SMSTool as gateway but it’s not working

Tried many configs, but it’s not working through PlaySMS only directly with SMSTools. I need help!

is playsmsd running? i had a similar issue. solved it by verifying that plpaysmsd is running AND reinstalling web directory. sendsms_hook is missing in logs.

Yes, is running, here’s the log when I do playsmsd check

root@Chipeira:~# playsmsd check PLAYSMSD_CONF = /etc/playsmsd.conf PLAYSMS_PATH = /var/www/playsms PLAYSMS_LIB = /var/lib/playsms PLAYSMS_BIN = /usr/local/bin PLAYSMS_LOG = /var/log/playsms DAEMON_SLEEP = 1 ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING) IS_RUNNING = 1 PIDS schedule = 6657 PIDS dlrssmsd = 6659 PIDS recvsmsd = 6661 PIDS sendsmsd = 6663

How do I reinstall web directory ?

Last PlaySMS log after another try

`192.168.25.6 192.168.25.15 2016-01-28 09:48:04 PID56a9fff3b4c6b - L2 auth_validate_login # valid login u:admin uid:1 ip:192.168.25.6
192.168.25.6 192.168.25.15 2016-01-28 09:48:04 PID56a9fff3b4c6b - L2 login # u:admin uid:1 status:2 sid:b79h9r5u95lh5g2krmobprtdf7 ip:192.168.25.6
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms # start uid:1 sender_id:[1234] smsc:[]
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms_queue_create # saving queue_code:12a5fa3ef610aef8a525d0ada9519528 src:1234 scheduled:2016-01-28 09:49:00
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms_queue_create # saved queue_code:12a5fa3ef610aef8a525d0ada9519528 id:8
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms # dst:1 sms_count:1 total_charges:0
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms_queue_push # saving queue_code:12a5fa3ef610aef8a525d0ada9519528 dst:92873830
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms_queue_push # saved queue_code:12a5fa3ef610aef8a525d0ada9519528 smslog_id:10
192.168.25.6 192.168.25.15 2016-01-28 09:49:00 PID56aa002c2c729 admin L2 sendsms # end queue_code:12a5fa3ef610aef8a525d0ada9519528 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsmsd # start processing queue_code:12a5fa3ef610aef8a525d0ada9519528 queue_count:1 sms_count:1 scheduled:2016-01-28 09:49:00 uid:1 gpid:0 sender_id:1234
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsmsd # sending queue_code:12a5fa3ef610aef8a525d0ada9519528 smslog_id:10 to:92873830 sms_count:1 counter:1
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsms_process # start
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 simplerate__cansend # allowed user uid:1 sms_to:92873830 credit:0.000 count:1 rate: charge:0 balance:0
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsms # saving smslog_id:10 u:1 g:0 gw:dev smsc:dev s:1234 d:92873830 type:text unicode:1 status:0
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsms_process # saved smslog_id:10 id:10
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 simplerate__deduct # enter smslog_id:10
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 credit_hook_rate_setusercredit # no changes uid:1 balance:0
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:10 msglen:19 count:1 rate: charge:0 credit:0.000 balance:0
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 simplebilling__post # saving smslog_id:10 rate: credit:0.000 count:1 charge:0
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 simplebilling__post # saved smslog_id:10 id:10
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsms_process # end
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsmsd # result queue_code:12a5fa3ef610aef8a525d0ada9519528 to:92873830 flag:1 smslog_id:10
    • 2016-01-28 09:49:02 PID56aa002dc83e3 - L2 sendsmsd # finish processing queue_code:12a5fa3ef610aef8a525d0ada9519528 uid:1 sender_id:1234 queue_count:1 sms_count:1
    • 2016-01-28 09:49:02 PID56a29c70d9f44 - L2 simplebilling__finalize # saving smslog_id:10
    • 2016-01-28 09:49:02 PID56a29c70d9f44 - L2 simplebilling__finalize # saved smslog_id:10
      `

simply copy everything from sources/web to your www-directory.
if you want to be sure there are no permission-issues, just do a
chmod -R 777 playsms/web
and test again. if the test succeeds and sms are sent, you have a problem with your permissions. if not, it is another issues, most likely with playsms-daemon configuration.
afterwards remove that directory with rwxrwxrwx-rights as soon as possible!

regards,
andre

I guaranteed the permissions for the following folders:

root@Chipeira:~# chmod -R 777 /var/spool/sms root@Chipeira:~# chmod -R 777 /var/spool/sms/outgoing root@Chipeira:~# chmod -R 777 /var/spool/sms/sent root@Chipeira:~# chmod -R 777 /var/spool/sms/incoming root@Chipeira:~# chmod -R 777 /var/spool/sms/checked root@Chipeira:~# chmod -R 777 /var/www/playsms root@Chipeira:~# chmod -R 777 /usr/local/bin root@Chipeira:~# chmod -R 777 /usr/local/src root@Chipeira:~#

Still not working, here’s PlaySMS log:

`192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms # start uid:1 sender_id:[1234] smsc:[]
192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms_queue_create # saving queue_code:faf9b98adc065a4dee96917942fa8bf2 src:1234 scheduled:2016-01-28 10:13:24
192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms_queue_create # saved queue_code:faf9b98adc065a4dee96917942fa8bf2 id:10
192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms # dst:1 sms_count:1 total_charges:0
192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms_queue_push # saving queue_code:faf9b98adc065a4dee96917942fa8bf2 dst:96390606
192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms_queue_push # saved queue_code:faf9b98adc065a4dee96917942fa8bf2 smslog_id:12
192.168.25.6 192.168.25.15 2016-01-28 10:13:24 PID56aa05e439605 admin L2 sendsms # end queue_code:faf9b98adc065a4dee96917942fa8bf2 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsmsd # start processing queue_code:faf9b98adc065a4dee96917942fa8bf2 queue_count:1 sms_count:1 scheduled:2016-01-28 10:13:24 uid:1 gpid:0 sender_id:1234
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsmsd # sending queue_code:faf9b98adc065a4dee96917942fa8bf2 smslog_id:12 to:96390606 sms_count:1 counter:1
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsms_process # start
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 simplerate__cansend # allowed user uid:1 sms_to:96390606 credit:0.000 count:1 rate: charge:0 balance:0
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsms # saving smslog_id:12 u:1 g:0 gw:dev smsc:dev s:1234 d:96390606 type:text unicode:0 status:0
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsms_process # saved smslog_id:12 id:12
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 simplerate__deduct # enter smslog_id:12
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 credit_hook_rate_setusercredit # no changes uid:1 balance:0
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:12 msglen:24 count:1 rate: charge:0 credit:0.000 balance:0
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 simplebilling__post # saving smslog_id:12 rate: credit:0.000 count:1 charge:0
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 simplebilling__post # saved smslog_id:12 id:12
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsms_process # end
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsmsd # result queue_code:faf9b98adc065a4dee96917942fa8bf2 to:96390606 flag:1 smslog_id:12
    • 2016-01-28 10:13:25 PID56aa05e588618 - L2 sendsmsd # finish processing queue_code:faf9b98adc065a4dee96917942fa8bf2 uid:1 sender_id:1234 queue_count:1 sms_count:1
    • 2016-01-28 10:13:26 PID56aa05d4c59d5 - L2 simplebilling__finalize # saving smslog_id:12
    • 2016-01-28 10:13:26 PID56aa05d4c59d5 - L2 simplebilling__finalize # saved smslog_id:12
    • 2016-01-28 10:14:16 PID56aa05d4cab38 - L2 smstools__incoming # DLR received message_id:142 status:0 info1:Ok info2:short message received by the SME`

Can you explain in details how to reinstall the web folder ? Do you have Skype or something ?

can you post your playsmsd.conf please?
edit: and please enable loglevel 3 or better 4 in web/config.php

PLAYSMS_PATH="/var/www/playsms"
PLAYSMS_LIB="/var/lib/playsms"
PLAYSMS_BIN="/usr/local/bin"
PLAYSMS_LOG="/var/log/playsms"
#DAEMON_SLEEP="1"
#ERROR_REPORTING="0"

smstools config it’s already at level 5

not smstools but playsms/web/config.php

// log level: 0=disabled, 1=info, 2=warning, 3=debug, 4=verbose
// WARNING: log level 3 and 4 will also save sensitive information such as password for used gateway
$core_config['logstate']	= 4;

and the new log after trying to send a message: http://pastebin.com/Y1C8AeTq

your smsc is “dev” - not smstools…:

    • 2016-01-28 11:06:24 PID56aa1250523e5 - L3 dev_hook_sendsms # enter smsc:dev smslog_id:14 uid:1 to:96390606

in main config you can set a default smsc or you can config an outgoing route to use that gateway

What’s the best way? Thx in advance for all the help

if you have only one gateway and it should be used always, make it the default gateway.
if you want to have specific routes (e.g. only defined destinations for that gateway (e.g. only national mobile numbers) configure an outgoing route.

Actually I’m going to use only smstools as gateway… and I’ve already choose it as gateway in PlaySMS configuration. So how should I make it default ?

obviously gateway “dev” is used.
configure an outgoing route to use smstools…
maybe you can provide screenshots of your configuration.

As soon as I get to the office I’ll show you everything, there’s any onther way I can contact you directly ? Thanks again

Hi,

use logstate 3, 4 will also wrote SQL, just set to 3 will be enough.

anton