The damnit orange pending status icon, please help

Estimated Anton and collaborators, first of all congratulations for this really wonderful piece of software. I´m sysadmin over 10yr and now i´m trying to startup my little own IT company, so one of the services is focused to provide SMS services to companies and marketing agencies.

I have installed SMSTools 3.1.15 working ok [Ubuntu 14.04.03 LTS 32bit] distro package.
I have installed Playsms working ok too 1.3.1. In fact i can send, bill, add users, and so on… everyting absolutely fine, except message status which is always pending (orange color). And this last step doesn´t let me begin with the “bussines” so customers can´t see the real status of their messages (which really is ok).

Database table playsms_tblDLR has data
Database table playsms_gatewaySmstools_dlr is empty


smsd.conf file ( Siemens MC35i ):

devices = GSM1
logfile = /var/log/smstools/smsd.log
infofile =/var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
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
stats =/var/log/smstools/smsd_stats
loglevel = 7
autosplit = 3

[queues]
COLA =/var/spool/sms/COLA

[GSM1]
init = AT+CPMS="SM"
init2 = AT+CSQ
device =/dev/ttyS1
incoming = yes
queues = COLA
mode = new
baudrate = 19200
rtscts = yes
cs_convert = yes
report = yes
send_delay = 1
hangup_incoming_call= yes
check_memory_method= 31
memory_start = 1


Log file playsms after sending 1 SMS (debug level 3 activated in config.php)

xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms # start uid:1 sender_id:[Byte] smsc:[]
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L3 sendsms # maxlen:459 footerlen:0 footer:[] msglen:4 message:[TEST]
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms_queue_create # saving queue_code:d9a4824fc595c6962b89a1aaf681d2be src:Byte scheduled:2015-12-10 15:34:54
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms_queue_create # saved queue_code:d9a4824fc595c6962b89a1aaf681d2be id:9
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[34609409nnn]
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[34609409nnn]
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:34 rate:0.100 description:* to:34609409nnn
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:4 unicode:0 to:34609409407 enable_credit_unicode:0 count:1 rate:0.$
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms # dst:1 sms_count:1 total_charges:0.1
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms_queue_push # saving queue_code:d9a4824fc595c6962b89a1aaf681d2be dst:34609409nnn
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms_queue_push # saved queue_code:d9a4824fc595c6962b89a1aaf681d2be smslog_id:8
xxx.14.190.167 nnnnnnnn.nn 2015-12-10 15:34:54 PID56698d8e06496 admin L2 sendsms # end queue_code:d9a4824fc595c6962b89a1aaf681d2be queue_count:1 sms_count:1 failed_queue:0 failed_sms:0

    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsmsd # start processing queue_code:d9a4824fc595c6962b89a1aaf681d2be chunk:0 queue_count:1 sms_count:1 scheduled:2015-12-10 15:34:54 uid:1 gpid:0 sender$
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsmsd # sending queue_code:d9a4824fc595c6962b89a1aaf681d2be smslog_id:8 to:34609409nnn sms_count:1 counter:1
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 sendsms_intercept # msgtemplate modified sms_sender:[Byte] sms_footer:[] sms_to:[34609409nnn] sms_msg:[TEST] uid:[1] gpid:[0] sms_type:[text] unicode:[0] q$
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 outgoing_hook_sendsms_intercept # found SMSCs:[smstools]
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 outgoing_hook_sendsms_intercept # using prefix based smsc smsc:[smstools] uid:1 parent_uid:0 from:Byte to:34609409nnn
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 sendsms_intercept # outgoing modified sms_sender:[Byte] sms_footer:[] sms_to:[34609409nnn] sms_msg:[TEST] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queu$
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsms_process # start
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:34 rate:0.100 description:* to:34609409nnn
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:4 unicode:0 to:34609409nnn enable_credit_unicode:0 count:1 rate:0.100 charge:0.1
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 simplerate__cansend # allowed user uid:1 sms_to:34609409nnn credit:99.800 count:1 rate:0.100 charge:0.1 balance:99.7
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsms # saving smslog_id:8 u:1 g:0 gw:smstools smsc:smstools s:Byte d:34609409nnn type:text unicode:0 status:0
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsms_process # saved smslog_id:8 id:8
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 sendsms # final smslog_id:8 gw:smstools smsc:smstools message:TEST len:4
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 smstools_hook_sendsms # enter smsc:smstools smslog_id:8 uid:1 to:34609409nnn
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 smstools_hook_sendsms # saving outfile:/var/spool/sms/COLA/out.20151210153355.0.1.8 smsc:[smstools]
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 smstools_hook_sendsms # saved outfile:/var/spool/sms/COLA/out.20151210153355.0.1.8 smsc:[smstools]
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 dlr # isdlrd:1 smslog_id:8 p_status:0 uid:1
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 simplerate__deduct # enter smslog_id:8
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:34 rate:0.100 description:* to:34609409nnn
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:4 unicode:0 to:34609409nnn enable_credit_unicode:0 count:1 rate:0.100 charge:0.1
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 credit_hook_rate_setusercredit # saving uid:1 balance:99.7
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 credit_hook_rate_setusercredit # saved uid:1 balance:99.7
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 simplerate__deduct # user uid:1 parent_uid: smslog_id:8 msglen:4 count:1 rate:0.100 charge:0.1 credit:99.800 balance:99.7
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 simplebilling__post # saving smslog_id:8 rate:0.100 credit:99.800 count:1 charge:0.1
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 simplebilling__post # saved smslog_id:8 id:8
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 simplerate__deduct # deduct successful uid:1 parent_uid: smslog_id:8
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L3 simplerate__deduct # credit_lowest_limit:5 balance:99.7 charge:0.1
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsms_process # end
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsmsd # result queue_code:d9a4824fc595c6962b89a1aaf681d2be to:34609409407 flag:1 smslog_id:8
    • 2015-12-10 15:34:55 PID56698d8f5c3ab - L2 sendsmsd # finish processing queue_code:d9a4824fc595c6962b89a1aaf681d2be uid:1 sender_id:Byte queue_count:1 sms_count:1
    • 2015-12-10 15:34:56 PID5669428c5a0d1 - L3 dlrd # id:8 smslog_id:8 p_status:0 uid:1

Sent Directory:

From: Byte
To: 34609409nnn
Report: yes
Modem: GSM1
Sent: 15-12-10 15:35:17
Message_id: 27
IMSI: 214035303272860

TEST


Incoming Directory with the report:

From: 34609409nnn
From_TOA: 91 international, ISDN/telephone
From_SMSC: 34656000345
Sent: 15-12-10 15:35:16
Received: 15-12-10 15:35:34
Subject: GSM1
Modem: GSM1
IMSI: 214035303272860
Report: no
Alphabet: ISO
Length: 118

SMS STATUS REPORT
Message_id: 27
Discharge_timestamp: 15-12-10 15:35:17
Status: 0,Ok,short message received by the SME


I´m really confused, all is working ok, but i can´t see where is the error. Install of packages were fine, and processes are running, directory and file permisions i think it´s ok too so all logs works. So, please, could anybody help me i don´t know where to look for the error or bad configuration.

Thank you.

Note: If i success my company thanks to playsms i´ll refund some donations to this fabulous project because thanks to it people can have an oportunity to begin projects!
I have omited some information relative with IP address, mobile number and website to keep some privacy, thanks.

Hi,

Is this file exists:

/var/spool/sms/sent/out.20151210153355.0.1.8

paste the result of this:

ls -l /var/spool/sms/sent/out.20151210153355.0.1.8

anton

root@server:~# ls -l /var/spool/sms/sent/out.20151210153355.0.1.8
-rw-r–r-- 1 smsd smsd 117 dic 10 15:35 /var/spool/sms/sent/out.20151210153355.0.1.8

And the content inside the file:

From: Byte
To: 34609409nnn
Report: yes
Modem: GSM1
Sent: 15-12-10 15:35:17
Message_id: 27
IMSI: 214035303272860

TEST

can you make sure that playsmsd run as a user that have permission to remove that file (eg as root)

ps aux ¦ grep playsmsd

I forgot to explain that service is running between 2 computers:

Computer 1 run SMStools & Mysql database
Computer 2 run Apache & PlaySMS

Computer 1 export via NFS the directory /var/spool/sms to computer 2.

smsd group and user are added in both computers

root@server:~# ps aux | grep playsmsd
root 17192 0.0 0.0 4700 2164 pts/1 S+ 17:05 0:00 grep --color=auto playsmsd

group file:
smsd:x:117:root

password file:
smsd:x:108:117::/home/smsd:/bin/false

Thanks!

playsmsd need to be able to delete sent file

so either dont have permission for that or simply wrong path to SMS tools spool dir (default to /var/spool/sms)

anton

Well, permisions are 775 and smsd as group and user owners (all dirs under /var/spool/sms). I have tried 777 in “sent” dir but nothing, file remains there…

Config in Playsms:
Manage Gateways and SMSC

Gateway and SMSC -> Gateway -> Default default_queue directory: /var/spool/sms/COLA <-queue (775 smsd user , smsd group)
Gateway and SMSC -> SMSC -> Queue directory: /var/spool/sms/COLA <-queue (775 smsd user, smsd group)

any sugestion? can i look into any function? my php programming skill is not very high but i can try…

Ouch… looking into the old forum i have found this:

https://groups.google.com/forum/#!topic/playsmsusergroup/IaFn3syqx1I

maybe give some idea.

thank you

Its the wrong path.

Put default_queue directory to default, set it to /var/spool/sms. The default_queue directory is a path to smstools3 spool drectory, not just a specific queue directory.

anton

Thanks for your help Anton, now the system is working ok!, i had to configure as you indicated default_queue directory to /var/spool/sms BUT the SMSC Queue directory had to be /var/spool/sms/outgoing AND the smsd.conf is working without any queue. Sometimes is better stop one minute and think quietly.

I´m begining the Spanish from Spain (es_ES) translation of the whole interface, when i finnish it i can send it if you indicate me an email in order to review and test the correct merging of it with the 1.3.1 version of Playsms. Is good to give when you receive.

Note: I am removing these lines --> #, php-format , i hope it´s not important and only indicate the %s & %d parameters of next lines.

Thank you again!

queue directory on SMSC can be set to each modem queue path

you can have multi SMSC with smstools plugin

anton

I have “one” oh oh oh i´d like to have only one, well, when i send the messages green icon status appears in a few seconds, but sometimes (fewer), the icon is blue (delivered) and mostly of them green (sent). Which is the difference? is something going wrong or i have to set some param aditional in smstools config? Is normal some green and others blue?

Thanks.

Note: I have finished main translation…i begin with plugins.