Keywords: Mode: All keywords (AND) |
Wed Nov 27, 2013 20:23
|
schindld: This is great news, thanks! Sorry for bothering you :oops:
Looking forward hearing from you.
|
Mon Nov 25, 2013 19:46
|
schindld: Hi Herbert,
we are currently implementing Cisco ISE. One aspect is to provide wifi guest accounts. Wifi credentials can be provided via SMS, well basically via SMTP-to-SMS funtionality. Details
Cisco uses a globally configured SMTP server to deliver a mail to an already implemented Mail2SMS gateway. A template editor can be used to design the mail body. The problem is that Cisco doesn't support putting target mobile number into RCPT TO field and put everything into mail body like this:
From: <wlanguests@example.com>
To: <inbox@mail2sms.example.com>
Message-ID: <12312312312313>
Subject: Guest Account
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
user:UserName
password:password
api_id:AccountID
to:0049176456789@wlan-sms.example.com
text:Your guest account details:
text:Username: testuser1
text:Password: _23aloP09
I was thinking about using procmail and formail in combination to extract body and the needed information like "to:" and everything marked with "text:" and then build a new message in supported MailSMSGateway format.
What do you think? Do you have a better or more clever solution? Any help would be appreciated :oops:
|
Mon Mar 04, 2013 18:32
|
schindld: Hi Keke,
Have you found the time to have a closer look at the config?
I can't get alarmhandler to work with my configuration.
Kind regards,
Daniel
|
Tue Feb 19, 2013 12:07
|
schindld: I don't see that alarmhandler is called at all though it is defined in smsd.conf...
Here is my smsd.conf:
devices = GSM_Net1,GSM_Net2
logfile = /smspool/smsd/log/smsd.log
loglevel = 7
alarmhandler = /usr/local/bin/alarm.sh
alarmlevel = 7
checked = /smspool/smsd/sms/checked
failed = /smspool/smsd/sms/failed
incoming = /smspool/smsd/sms/incoming
outgoing = /smspool/smsd/sms/outgoing
sent = /smspool/smsd/sms/sent
hangup_incoming_call = yes
[GSM_Net1]
device = @10.74.3.10:5000
keep_open = yes
incoming = no
baudrate = 2400
rtscts = no
cs_convert = yes
report = no
regular_run_interval = 60
regular_run_cmd = AT+CSQ
regular_run_cmd = AT+CREG?
regular_run_cmd = AT+COPS?
regular_run_statfile = /dev/shm/sms_stat_Net1
[GSM_Net2]
device = @10.74.3.11:5000
keep_open = yes
incoming = no
baudrate = 2400
rtscts = no
cs_convert = yes
report = no
regular_run_interval = 60
regular_run_cmd = AT+CSQ
regular_run_cmd = AT+CREG?
regular_run_cmd = AT+COPS?
regular_run_statfile = /dev/shm/sms_stat_Net2
Let's say the modems become unresponsive and regular run cmd produce this output:
2013-02-19 13:03:47,7, GSM_Net2: -> AT+CSQ
2013-02-19 13:03:47,7, GSM_Net2: Command is sent, waiting for the answer
2013-02-19 13:03:48,7, GSM_Net1: -> AT+CSQ
2013-02-19 13:03:48,7, GSM_Net1: Command is sent, waiting for the answer
2013-02-19 13:03:52,7, GSM_Net2: put_command expected (OK)|(ERROR), timeout occurred. 1.
2013-02-19 13:03:52,7, GSM_Net2: <-
2013-02-19 13:03:52,7, GSM_Net2: -> AT+CREG?
2013-02-19 13:03:53,7, GSM_Net1: put_command expected (OK)|(ERROR), timeout occurred. 1.
2013-02-19 13:03:53,7, GSM_Net1: <-
2013-02-19 13:03:53,7, GSM_Net1: -> AT+CREG?
2013-02-19 13:04:01,5, smsd: Moved file /smspool/smsd/sms/outgoing/send_jyCfK7 to /smspool/smsd/sms/checked
I don't see that alarmhandler is called. SMS are checked but nothing else happens. Is there any misconfiguration in my config file?
The alrmhandler script is world-executable and based on your example alarmhandler script, simply pasting the output to a log file which is world-writeable.
|
Tue Feb 12, 2013 12:58
|
schindld: I'm still stuck on this one. Any ideas anyone?
Regards,
Daniel
|
Mon Nov 26, 2012 11:39
|
schindld: Works like a charm :mrgreen:
Great work! Thank you very much!
|
Sat Nov 24, 2012 19:20
|
schindld: Wouldn't it be great if smsd could check modem availabilty or even functionality before sending SM? Especially when you are running multiple modems for high-availibility. If a modem is detected as unavailable it should not be used until it is available again.
I recognized that smsd tries to send SM via a modem that is unavailable (socket timeout) and also retries are scheduled on the unavailable one like discussed in this thread.
Please let me know about you thoughts on this topic :)
Regards,
Daniel
|
Sat Nov 24, 2012 19:02
|
schindld: I think this would be a good feture request. I will post it there :mrgreen:
|
Thu Nov 22, 2012 21:45
|
schindld: Any solution to this? Would be great if you could publish your private solution ;)
|
Thu Nov 22, 2012 10:32
|
schindld: Operating system name and version: Oracle Linux 6.2
Version of smsd: 3.1.15
Smsd installed from: package repository
Name and model of a modem / phone: 2 x MCTBA-G2-EN2-ED-EN
Interface: socket/Ethernet
Hi.
I was wondering if there is a possibility to monitor/react on socket timeouts like
2012-11-22 11:19:34,7, GSM_Net1: put_command expected (OK)|(ERROR), timeout occurred. 1.
or
2012-11-22 11:22:09,3, GSM_Net1: Couldn't connect socket @10.74.3.10:5000, error: Connection timed out, waiting 5 sec.?
I guess alarmhandler won't do the job right?
Thanks
|
Wed Nov 21, 2012 19:18
|
schindld: Herbert.
This works great! :o
Do you think you could make it possible to send subject+mailbody? I know I seem very demanding :oops:
Regards,
Daniel
|
Wed Nov 21, 2012 11:45
|
schindld: Sweet :) Thank your very much.
I will have a look at it and keep you posted.
Regards,
Daniel
|
Fri Nov 16, 2012 07:57
|
schindld: Hi Herbert.
I'm really really new to Perl so please don't be mean if I don't get things right in th beginning :oops:
I did some research on parsing mail with perl and stumbled across Mail::MboxParser that should provide all the different fileds (from, to, subject, msg_text)
This script provides all the fields when run like:
./decmail.pl < mail
#!/usr/bin/perl
use strict;
use warnings;
use Mail::MboxParser;
my $mbox= \*STDIN;
my $mb = Mail::MboxParser->new($mbox);
for my $msg ($mb->get_messages) {
my $to = $msg->header->{to};
my $from = $msg->header->{from};
my $cc = $msg->header->{cc} || " ",
my $subject = $msg->header->{subject} || '<No Subject:>',
my $body = $msg->body($msg->find_body,0);
my $body_str = $body->as_string || '<No message text>';
print "To: $to\n",
"From: $from\n",
"Cc: $cc\n",
"Subject: $subject\n",
"Message Text: $body_str\n";
}
Found this on Perl Monks.
|
Thu Nov 15, 2012 17:16
|
schindld: Great work! :)
But would it be possible to have the mailbody incorporated into the sms text aswell and not only the subject?
|