Author |
Post |
|
#1 Thu Nov 12, 2009 11:11, 186 months ago.
|
Member
Registered: Nov 2009
Location: Germany
|
Operating system name and version: Debian Lenny Version of smsd: 3.1.5 Smsd installed from: sources Name and model of a modem / phone: 2 x Nokia 6230i Interface: USB Hello, keke wrote Quote i have running the SMS Server Tool v. 3.1.5 on Debian 5.0. My problem is the order where the SMS are send. How can i change this?
I have changed the name of the sms files, but the server send the sms not in alphanumeric order.
in hope you can help me.
The oldest SMS file is sent first. If there are two files with exactly the same timestamp, a file is selected by the directory order. You can use touch command to change timestamps. There is also Priority -header available, but I assume that it's not enough for you.
this looks not correct for me. the smsserver send the sms without any logical order. I must say i have an csv file which 1 sms in a line. this file has many lines. With php i put every line in an sms-file and give them a name like this: s_Ymd_00001 The number on end will add 1 for next line. after i have make all files i move all files at the same time to the outgoing folder. how i can use this priority header?? many thanks ... best regards Csab « Last edit by keke on Thu Nov 12, 2009 11:39, 186 months ago. »
|
|
#2 Thu Nov 12, 2009 11:47, 186 months ago.
|
Member
Registered: Nov 2009
Location: Germany
Topic owner
|
hi again,
i have found out, that "smsd" move the files in the wrong order to the outgoing dir.
in my logfiles:
9:01:47,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00156 to /var/spool/sms/checked 2009-11-12 09:01:48,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_01054 to /var/spool/sms/checked 2009-11-12 09:01:49,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00572 to /var/spool/sms/checked 2009-11-12 09:01:50,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00853 to /var/spool/sms/checked 2009-11-12 09:01:51,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_01040 to /var/spool/sms/checked 2009-11-12 09:01:52,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00844 to /var/spool/sms/checked 2009-11-12 09:01:53,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00941 to /var/spool/sms/checked 2009-11-12 09:01:54,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00050 to /var/spool/sms/checked 2009-11-12 09:01:55,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00962 to /var/spool/sms/checked 2009-11-12 09:01:56,5, smsd: Moved file /var/spool/sms/outgoing/s_20091112_00478 to /var/spool/sms/checked
can i say "smsd" the "moveorder" ??
bg Csab
|
|
#3 Thu Nov 12, 2009 11:58, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Csab wrote this looks not correct for me. the smsserver send the sms without any logical order.
The logical order is based on file creation time, but in your case all files have the same time because of a time resolution in Unix (which is one second). Csab wrote I must say i have an csv file which 1 sms in a line. this file has many lines.
With php i put every line in an sms-file and give them a name like this: s_Ymd_00001 The number on end will add 1 for next line. after i have make all files i move all files at the same time to the outgoing folder.
There is no filename based sorting inside the smsd, because usually it has not been needed and it will take some memory, with lot of files lot of memory. And the sending order has not been important with files with the same age. It is correct to move files to the outgoing folder, instead of creating files directly into it. Because your PHP code knows how much there are files to move, you could change the timestamps before moving files. For example something like this: Csab wrote how i can use this priority header??
You can add Priority: high header to the most important message files. Those files are then processed first. However, this is not what you are expecting.
|
|
#4 Thu Nov 12, 2009 12:05, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Csab wrote i have found out, that "smsd" move the files in the wrong order to the outgoing dir.
It looks like that  , because you are expecting the order by filename, which is not supported (there is no "moveorder" setting available). The small change in the PHP code might resolve this issue, but why anyway is important to follow the filename order? The counter in filename ensures that an unique name is used, and usually it's enough. Also, with a large number of files and modems, say 10000+ files and 15-20 modems, spooling algorithm should anyway be changed (to speed up sending).
|
|
#5 Thu Nov 12, 2009 12:46, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Actually, perhaps alphabetic (ascending) sorting for files with the same creation time can still be easily included in the next version...
I have to check this out later, but in the meantime the PHP code might work as a workaround.
|
|
#6 Thu Nov 12, 2009 13:14, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Well, perhaps it's easy like this: Still the timestamp is the main sorting criteria, but files with the same timestamp are processed with the alphabetic (US-ascii) order. Can you test this change?
|
|
#7 Thu Nov 12, 2009 13:23, 186 months ago.
|
Member
Registered: Nov 2009
Location: Germany
Topic owner
|
many thanks for your help and time. if you tell me how i can make this changes, so i can test it tommorow if the next sms will be sendet.
|
|
#8 Thu Nov 12, 2009 13:34, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
First you need a patch command. Try patch --help, if it gives command not found, run apt-get install patch.
Save the code in my post into the /tmp/patch file.
Change the working directory to smstools3/src.
Run patch < /tmp/patch.
Recompile: make.
Stop the daemon (if it's running, /etc/init.d/smstools stop).
Update the executable: cp -p smsd `which smsd`.
Restart the daemon and report what happens...
|
|
#9 Thu Nov 12, 2009 13:52, 186 months ago.
|
Member
Registered: Nov 2009
Location: Germany
Topic owner
|
keke wrote First you need a patch command. Try patch --help, if it gives command not found, run apt-get install patch.
Save the code in my post into the /tmp/patch file.
Change the working directory to smstools3/src.
Run patch < /tmp/patch.
Recompile: make.
Stop the daemon (if it's running, /etc/init.d/smstools stop).
Update the executable: cp -p smsd `which smsd`.
Restart the daemon and report what happens...
thank you for this howto patch is installed and the deamon runs again. 1 sms was send successful. the sort changes i can check tomorow morning. i hope that all sms will be send.  many thanks keke 
|
|
#10 Fri Nov 13, 2009 07:53, 186 months ago.
|
Member
Registered: Nov 2009
Location: Germany
Topic owner
|
good morning keke,
my sms' are sending now and all looks fine. the smsd moved the files in right (namebased) order to the output dir.
many thanks for your help...
best regards Csab
|
|
#11 Fri Nov 13, 2009 09:39, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Thank's for the information.
This change will be included in the next version: The same aged files will be sent in alphabetical order by name.
|