power-cycling USB modem remotely

2022-12-04 Thread Stuart Kendrick
Anyone know how to cut power to a USB device remotely?

Sometimes, after a reboot, not only does Kannel not load, but the modem does 
not respond to 'ATE1' sent from minicom

root@linux:~# minicom


Welcome to minicom 2.8

OPTIONS: I18n
Port /dev/modem

Press CTRL-A Z for help on special keys



I can visit the server, unplug the modem's USB cable, plug it back in, and the 
modem then responds just fine

But I would prefer a way to do this remotely

Ubuntu 22.04

--sk


upgraded to Ubuntu 22.04 / Kannel failing to start

2022-09-04 Thread Stuart Kendrick
BRIEF

  *   I upgraded from Ubuntu 20.04 to 22.04 (Jammy Jellyfish)
  *   When I rebooted, Kannel failed to start.
 *   If I kill the various 'box' processes, then Kannel proceeds to load 
successfully
  *   How can I configure Kannel to load automatically at boot, without this 
manual intervention?


DETAIL

  *   Syslog extract shortly after reboot
2022-09-04T03:44:18.473919-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [0] INFO: HTTP: Opening server at port 13000.
2022-09-04T03:44:18.473999-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [0] INFO: Set SMS resend frequency to 60 seconds.
2022-09-04T03:44:18.474043-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [0] INFO: SMS resend retry set to 5.
2022-09-04T03:44:18.478607-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [5] ERROR: bind failed
2022-09-04T03:44:18.478664-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [5] ERROR: System error 98: Address already in use
2022-09-04T03:44:18.478711-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [5] PANIC: Could not open smsbox port 13001
2022-09-04T03:44:18.478941-07:00 ubuntu bearerbox[1908]: 2022-09-04 03:44:18 
[1908] [5] PANIC: /usr/sbin/bearerbox(gw_backtrace+0xe0) [0x5607beed48e0]
[...]


  *   I then kill all the 'box' processes
root@ubuntu:~# ps -ef | grep box
kannel  1986   1  0 03:44 ?00:00:00 /usr/sbin/run_kannel_box 
--pidfile /var/run/kannel/kannel_bearerbox.pid --no-extra-args 
/usr/sbin/bearerbox -v 4 -- /etc/kannel/kannel.conf
kannel  19881986  0 03:44 ?00:00:00 /usr/sbin/bearerbox -v 4 -- 
/etc/kannel/kannel.conf
kannel  2092   1  0 03:44 ?00:00:00 /usr/sbin/run_kannel_box 
--pidfile /var/run/kannel/kannel_wapbox.pid --no-extra-args /usr/sbin/wapbox -v 
4 -- /etc/kannel/kannel.conf
kannel  20932092  0 03:44 ?00:00:00 /usr/sbin/wapbox -v 4 -- 
/etc/kannel/kannel.conf
root31893177  0 03:46 pts/000:00:00 grep --color=auto box
root@ubuntu:~# kill 1986 1988 2092 2093
root@ubuntu:~#


  *   In syslog, I then I see

2022-09-04T03:46:49.661637-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: HTTP: Opening server at port 13000.
2022-09-04T03:46:49.662217-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: Set SMS resend frequency to 60 seconds.
2022-09-04T03:46:49.662331-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: SMS resend retry set to 5.
2022-09-04T03:46:49.662473-07:00 ubuntu smsbox[3191]: 2022-09-04 03:46:49 
[3191] [0] INFO: Connected to bearerbox at localhost port 13001.
2022-09-04T03:46:49.662539-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: DLR rerouting for smsc id <(null)> disabled.
2022-09-04T03:46:49.662596-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: AT2[/dev/modem]: configuration doesn't show modemtype. will 
autodetect
2022-09-04T03:46:49.662807-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: Adding interface *
[...]
2022-09-04T03:46:49.663534-07:00 ubuntu bearerbox[3190]: 2022-09-04 03:46:49 
[3190] [0] INFO: Kannel bearerbox II version 1.4.5 starting


  *   And Kannel continues to load and begins processing messages successfully

root@ubuntu:~# apt info kannel
Package: kannel
Version: 1.4.5-9ubuntu2
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Ubuntu Developers 
ubuntu-devel-disc...@lists.ubuntu.com<mailto:ubuntu-devel-disc...@lists.ubuntu.com>
Original-Maintainer: Chris Hofstaedtler z...@debian.org<mailto:z...@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4,691 kB
Pre-Depends: init-system-helpers (>= 1.54~)
Depends: adduser, lsb-base, psmisc, libc6 (>= 2.34), libct4 (>= 0.64), libhiredi
s0.14 (>= 0.14.0), libmysqlclient21 (>= 8.0.11), libpam0g (>= 0.99.7.1), libpcre
3, libpq5, libsqlite3-0 (>= 3.5.9), libssl3 (>= 3.0.0~~alpha1), libxml2 (>= 2.7.
4)
Conflicts: kannel-cvs, kannel-devel
Replaces: kannel-cvs, kannel-devel
Homepage: https://www.kannel.org/
Download-Size: 1,240 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: WAP and SMS gateway
Kannel is a gateway for connecting WAP (Wireless Application Protocol)
phones to the Internet.
It also works as an SMS/SMPP gateway,
for providing SMS based services for GSM phones.
.
Compiled with ssl, MySQL and native malloc.

root@ubuntu:~#


WHAT I HAVE TRIED

  *   I tried uninstalling & re-installing kannel; no change in behavior
 *   apt remove kannel
 *   apt install kannel

--sk

Stuart Kendrick


change modems / bearerbox no longer connects

2022-06-09 Thread Stuart Kendrick
I have just replaced my old 3G modem (MultiTech) with a new 4G one (also 
MultiTech) ... and now bearerbox fails to negotiate speed ...

  *   What is this telling me?

[...]
2022-06-09T15:53:50.161623-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [0] INFO: AT2[/dev/modem]: configuration doesn't show modemtype. will 
autodetect
2022-06-09T15:53:50.161746-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [6] INFO: AT2[/dev/modem]: opening device
2022-06-09T15:53:50.161842-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [0] INFO: Adding interface *
2022-06-09T15:53:50.162154-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [0] INFO: 
2022-06-09T15:53:50.162202-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [0] INFO: Kannel bearerbox II version 1.4.5 starting
2022-06-09T15:53:50.162259-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [0] INFO: MAIN: Start-up done, entering mainloop
2022-06-09T15:53:50.162311-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:50 
[5519] [5] INFO: Client connected from <127.0.0.1>
2022-06-09T15:53:51.164367-07:00 vishnu bearerbox[5519]: 2022-06-09 15:53:51 
[5519] [6] INFO: AT2[/dev/modem]: speed set to 115200
2022-06-09T15:54:11.485394-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:11 
[5519] [6] INFO: AT2[/dev/modem]: Closing device
2022-06-09T15:54:11.485648-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:11 
[5519] [6] INFO: AT2[/dev/modem]: opening device
2022-06-09T15:54:12.487582-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:12 
[5519] [6] INFO: AT2[/dev/modem]: speed set to 57600
2022-06-09T15:54:32.908334-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:32 
[5519] [6] INFO: AT2[/dev/modem]: Closing device
2022-06-09T15:54:32.909724-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:32 
[5519] [6] INFO: AT2[/dev/modem]: opening device
2022-06-09T15:54:33.910791-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:33 
[5519] [6] INFO: AT2[/dev/modem]: speed set to 38400
2022-06-09T15:54:54.333076-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:54 
[5519] [6] INFO: AT2[/dev/modem]: Closing device
2022-06-09T15:54:54.348974-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:54 
[5519] [6] INFO: AT2[/dev/modem]: opening device
2022-06-09T15:54:55.335600-07:00 vishnu bearerbox[5519]: 2022-06-09 15:54:55 
[5519] [6] INFO: AT2[/dev/modem]: speed set to 19200
2022-06-09T15:55:15.750830-07:00 vishnu bearerbox[5519]: 2022-06-09 15:55:15 
[5519] [6] INFO: AT2[/dev/modem]: Closing device
2022-06-09T15:55:15.751195-07:00 vishnu bearerbox[5519]: 2022-06-09 15:55:15 
[5519] [6] INFO: AT2[/dev/modem]: opening device
2022-06-09T15:55:16.753260-07:00 vishnu bearerbox[5519]: 2022-06-09 15:55:16 
[5519] [6] INFO: AT2[/dev/modem]: speed set to 9600
2022-06-09T15:55:37.172905-07:00 vishnu bearerbox[5519]: 2022-06-09 15:55:37 
[5519] [6] INFO: AT2[/dev/modem]: Closing device
2022-06-09T15:55:37.174270-07:00 vishnu bearerbox[5519]: 2022-06-09 15:55:37 
[5519] [6] INFO: AT2[/dev/modem]: cannot detect speed
2022-06-09T15:55:37.174399-07:00 vishnu bearerbox[5519]: 2022-06-09 15:55:37 
[5519] [6] ERROR: AT2[/dev/modem]: Couldn't connect (retrying in 10 seconds).

I can use minicom to query the modem and report information about local service

AT+GMI
Telit
OK

AT+GMM
ME910C1-NA

AT+CSQ
+CSQ:  29.6

AT#SERVINFO
#SERVINFO: 5035,-50,"AT","310260",1BE,2C34,256,0,-79

This suggests to me that Linux can talk to the modem via /dev/modem, and that 
the modem is talking to the service provider

linux# ll /dev/modem
lrwxrwxrwx 1 root root 7 Jun  9 15:21 /dev/modem -> ttyUSB1
linux# ll /dev/ttyUSB1
crw-rw-rw- 1 root dialout 188, 1 Jun  9 15:55 /dev/ttyUSB1
linux# cat /etc/udev/rules.d/10-modem.rules
KERNEL=="ttyUSB1", SYMLINK+="modem", MODE="0666"
linux#

>From /etc/kannel/kannel.conf
# SMSC GSM
group = smsc
smsc = at
modemtype = auto
device = /dev/modem
validityperiod = 24
max-error-count = 20

>From /etc/kannel/modems.conf
# If modemtype=auto, try everyone and defaults to this one
group = modems
id = generic
name = "Generic Modem"

Do I perhaps need to define something other than 'generic' for a 4G Multitech?

--sk

Stuart Kendrick
Allen Institute


RE: disabling incoming SMS

2019-02-20 Thread Stuart Kendrick
I ended up adding my modem’s phone number to the white-list line.  This seems 
to be working as desired – no more spam.

# Smsbox related
group = smsbox
bearerbox-host = localhost
global-sender = xx
white-list = xx

where ‘xx’ is really my modem’s phone number

--sk

From: Web Min 
Sent: Tuesday, February 19, 2019 8:57 AM
To: Stuart Kendrick 
Cc: users@kannel.org
Subject: Re: disabling incoming SMS

Hello,

If you are using the SMSBOX, did you try to change the password of group = 
sendsms-user

Try to add also the global-sender parameter to the group = smsbox , to restrict 
certain pre-code like 001 for state etc in this way, it will ignore the 
none prefix mobile number.

Try to change the smsbox-port if applicable.

Warm Regards

On Tue, Feb 19, 2019 at 7:47 PM Stuart Kendrick 
mailto:stua...@alleninstitute.org>> wrote:
I’m seeing a lot of this in my logs:

2019-02-18T19:28:26.526495-08:00 vishnu smsbox[21580]: 2019-02-18 19:28:26 
[21580] [5] INFO: Starting to service 
<#001#006'application/vnd.wap.mms-message> from <301000> to <1234>
2019-02-18T19:28:44.167763-08:00 vishnu smsbox[21580]: 2019-02-18 19:28:44 
[21580] [5] INFO: Starting to service <1301000 Error Invalid Number. Please 
re-send using a valid 10 digit mobile number or valid short code. No service 
specified> from <+1121611611> to <1234>
[…]
2019-02-19T08:38:24.918834-08:00 vishnu smsbox[21580]: 2019-02-19 08:38:24 
[21580] [5] INFO: Starting to service <11121611611 Error Invalid Number. Please 
re-send using a valid 10 digit mobile number or valid short code. No service 
specified> from <+1121611611> to <1234>
2019-02-19T08:38:37.474384-08:00 vishnu smsbox[21580]: 2019-02-19 08:38:37 
[21580] [5] INFO: Starting to service <11121611611 Error Invalid Number. Please 
re-send using a valid 10 digit mobile number or valid short code. No service 
specified> from <+1121611611> to <1234>

I speculate:  someone has found my cellular modem number and is sending me spam.

For this application, I transmit SMS over the cellular modem; I don’t want to 
receive anything.

  *   My carrier (AT) tells me that they cannot block in-bound SMS – they can 
enable bi-directional SMS or disable it:  all or nothing.
  *   I disabled auto-answer on the modem … but this setting appears to govern 
POTS, not SMS


  *   Is there a Kannel way (bearerbox or smsbox) to disable incoming reception 
of SMS?
  *   Alternatively, is there a way to instruct Kannel to send requests for 
Invalid Numbers (e.g. ‘1234’) to /dev/null?
  *   Other ideas for dumping these messages?  I’m mostly annoyed by the 
repetitive logging

At the moment, I have a cronjob job which stops bearerox & smsbox, sleeps for 
several minutes (not clear to me why this is necessary), and then restarts 
them.  This of course creates a dead zone, in terms of service, which is 
suboptimal.

--sk




disabling incoming SMS

2019-02-19 Thread Stuart Kendrick
I'm seeing a lot of this in my logs:

2019-02-18T19:28:26.526495-08:00 vishnu smsbox[21580]: 2019-02-18 19:28:26 
[21580] [5] INFO: Starting to service 
<#001#006'application/vnd.wap.mms-message> from <301000> to <1234>
2019-02-18T19:28:44.167763-08:00 vishnu smsbox[21580]: 2019-02-18 19:28:44 
[21580] [5] INFO: Starting to service <1301000 Error Invalid Number. Please 
re-send using a valid 10 digit mobile number or valid short code. No service 
specified> from <+1121611611> to <1234>
[...]
2019-02-19T08:38:24.918834-08:00 vishnu smsbox[21580]: 2019-02-19 08:38:24 
[21580] [5] INFO: Starting to service <11121611611 Error Invalid Number. Please 
re-send using a valid 10 digit mobile number or valid short code. No service 
specified> from <+1121611611> to <1234>
2019-02-19T08:38:37.474384-08:00 vishnu smsbox[21580]: 2019-02-19 08:38:37 
[21580] [5] INFO: Starting to service <11121611611 Error Invalid Number. Please 
re-send using a valid 10 digit mobile number or valid short code. No service 
specified> from <+1121611611> to <1234>

I speculate:  someone has found my cellular modem number and is sending me spam.

For this application, I transmit SMS over the cellular modem; I don't want to 
receive anything.

  *   My carrier (AT) tells me that they cannot block in-bound SMS - they can 
enable bi-directional SMS or disable it:  all or nothing.
  *   I disabled auto-answer on the modem ... but this setting appears to 
govern POTS, not SMS


  *   Is there a Kannel way (bearerbox or smsbox) to disable incoming reception 
of SMS?
  *   Alternatively, is there a way to instruct Kannel to send requests for 
Invalid Numbers (e.g. '1234') to /dev/null?
  *   Other ideas for dumping these messages?  I'm mostly annoyed by the 
repetitive logging

At the moment, I have a cronjob job which stops bearerox & smsbox, sleeps for 
several minutes (not clear to me why this is necessary), and then restarts 
them.  This of course creates a dead zone, in terms of service, which is 
suboptimal.

--sk




RE: source of a message

2019-02-10 Thread Stuart Kendrick
From a high-level, my Kannel installation looks like this:

Linux box (Kannel)  -- Cellular Modem  PSTN

‘Linux box’ also hosts ‘send-sms’, which is invoked by a monitoring application 
running on ‘Linux box’

I’ve been focused on how ‘send-sms’ could possibly be submitting this SMS … but 
this isn’t what is happening.

Rather “<#001#006'application/vnd.wap.mms-message” submitted this SMS … who is 
that?

stuartk@guru:/usr/sbin$ strings bearerbox | grep mms-message
stuartk@guru:/usr/sbin$ strings smsbox | grep mms-message
application/vnd.wap.mms-message
stuartk@guru:/usr/sbin$

How is ‘smsbox’ itself generating an SMS?


  *   Could this possibly originate from someone sending SMS to Cellular Modem 
via the PSTN?  My service provider claims that they block all incoming service …

{ … test ….}

Ahh, I see – they do not in fact block incoming service.  Ahh, I see, someone 
is sending me SMS via the Cellular-Modem path … and I am not equipped to do 
anything useful with these.

Got it.  Thank you for your assistance,

--sk


From: Web Min 
Sent: Sunday, February 10, 2019 6:53 AM
To: Stuart Kendrick 
Cc: users@kannel.org
Subject: Re: source of a message

If I'm not mistaken, the 301000 is the sender id to appear for the 
recipient not the IP address of the client.

Warm Regards,

On Sun, Feb 10, 2019 at 5:13 PM Stuart Kendrick 
mailto:stua...@alleninstitute.org>> wrote:
Starting a few days ago, I see the following once in syslog:

2019-02-07T10:03:10.411207-08:00 vishnu smsbox[2075]: 2019-02-07 10:03:10 
[2075] [5] INFO: Starting to service <#001#006'application/vnd.wap.mms-message> 
from <301000> to <1234>

Followed by many of these:
2019-02-07.gz:2019-02-07T10:05:10.583219-08:00 guru smsbox[2075]: 2019-02-07 
10:05:10 [2075] [5] INFO: Starting to service <11121611611 Error Invalid 
Number. Please re-send using a valid 10 digit mobile number or valid short 
code. No service specified> from <+1121611611> to <1234>

What device submitted this message?  I don’t see an IP address in these log 
lines


As far as I know, the only source of SMS messages to my Kannel installation is 
a script (‘send-sms’) which executes an HTTP PUT on the following URL:
  $url = 
"http://$gateway/cgi-bin/sendsms?username=$username=$password=$recipient_tel=$message;;

And normally, I see something like the following in syslog:

2019-02-07T08:00:32.314355-08:00 guru smsbox[2075]: 2019-02-07 08:00:32 [2075] 
[3] INFO: smsbox: Got HTTP request  from <10.12.7.11>
2019-02-07T08:00:32.314415-08:00 guru smsbox[2075]: 2019-02-07 08:00:32 [2075] 
[3] INFO: sendsms used by 
2019-02-07T08:00:32.314472-08:00 guru smsbox[2075]: 2019-02-07 08:00:32 [2075] 
[3] INFO: sendsms sender: (10.12.7.11) to:<2069548415> 
msg:dn:1[console.aws.amazon.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fconsole.aws.amazon.com=02%7C01%7C%7C6593c36accc04adc4e3a08d68f67893d%7C32669cd6737f4b398bddd6951120d3fc%7C0%7C0%7C636854072190504096=xEjBtSrWL%2B7yjkwYLu9dvPilx%2BoRVj9Tarqc3H5579w%3D=0>]>

In other words, the only source for SMS messages is 10.12.7.11 … what does the 
source 301000 mean … it doesn’t look like an IP address to me.

--sk



source of a message

2019-02-10 Thread Stuart Kendrick
Starting a few days ago, I see the following once in syslog:

2019-02-07T10:03:10.411207-08:00 vishnu smsbox[2075]: 2019-02-07 10:03:10 
[2075] [5] INFO: Starting to service <#001#006'application/vnd.wap.mms-message> 
from <301000> to <1234>

Followed by many of these:
2019-02-07.gz:2019-02-07T10:05:10.583219-08:00 guru smsbox[2075]: 2019-02-07 
10:05:10 [2075] [5] INFO: Starting to service <11121611611 Error Invalid 
Number. Please re-send using a valid 10 digit mobile number or valid short 
code. No service specified> from <+1121611611> to <1234>

What device submitted this message?  I don't see an IP address in these log 
lines


As far as I know, the only source of SMS messages to my Kannel installation is 
a script ('send-sms') which executes an HTTP PUT on the following URL:
  $url = 
"http://$gateway/cgi-bin/sendsms?username=$username=$password=$recipient_tel=$message;;

And normally, I see something like the following in syslog:

2019-02-07T08:00:32.314355-08:00 guru smsbox[2075]: 2019-02-07 08:00:32 [2075] 
[3] INFO: smsbox: Got HTTP request  from <10.12.7.11>
2019-02-07T08:00:32.314415-08:00 guru smsbox[2075]: 2019-02-07 08:00:32 [2075] 
[3] INFO: sendsms used by 
2019-02-07T08:00:32.314472-08:00 guru smsbox[2075]: 2019-02-07 08:00:32 [2075] 
[3] INFO: sendsms sender: (10.12.7.11) to:<2069548415> 
msg:dn:1[console.aws.amazon.com]>

In other words, the only source for SMS messages is 10.12.7.11 ... what does 
the source 301000 mean ... it doesn't look like an IP address to me.

--sk



reducing logging verbosity to syslog

2016-06-02 Thread Stuart Kendrick
I would like to reduce logging verbosity.  When I run Kannel with console 
logging:
/usr/sbin/bearerbox -v 1 /etc/kannel/kannel.conf
I get the logging level I want.

But when I instruct kannel.conf to use syslog:
syslog-level = info
indeed, bearerbox and smsbox log to syslog ... but the verbosity level seems 
unaffected by what I type as the syslog severity level, i.e. 'emergency' to 
'info' to 'debug' all give me the same 'debug' level of messages.

I thought perhaps that setting 'log-level = 1' in kannel.conf would change 
this, but apparently not.

Kannel-1.4.4

cat /etc/kannel/kannel.conf

# Core config
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = secret
status-password = not-so-secret
syslog-level = info
smsbox-max-pending = 5
sms-resend-freq = 60
sms-resend-retry = 5
log-level = 1
include = /etc/kannel/modems.conf

# SMSC GSM
group = smsc
smsc = at
modemtype = auto
device = /dev/modem
validityperiod = 24
max-error-count = 5

# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = xxxyyy
log-level = 1

# SEND-SMS USERS
group = sendsms-user
username = foo
password = bar

# SMS SERVICE Default
# there should be default always
group = sms-service
keyword = default
text = "No service specified"



removing an SMS message from the send queue

2016-06-02 Thread Stuart Kendrick
When I send an invalid mobile number to smsbox, it logs the following error 
message:

2016-06-02T06:00:54.361419-07:00 guru smsbox[5157]: 2016-06-02 06:00:54 [5157] 
[5] INFO: Starting to service <11121611611 Error Invalid Number. Please re-send 
using a valid 10 digit mobile number or valid short code. No service specified> 
from <+1121611611> to <1234>

And smsbox then repeats this message, apparently forever (well, at least ~10 
minutes).

Question #1:  I resolved this by stopping & restarting both bearerbox & smsbox. 
 Is there a less dramatic way to fix the issue?

Question #2:  How do instruct smsbox to give up on an undeliverable message?  I 
thought that "sms-resend-retry = 5" would accomplish this, but apparently not.

Question #3:  How would I delete this message from the queue?  I tried the 
following, but I received the message "Denied"
lynx -dump http://localhost:13000/remove-message?id=11121611611=x

kannel v1.4.4
CentOS 7
Multitech modem

cat /etc/kannel/kannel.conf

# Core config
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = secret
status-password = not-so-secret
syslog-level = info
smsbox-max-pending = 5
sms-resend-freq = 60
sms-resend-retry = 5
log-level = 1
include = /etc/kannel/modems.conf

# SMSC GSM
group = smsc
smsc = at
modemtype = auto
device = /dev/modem
validityperiod = 24
max-error-count = 5

# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = xxxyyy
log-level = 1

# SEND-SMS USERS
group = sendsms-user
username = foo
password = bar

# SMS SERVICE Default
# there should be default always
group = sms-service
keyword = default
text = "No service specified"


--sk