SMS Server Tools 3
This site is hosted by
Basic information:
Additional information:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

Custom Search

 Visitor locations
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Thu Oct 29, 2020 05:07
SMSTools3 Community » Help and support Bottom

Expected behavior if I put message directly on queue

Login and Post Reply

Page:  1

Author Post
Oct 2018
Location: Mexico City, Mexico
Operating system name and version: Centos 7
Version of smsd: v3.1.21
Smsd installed from: sources
Name and model of a modem / phone:ZTE MF180, MF190
Interface: USB


TL;DR What happens internally when I put directly a text message in the queue? How can I control sorting of sending messages?

In my tests I figured out that messages coming from "sendsms" script to "outgoing" directory were passed as they are through final queue directories. So I started to put messages directly on the queue directories. It then started to have unexpected behaviors, the log file reported "SMS sent" but no messages where sending, but when I rolled back to the original way everything works OK again.

Then I used the correct way of setting the "Queue: " header and this works OK as well and I see the messages going through outgoing and then to the correctly queue. So this is the origin of my question about why it doesn't work when I place the messages directly on queue directories.

Originally I tried to place text messages to queue directory in order to control the sorting of the messages, how can I achieve this with the correct way? I have an unexpected behavior of unsorted processed messages, this is my smsd.conf:
devices = GSM* 1-4
logfile = /var/log/smsd/smsd.log
loglevel = 7
user = smstools
smart_logging = yes
infofile = /run/smsd/smsd.working
pidfile = /run/smsd/
report = /var/spool/sms/report
stats =  /var/spool/sms/stats
failed = /var/spool/sms/failed
phonecalls = /var/spool/sms/calls
delaytime_mainprocess = 2
eventhandler = /soft/ZENTEK/app/smsbackend/
trust_outgoing = yes
spool_directory_order = yes # I suggested this parameter could help

baudrate = 115200
report = yes
primary_memory = SM
secondary_memory = SR
device = /dev/ttyUSB12
incoming = yes
report_device_details = yes
signal_quality_ber_ignore = yes
hangup_incoming_call = yes
'smsdconf' Syntax Highlight powered by GeSHi

I used this guides:

May 2009
Location: Jyväskylä, Finland
If the log file reports "SMS sent", SMS is sent. There is a problem elsewhere.

Message files can be placed directly to queue directories, if necessary. However, care should be taken when creating files. Spool directories are trusted by default. When smsd can see the file, it must be complete and closed. There is no delay to check if the file still grows.

You could create a file into the spool or outgoing directory using the extension .LOCK, write and close the file and rename the .LOCK extension away. Alternatively the name can begin with LOCKED, or a dot. Smsd ignores these files as they are not complete.

Oct 2018
Location: Mexico City, Mexico
Topic owner
Hello Keke, that makes sense, and I see that actually smsd does this when handling files, I'll use the normal way of sending to outgoing diretory with the  Queue:  header.

Thank you so much for your support and maintenance of this awesome project

« Last edit by marquicus on Fri Oct 26, 2018 14:59, 24 months ago. »
Oct 2018
Location: Mexico City, Mexico
Topic owner
Just for finishing the thread, is there a way of sorting the messages when processed by smsd?, I'm having events where the first send message is not the first processed message

May 2009
Location: Jyväskylä, Finland
Messages are sorted by default. In some systems with very large amount of messages this may take too much time, and also is not necessary. Therefore a global setting spool_directory_order is available. Remove this setting from your configuration and check how much spooling slows down when sorting is done and you have large amount of messages.

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.