|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Fri May 09, 2025 08:37 |
Page: 1 2 Next
Keywords: Mode: All keywords (AND) |
Mon May 19, 2014 13:13
|
WolfieDK: Operating system name and version: W2k8 and Cygwin
Version of smsd: 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: Siemens MC35
Interface: Serial using RS232-to-IP Server
Hi :mrgreen:
I would like to know, is it possible to set a hold on a outgoing sms queue, so sms tools will recieve all messages sendt to it before it statrts sending again?
Best regards
Morten
|
Mon Feb 14, 2011 12:57
|
WolfieDK: Hi again:
I have fixed this error now. "bash: clear: command not found"
Using this link: https://packetprotector.org/forum/viewtopic.php?id=3940
Thanks :D
Best Regards
WolfieDK
|
Mon Feb 14, 2011 12:49
|
WolfieDK: Hi Keke 8)
Thanks alot, it works, but it shows some wired text
----------------
GSM1: 11-02-14 13:45:24, Idle, 0, 0, 0, ssi: -51
dBm (Excellent), ber: ??
bash: clear: command not found
Status: 11-02-14 13:45:29, i-----------------------------------------------
----------------
GSM1: 11-02-14 13:45:24, Idle, 0, 0, 0, ssi: -51
dBm (Excellent), ber: ??
bash: clear: command not found
Status: 11-02-14 13:45:29, i-----------------------------------------------
----------------
GSM1: 11-02-14 13:45:24, Idle, 0, 0, 0, ssi: -51
dBm (Excellent), ber: ??
bash: clear: command not found
Status: 11-02-14 13:45:39, r-----------------------------------------------
----------------
GSM1: 11-02-14 13:45:39, Receiving, 0, 0, 0, ssi: -51
dBm (Excellent), ber: ??
It shows "ber: ??" and "bash: clear: command not found" <- Is this because im using Cygwin?
My gole is to make the status visible using a website. I have the code using the manual for v.2, but not your v.3. Is it possible to show the status as a website and do you have any example?
Best Regards
WolfieDK
|
Mon Feb 14, 2011 11:42
|
WolfieDK: Operating system name and version: W2k8 and Cygwin
Version of smsd: 3.1.14
Smsd installed from: sources
Name and model of a modem / phone: Siemens MC35
Interface: Serial using RS232-to-IP Server
Hi .. :D
Is this the right place for questions about a topich in the sms server tools manual?
I have bought the sms3 server tools manual, but I cant get the
( PRIVATE BLOCK )
script to work properly.
I have created the file, but when I put this
( PRIVATE BLOCK )
into /etc/init.d/sms3 file, then sms tools wont start up.
Error output:
$ sms3 start
/etc/init.d/sms3: line 18: -s: command not found
Starting SMS Daemon: /etc/init.d/sms3: line 57: MAINPROCESS: command not found
smsd failed.Can you help me with this ?
Best Regards
WolfieDK 8)
|
Wed Jan 12, 2011 10:12
|
WolfieDK: Hi Keke
Thanks a lot :-)
Best regards
WolfieDK
|
Wed Jan 12, 2011 09:03
|
WolfieDK: Hi Keke.
What about this error? i realy dont need the sign to be sendt in an sms, but i whant sms3 tools to filter it with a space.
2011-01-12 09:44:04,5, GSM1: Cannot convert 74. character ▒ 0xFFFFFF80 to GSM, you might need to update the translation tables.
2011-01-12 09:44:04,5, GSM1: Cannot convert 80. character ▒ 0xFFFFFF80 to GSM, you might need to update the translation tables.
// This table is used for outgoing (to GSM) conversion only:
char iso_8859_15_chars[] =
{
0x09, 0x20, // TAB --> SPACE
0x60, 0x27, // GRAVE ACCENT --> APOSTROPHE
0xA0, 0x20, // NO-BREAK SPACE --> SPACE
0xA2, 0x63, // CENT SIGN --> c
Is it possible "just" to insert
0xFFFFFF80, 0x20, // WIREDCHAR --> SPACE and then In smstools3/src directory run make and replace executable with cp -p smsd $(which smsd)
Best regards
WolfieDK
|
Wed Nov 24, 2010 18:45
|
WolfieDK: Hi Keke
Sorry for not posting befor. I dont have the same spare time after I become daddy :-)
I will test this tomorrow :mrgreen:
|
Mon Nov 08, 2010 22:11
|
WolfieDK: RT is a fabulous open source call logging and bug tracking software ...
Okay, thanks a lot, I will look into that ;-)
Best regards
WolfieDK
|
Wed Oct 20, 2010 21:13
|
WolfieDK: Hi Keke!
In the code there is DEVICE_IS_SOCKET tested...
Sorry, but will you please tell me where I can find this ? :mrgreen:
Best regards
WolfieDK
|
Tue Oct 19, 2010 21:44
|
WolfieDK:
Description: Used to send alerts reported by various system monitors in RT.
Usage: Private
Number of users: just me
Deployment: 1 organization
Volume of 160-character SMs per day: 0 (typical); 1-10 (peak)
Hardware: White box Linux server, Moto handset
Hi, i know this is not the right place for this message, but I dont know elswhere to place it.
But what is RT ?
Best regards
WolfieDK
|
Tue Oct 19, 2010 21:40
|
WolfieDK: Hi Keke
I'm still wondering if rtscts really has any effect when device is a socket. At least it should not have...
Okay, do you need any information before you can confirm if there is a problem with rtscts or not?
I will gladly post logs or configurations files if needed?
Best regards
WolfieDK :D
|
Sat Oct 16, 2010 12:34
|
WolfieDK: Hi Keke!
YOU ARE REALY THE MAN!!! ... now it works too, thank you so mutch.
I only forgot to be in the /smstools3/src directory before I run the make clean smsd ... :'( sorry, my mistake.
I will ask my boss to make a donation to you because you are so awesome.
Best regards
WolfieDK
|
Fri Oct 15, 2010 20:15
|
WolfieDK: Hi Keke
I have now followed your guide above, but my make clean smsd makes this error.
# make clean smsd
cd src && make - clean
make[1]: Entering directory `/smstools3/src'
rm -f *.o smsd *.exe *~
make[1]: Leaving directory `/smstools3/src'
make: *** No rule to make target `smsd'. Stop.
Unfortunately this error still occurs in the smsd.log
2010-10-15 22:03:10,4, smsd: Note that at least GSM1 will send administrative messages, but mainspooler will not because shared memory is not available.
I ran make test with no errors.
Thans so mutch for your support, u are awesome.
Best regards
WolfieDK :D
|
Thu Oct 14, 2010 21:20
|
WolfieDK: Operating system name and version: W2k8 and Cygwin
Version of smsd: 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: Siemens MC35
Interface: Serial using RS232-to-IP Server
I can read about the shared memory module for unix, but i dont know how to install it in my cygwin.
And how to i setup status/statistic file ?
I whant to be able to read the modem status on an asp page.
Best Regards
WolfieDK
|
Thu Oct 14, 2010 09:37
|
WolfieDK: Hello Keke
Thanks for you help, i have found the problem.
I have updated from 3.1.6 to 3.1.14 and it stil makes some other errors.
But then I changed from dev/com3 to @172.0.10.5:1235 and then it can connect without the windows driver/software from the manufactor.
But it stil makes an error, so I changed the rtscts=off to rtscts=on again, and now it works flawless :mrgreen:
Best regards
WolfieDK
|
Wed Oct 06, 2010 12:31
|
WolfieDK: Hi Keke, and thank you soooo mutch for a awesome apllication and forum. It is so mutch appriciated :D
Have you checked and changed the baudrate setting? In 3.1.6 it defaults to 115200, but with this device only values 300 - 921600 are supported. Probably a value 57600 is a good choice.
Yes, I have all ready changed the baudrate to 9600 on both the modem and the rs232-to-ip device. But the error still occur. I will try to change it to 57600 as requested.
However, the "quick guide" talks about IP address and netmask, but it does not say what port is used.
It uses TCP port 1235 ?
... and it will show if this device can be used directly through the socket....
I have all ready wireshack installed, shall I capture a log, and paste it here, can you then help me furtere ?
Best regards
WolfieDK
|
Wed Oct 06, 2010 06:52
|
WolfieDK: Operating system name and version: W2k8 and Cygwin
Version of smsd: 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: Siemens MC35
Interface: Serial using RS232-to-IP Server
Hello, i´m having the following problem with my modem AFTER I have connected my new RS232-to-IP adapter.
RS232-to-IP: http://www.roline.dk/RolFront/varekat3.aspx?art=4288
When I start the sms server, then I works fine for a minute or two, but then it makes this errors and hangs
This is the error with rtscts=no in conf file.:
2010-10-06 08:26:18,3, GSM1: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
2010-10-06 08:26:20,3, GSM1: Could not send character A, cause: Permission denied
2010-10-06 08:26:30,3, GSM1: Could not send character A, cause: Permission denied
2010-10-06 08:26:40,3, GSM1: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
2010-10-06 08:26:42,3, GSM1: Could not send character A, cause: Permission denied
2010-10-06 08:26:52,3, GSM1: Could not send character A, cause: Permission denied
2010-10-06 08:27:02,3, GSM1: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
This is the error with rtscts=yes in conf file.:
2010-10-06 08:45:13,2, smsd: Smsd v3.1.6 started.
2010-10-06 08:45:13,2, smsd: Running as Administrator:root.
2010-10-06 08:45:13,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2010-10-06 08:45:13,4, smsd: Note that at least GSM1 will send administrative messages, but mainspooler will not because shared memory is not available.
2010-10-06 08:45:13,5, smsd: Outgoing file checker has started. PID: 2964.
2010-10-06 08:45:13,5, GSM1: Modem handler 0 has started. PID: 5380.
2010-10-06 08:45:15,5, GSM1: Using check_memory_method 0: Fixed values are used as CPMS does not work.
2010-10-06 08:45:18,3, GSM1: Modem is not clear to send
2010-10-06 08:45:32,3, GSM1: Modem is not clear to send
2010-10-06 08:45:46,3, GSM1: Modem is not clear to send
What can I do to prevent this error ?
Best regards
WolfieDK
|
Thu Nov 19, 2009 14:52
|
WolfieDK: Hey keke
Thanks for all of your help.
I will try to make a script later, thanks :lol:
Regards
Morten
|
Wed Nov 18, 2009 15:02
|
WolfieDK: Hello Keke
I have upgraded to a new mysql server in the past weekend, and no errors has occurred since. But im still testing :mrgreen:
Thanks again
|
Wed Nov 18, 2009 14:47
|
WolfieDK: Operating system name and version: Cygwin on a Windows 2K3 server
Version of smsd: 3.1.5
Smsd installed from: sources
Name and model of a modem / phone: Siemens MC35 Terminal
Interface: Serial
Messages are stored in mysql server
Hello
I looking for some help making a script.
Is it possible make a eventhandler thats checks the first word in text field in messages for at specified word and then return a message to the same number if the specified word is NOT listet?
Example:
1. Send message with text "hello world" til sms server
2. Eventhandler checks if text contains word "hello", if not then it should reply "why dont you say hallo?"
Thanks alot
|
Thu Nov 12, 2009 16:53
|
WolfieDK: ...Thanks for your quickly reply.
50 seconds for the eventhandler is a long time. Yes, I might think is is because my sql server hardware is to slow. Im planing to upgrade it in this weekend.
Your piece of smsd.log is not complete, can you verify that this delay happens only after a status report is received, and every time when status report is received?
I think it only happens when it recives status message, but im not sure, It´s NOT making error all the time, only some times.
Here you have a new log I just created with sending 12 sms and reciving 12 sms, and here is makes the error once again.
smsd.log
2009-11-12 17:02:24,2, smsd: Smsd v3.1.5 started.
2009-11-12 17:02:24,2, smsd: Running as Administrator:Domain Users.
2009-11-12 17:02:24,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2009-11-12 17:02:24,4, smsd: Note that at least GSM1 will send administrative messages, but mainspooler will not because shared memory is not available.
2009-11-12 17:02:24,5, smsd: Outgoing file checker has started. PID: 5320.
2009-11-12 17:02:24,5, GSM1: Modem handler 0 has started. PID: 5324.
2009-11-12 17:02:24,5, GSM1: Using check_memory_method 0: Fixed values are used as CPMS does not work.
2009-11-12 17:02:31,5, GSM1: CGSN: 35XXXXXXXXXXXXX
2009-11-12 17:02:31,5, GSM1: IMSI: 23XXXXXXXXXXXXX
2009-11-12 17:12:27,5, smsd: Moved file /var/spool/sms/outgoing/send_hRZhw9 to /var/spool/sms/OTHER
2009-11-12 17:12:28,5, smsd: Moved file /var/spool/sms/outgoing/send_qVgrOA to /var/spool/sms/OTHER
2009-11-12 17:12:29,5, smsd: Moved file /var/spool/sms/outgoing/send_s08T0S to /var/spool/sms/OTHER
2009-11-12 17:12:30,5, smsd: Moved file /var/spool/sms/outgoing/send_2HvKih to /var/spool/sms/OTHER
2009-11-12 17:12:31,5, smsd: Moved file /var/spool/sms/outgoing/send_8H6fdR to /var/spool/sms/OTHER
2009-11-12 17:12:32,5, smsd: Moved file /var/spool/sms/outgoing/send_qtGsMO to /var/spool/sms/OTHER
2009-11-12 17:12:33,5, smsd: Moved file /var/spool/sms/outgoing/send_DbEnt7 to /var/spool/sms/OTHER
2009-11-12 17:12:34,5, smsd: Moved file /var/spool/sms/outgoing/send_HOxMDD to /var/spool/sms/OTHER
2009-11-12 17:12:35,5, smsd: Moved file /var/spool/sms/outgoing/send_kbIX72 to /var/spool/sms/OTHER
2009-11-12 17:12:36,5, smsd: Moved file /var/spool/sms/outgoing/send_0VR3GG to /var/spool/sms/OTHER
2009-11-12 17:12:37,5, smsd: Moved file /var/spool/sms/outgoing/send_vomINn to /var/spool/sms/OTHER
2009-11-12 17:12:38,5, GSM1: SMS sent, Message_id: 204, To: 45XXXXXX32, sending time 10 sec.
2009-11-12 17:12:38,5, smsd: Moved file /var/spool/sms/outgoing/send_X05GwK to /var/spool/sms/OTHER
2009-11-12 17:12:58,5, GSM1: SMS sent, Message_id: 205, To: 45XXXXXX32, sending time 6 sec.
2009-11-12 17:13:17,5, GSM1: SMS sent, Message_id: 206, To: 45XXXXXX32, sending time 6 sec.
2009-11-12 17:13:38,5, GSM1: SMS sent, Message_id: 207, To: 45XXXXXX32, sending time 6 sec.
2009-11-12 17:13:56,3, GSM1: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2009-11-12 17:13:56,5, GSM1: Waiting 10 sec. before retrying
2009-11-12 17:14:15,5, GSM1: SMS sent, Message_id: 209, To: 45XXXXXX32, sending time 23 sec.
2009-11-12 17:14:36,5, GSM1: SMS sent, Message_id: 210, To: 45XXXXXX32, sending time 5 sec.
2009-11-12 17:14:57,5, GSM1: SMS sent, Message_id: 211, To: 45XXXXXX32, sending time 5 sec.
2009-11-12 17:15:18,5, GSM1: SMS sent, Message_id: 212, To: 45XXXXXX32, sending time 7 sec.
2009-11-12 17:15:39,5, GSM1: SMS sent, Message_id: 213, To: 45XXXXXX32, sending time 6 sec.
2009-11-12 17:16:05,5, GSM1: SMS sent, Message_id: 214, To: 45XXXXXX32, sending time 7 sec.
2009-11-12 17:16:27,5, GSM1: SMS sent, Message_id: 215, To: 45XXXXXX32, sending time 7 sec.
2009-11-12 17:16:49,5, GSM1: SMS sent, Message_id: 216, To: 45XXXXXX32, sending time 7 sec.
2009-11-12 17:17:07,5, GSM1: SMS received (report, Message_id: 204, Status: 0), From: 45XXXXXX32
2009-11-12 17:17:40,5, GSM1: SMS received (report, Message_id: 205, Status: 0), From: 45XXXXXX32
2009-11-12 17:18:13,5, GSM1: SMS received (report, Message_id: 206, Status: 0), From: 45XXXXXX32
2009-11-12 17:18:46,5, GSM1: SMS received (report, Message_id: 207, Status: 0), From: 45XXXXXX32
2009-11-12 17:19:31,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:19:48,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:20:08,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:20:26,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:20:53,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:21:11,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:21:31,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:22:04,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:22:32,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:22:50,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:23:10,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:23:27,5, GSM1: SMS received, From: 45XXXXXX32
2009-11-12 17:23:57,3, GSM1: Done: eventhandler, execution time 30 sec., status: 256
2009-11-12 17:23:57,3, GSM1: ALERT: problem with eventhandler, result 1
2009-11-12 17:24:08,5, GSM1: SMS sent, Message_id: 217, To: 45XXXXXX32, sending time 11 sec.
2009-11-12 17:24:14,5, GSM1: SMS received (report, Message_id: 209, Status: 0), From: 45XXXXXX32
2009-11-12 17:24:46,5, GSM1: SMS received (report, Message_id: 210, Status: 0), From: 45XXXXXX32
2009-11-12 17:25:17,5, GSM1: SMS received (report, Message_id: 211, Status: 255), From: 45XXXXXX32
2009-11-12 17:25:51,5, GSM1: SMS received (report, Message_id: 212, Status: 255), From: 45XXXXXX32
2009-11-12 17:26:23,5, GSM1: SMS received (report, Message_id: 213, Status: 0), From: 45XXXXXX32
2009-11-12 17:27:01,5, GSM1: SMS received (report, Message_id: 214, Status: 0), From: 45XXXXXX32
2009-11-12 17:27:33,5, GSM1: SMS received (report, Message_id: 215, Status: 0), From: 45XXXXXX32
2009-11-12 17:28:05,5, GSM1: SMS received (report, Message_id: 216, Status: 0), From: 45XXXXXX32
2009-11-12 17:28:35,5, GSM1: SMS received (report, Message_id: 0, Status: 0), From: 45XXXXXX32
2009-11-12 17:29:09,5, GSM1: SMS received (report, Message_id: 217, Status: 0), From: 45XXXXXX32
2009-11-12 17:32:48,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 5320.
2009-11-12 17:32:50,2, GSM1: Modem handler 0 terminated. PID: 5324, was started 09-11-12 17:02:24.
2009-11-12 17:32:50,2, smsd: Smsd mainprocess terminated. PID 5320, was started 09-11-12 17:02:24.
I started the sms service and ended it again on purpose.
You have defined admin_to number, and any time when a return value of eventhandler is not zero, an alert is sent. You could add exit 0 to the end of eventhandler code, but it is still enough.
Okay, but it is fine to recive those messages, I like it.
If the problem occurs only with status report messages, you could check from the database if information is stored correctly. Probably it's not.
All my data in my db is just fine, no errors in it.
Perhaps you do not have sed command available. You could make a test run with your eventhandler: From the log, take the name of a received report message. Then run eventhandler manually:
/usr/local/src/smstools3/scripts/mysmsd REPORT /var/spool/sms/report/filename
You can see the error message(s). Was there any?
The SED commands works fine.
I have tested my eventhandler, and it makes no errors ?
Thank you for help, you the man :mrgreen:
|
Wed Nov 11, 2009 13:44
|
WolfieDK: Operating system name and version: Cygwin on a Windows 2K3 server
Version of smsd: 3.1.5
Smsd installed from: sources
Name and model of a modem / phone: Siemens MC35 Terminal
Interface: serial
Hello!
I have just upgraded from 3.1.3 til 3.1.5 "no beta", but now im reciving some wired error messages, and not all of my sms is sent properly.
My eventhandler is sometime 50 sec. om execution, is this normal ? .. Its only function is to drop the sms in my mysql db.
Why do i get these messages ? I got an Alarmsms on my phone too ;)
smsd.log:
2009-11-11 14:00:25,5, GSM1: SMS sent, Message_id: 161, To: 45XXXXXXXX, sending time 12 sec.
2009-11-11 14:00:44,5, GSM1: SMS received (report, Message_id: 161, Status: 0), From: 45XXXXXXXX
2009-11-11 14:01:34,3, GSM1: Done: eventhandler, execution time 50 sec., status: 256
2009-11-11 14:01:34,3, GSM1: ALERT: problem with eventhandler, result 1
2009-11-11 14:01:46,5, GSM1: SMS sent, Message_id: 162, To: 45XXXXXXXX, sending time 12 sec.
2009-11-11 14:02:06,5, GSM1: SMS received (report, Message_id: 162, Status: 0), From: 45XXXXXXXX
2009-11-11 14:03:43,5, smsd: Moved file /var/spool/sms/outgoing/XXXXXXXX.txt to /var/spool/sms/OTHER
2009-11-11 14:03:56,5, GSM1: SMS sent, Message_id: 163, To: 45XXXXXXXX, sending time 12 sec.
2009-11-11 14:04:12,5, GSM1: SMS received (report, Message_id: 163, Status: 0), From: 45XXXXXXXX
smsd.conf:
devices = GSM1
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
report = /var/spool/sms/report
sent = /var/spool/sms/sent
#mypath = /usr/local/bin
logfile = /var/log/smsd.log
loglevel = 5
alarmhandler = /usr/local/src/smstools3/scripts/alarmhandler
alarmlevel = 5
delaytime = 10
errorsleeptime = 10
blocktime = 3600
#blockafter = 3
eventhandler = /usr/local/src/smstools3/scripts/mysmsd
stats = /var/log/smsd_stats
stats_interval = 3600
#stats_no_zeroes = no
#blacklist = /etc/smsd.black
#whitelist = /etc/smsd.white
#checkhandler = /usr/local/bin/smscheck
receive_before_send = no
# autosplit 0=no 1=yes 2=with text numbers 3=concatenated
autosplit = 3
# store_received_pdu 0=no, 1=unsupported, 2=unsupported and 8bit, 3=all
#store_received_pdu = 1
#validity = 255
#decode_unicode_text = no
#internal_combine = no
#user = smsd
#group = dialout
infofile = /var/run/smsservice/smsd.working
#pidfile = /var/run/sms/smsd.pid
#keep_filename = no
#store_original_filename = yes
#regular_run = /var/spool/sms/regular_run
#regular_run_interval = 300
admin_to = 45XXXXXXXX
#terminal = no
#filename_preview = 80
#incoming_utf8 = yes
os_cygwin = yes
[queues]
# Commented lines are examples for germany
# D1 = /var/spool/sms/D1
# D2 = /var/spool/sms/D2
# O2 = /var/spool/sms/O2
# EPLUS = /var/spool/sms/EPLUS
# QUAM = /var/sppol/smsservice/QUAM
# MOBILCOM = /var/spool/sms/MOBILCOM
OTHER = /var/spool/sms/OTHER
[provider]
# Commented lines are examples for germany
# D1 = 49160, 49170, 49171, 49175, 49151
# D2 = 491520, 49162, 49172, 49173, 49174
# O2 = 49176, 49179, 49159
# EPLUS = 49163, 49177, 49178, 49157
# QUAM = 49150
# MOBILCOM = 49156
OTHER = 0,1,2,3,4,5,6,7,8,9
[GSM1]
init = AT+CNMI=2,0,0,2,1
# Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0
device = /dev/ttyS0
incoming = yes
queues = OTHER
#You don't need a PIN for mobile phones
#pin = 1111
mode = new
#smsc = 491722270000
baudrate = 19200
rtscts = yes
cs_convert = yes
report = yes
memory_start = 1
check_memory_method = 0
#eventhandler = /usr/local/src/smstools3/scripts/mysmsd
#primary_memory = memory name
#secondary_memory = memory name
#secondary_memory_max = number
#pdu_from_file = /var/spool/sms/GSM1-PDU
#sending_disabled = no
#decode_unicode_text = no
#internal_combine = no
#pinsleeptime = 5
#admin_to = (number)
#message_limit = 20
#message_count_clear = 60
mysmsd:
#!/bin/sh
# This is an example script that logs all events into an SQL database
# You need a MYSQL database as described in the documentation.
# Please read the documentation before using this script.
SQL_HOST=192.168.0.8
SQL_USER=sql
SQL_PASSWORD="some secret password"
SQL_DATABASE=sms
SQL_TABLE=smsd_log
DATE=`date +"%Y-%m-%d %H:%M:%S"`
#Extract data from the SMS file
FROM=`formail -zx From: < $2 | sed 's/"//g'`
TO=`formail -zx To: < $2`
#Remove plus sign, spaces, minus and short number prefix
TO=`echo "$TO" | sed 's/ //g' | sed 's/+//g' | sed 's/s//g' | sed 's/-//g'`
CUSTOMERID=`formail -zx CustomerID: < $2`
SUBJECT=`formail -zx Subject: < $2`
SENT=`formail -zx Sent: < $2`
#Text is not used but could be used
TEXT=`formail -I "" <$2`
#Set some SQL parameters
if [ "$SQL_PASSWORD" != "" ]; then
SQL_ARGS="-p$SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
#Insert a new entry into the SQL table
if [ "$1" = "FAILED" ] || [ "$1" = "SENT" ]; then
mysql $SQL_ARGS "insert into $SQL_TABLE (type,CustomerID,sent,sender,receiver,msgid,text) values (\"$1\",\"$CUSTOMERID\",\"$DATE\",\"$FROM\",\"$TO\",\"$3\",\"$TEXT\");";
elif [ "$1" = "RECEIVED" ]; then
mysql $SQL_ARGS "insert into $SQL_TABLE (type,CustomerID,sent,received,sender,receiver,text) values (\"RECEIVED\",\"$CUSTOMERID\",\"$SENT\",\"$DATE\",\"$FROM\",\"$SUBJECT\",\"$TEXT\");";
elif [ "$1" = "REPORT" ]; then
#Extract more data from the status report file
DISCHARGE=`sed -e 1,/SMS\ STATUS/d < $2 | formail -zx Discharge_timestamp:`
MSGID=`sed -e 1,/SMS\ STATUS/d < $2 | formail -zx Message_id:`
STATUS=`sed -e 1,/SMS\ STATUS/d < $2 | formail -zx Status: | cut -f1 -d,`
if [ "$MSGID" != "" ]; then
ID=`mysql $SQL_ARGS "select id from $SQL_TABLE where receiver=\"$FROM\" and type=\"SENT\" and msgid=\"$MSGID\" order by id desc limit 1;"`
mysql $SQL_ARGS "update $SQL_TABLE set received=\"$DISCHARGE\",status=\"$STATUS\" where id=\"$ID\";"
fi
fi
Thank you so mutch for you help :D
SMS Server Tools 3 ROCKS!! :mrgreen:
Best Regards
Morten
WolfieDK
|
Tue Jul 28, 2009 07:46
|
WolfieDK: Hi keke
Okay, i will try this a soon a possible, thanks :mrgreen:
Regards
//WolfieDK
|
Thu Jul 23, 2009 17:06
|
WolfieDK: Hi,
Im using the email2sms script, and it works fine using clear ype/text email when sending an email to my sms server.
But i would like a script to convert the HTML email to an clear type/text email, is it possible to include the script in my email2sms script, and how do make the scipt ?
Please help :D
|
Fri Jun 05, 2009 19:55
|
WolfieDK: Hello Keke
Thanks 4 your help
My plan is to get email2sms working by sending an email to sms@domain.dk, and my MTA is Kerio Mailserver, and I have no problem with mails being forwarded.
Way to produce email2sms highly depends on your system and needs. For example existing spamfilter script can be used, new forwarder script can be created, user account can be created like sms @ domain.com, existing user account can be used etc...
What kind of system do you have and what mailer daemon agent is in use, and how do you like emails being forwarded?
|
Page: 1 2 Next
Time in this board is UTC.
|
|
|
 |
|
 |
|