Re: disabling incoming SMS

2019-02-24 Thread Stipe Tolj

Am 24.02.19 21:50, schrieb rene.klu...@chimit.nl:

I think disabling MO in the AT module is possible if you set sim buffering
to false and specify the proper CNMI string for your modem that disables MO
indications.


thanks Rene for the idea path. Never tried this actually.

Maybe you can jump here in and assist?

Stipe

--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

st...@kannel.org  s...@tolj.org
---



RE: disabling incoming SMS

2019-02-24 Thread rene.kluwen
I think disabling MO in the AT module is possible if you set sim buffering
to false and specify the proper CNMI string for your modem that disables MO
indications.

=+= Rene

-Oorspronkelijk bericht-
Van: users  Namens Stipe Tolj
Verzonden: zondag 24 februari 2019 21:06
Aan: users@kannel.org
CC: de...@kannel.org
Onderwerp: Re: disabling incoming SMS

Am 19.02.19 17:46, schrieb 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.

Hi Stuart,

what you can do is to ensure that the "visible" impact is minimal. The SMSC
AT module has no way to "refuse" MOs directly. It will send any MO to your
connected smsbox instance.

If you have no application driven MOs that you want to receive, then you can
drop the MOs to nirvana and ensure that there is no response bounced back to
the originator, i.e. via config context

   group = sms-service
   keyword = default
   text = "No action specified"
   max-messages = 0

You WILL still see the MOs in the bearerbox access-log and the smsbox
access-log though.

It MAY BE an option to think about a config directive for the SMSC AT module
to "turn off" MO interpretation and simply drop anything we get on the
modem.

@devel: Anyone from the SMSC AT developer folks that wants to pick this up?


--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

st...@kannel.org  s...@tolj.org
---





Re: Need help for opensmpp and SQLBox

2019-02-24 Thread Stipe Tolj

Am 18.02.19 09:20, schrieb Loyc Cossou:

Hi,

It's now been 2 weeks that I am struggling with this configuration.

I am trying to connect OpenSMPPBox to SqlBix so all the messages are
sent via SQLBox and the DLRs and Logs are available in the database.

Kannel is working fine  as I am able to send SMS.
SQLBox is also working fine as all the messages I insert in the SEND_SMS
table are being sent and moved to SENT_SMS.
And all my clients are able to connect via SMPP and send SMS.

The configuration is like OpenSmppBox and SQLBox are all connected to
bearearBox, but I need this openSMPP --> SQLBox --> Kannel.

Bellow is my configuration files. Can you please advise on how to modify
it so i have opensmppbox connected to sqlbox connected to Bearerbox?
openSMPP --> SQLBox --> Kannel


*# Default kannel configuration file*
*group = core*
*admin-port = 13000*
*admin-password = adminuser*
*status-password = adminpass*
*admin-deny-ip = "*.*.*.*"*
*admin-allow-ip = "*.*.*.*"*
*smsbox-port = 13001*
*box-allow-ip = "*.*.*.*"*
*wdp-interface-name = "*"*
*log-file = "/etc/kannel/log/bearerbox.log"*
*log-level = 0*
*dlr-storage = mysql*
*smsbox-max-pending = 5000*
*sms-resend-freq = 5*
*sms-resend-retry = 5*
*store-location = "/etc/kannel/log/kannel-insms-tmp"*

*# SMSBOX SETUP*
*group = smsbox*
*smsbox-id = mysmsbox*
*bearerbox-host = localhost*
*sendsms-port = 13013*
*global-sender = Connectify*
*log-file = "/etc/kannel/log/smsbox.log"*
*log-level = 1*
*access-log = "/etc/kannel/log/Mo_sendSMSRequests.access"*
*reply-couldnotfetch = "Aucune correspondance pour votre requete"*
*reply-couldnotrepresent = "Le resultat ne peut etre transmis via SMS"*
*reply-requestfailed = "Une erreur temporaire est survenue... Veuillez
ressayer plus tard"*
*reply-emptymessage = "Aucune correspondance pour votre requete"*
*http-request-retry = 1*
*http-queue-delay = 5*
*max-pending-requests = 5000*
*#sms-length = 160*
*#mo-recode = true*

*group = smsbox-route*
*smsbox-id = mysmsbox*
*smsc-id = favoriteSMSC*

*# SMSC CONNECTIONS*
*group = smsc*
*smsc = smpp*
*smsc-id = MoovBjSoneb*
*preferred-smsc-id = MoovBjSoneb*
*denied-smsc-id = favoriteSMSC*
*interface-version = 34*
*host = *
*port = 2775*
*smsc-username = aa*
*smsc-password = bb*
*system-type = smpp*
*address-range = ""*
*dest-addr-ton = 1*
*dest-addr-npi = 1*
*bind-addr-ton = 1*
*bind-addr-npi = 1*
*#msg-id-type = 0x00*
*transceiver-mode = yes*
*source-addr-autodetect = yes*
*
*
*# SMSC CONNECTIONS*
*group = smsc*
*smsc = smpp*
*smsc-id = favoriteSMSC*
*preferred-smsc-id = favoriteSMSC*
*denied-smsc-id = MoovBjSoneb*
*interface-version = 34*
*host = *
*port = 2775*
*smsc-username = cc*
*smsc-password = dd*
*system-type = smpp*
*address-range = ""*
*dest-addr-ton = 1*
*dest-addr-npi = 1*
*bind-addr-ton = 1*
*bind-addr-npi = 1*
*msg-id-type = 0x00*
*transceiver-mode = yes*
*source-addr-autodetect = yes*

*group = sendsms-user*
*username = my*
*password = god*
*max-messages = 7*
*concatenation = true*
*forced-smsc = favoriteSMSC*
*
*
*# mysql connection*
*group = mysql-connection*
*id = mydlr*
*host = something.amazonaws.com *
*username = theuser*
*password = thepass*
*database = thedb*
*max-connections = 1*
*
*
*# DLR table structure*
*group = dlr-db*
*id = mydlr*
*table = dlr*
*field-smsc = smsc*
*field-timestamp = ts*
*field-destination = destination*
*field-source = source*
*field-service = service*
*field-url = url*
*field-mask = mask*
*field-status = status*
*field-boxc-id = boxc*
*
*

*
*
*
*
*SQLBox Conf *
*#SqlBox*
*group = sqlbox*
*id = sqlbox-db*
*smsbox-id = public_ctf*
*bearerbox-host = localhost*
*bearerbox-port = 13001*
*smsbox-port = 130013*
*smsbox-port-ssl = false*
*sql-log-table = sent_sms*
*sql-insert-table = send_sms*
*log-file = "/etc/kannel/log/sqlbox.log"*
*log-level = 0*

*# mysql connection*
*group = mysql-connection*
*id = sqlbox-db*
*host = something.amazonaws.com *
*port = 3306*
*username = theuser*
*password = thepass*
*database = aSQLBoxDb*
*max-connections = 1*
*
*
*
*

* Opensmppbox.conf ==*
*
*
*group = core*
*dlr-storage = mysql*

*#OpenSmppBox*
*group = opensmppbox*
*opensmppbox-id = smppboxA*
*opensmppbox-port = 8990*
*bearerbox-host = localhost*
*bearerbox-port = 13001*
*#bearerbox-port = 13013*
*our-system-id = public_ctf*
*smpp-logins = /etc/kannel/utilisateurs.txt*
*use-systemid-as-smsboxid = true*
*route-to-smsc = favoriteSMSC*
*source-addr-ton = 1*
*source-addr-npi = 1*
*dest-addr-ton = 1*
*dest-addr-npi = 1*
*log-file = /etc/kannel/log/opensmppbox.log*
*log-level = 0*

*# mysql connection*
*group = mysql-connection*
*id = mydlr*
*host = something.amazonaws.com *
*username = theuser*
*password = thedb*
*database = thesmppdb*
*max-connections = 1*

*# DLR table structure*
*group = dlr-db*
*id = mydlr*
*table = dlr*
*field-smsc = smsc*
*field-timestamp = ts*
*field-destination = destination*
*field-source = source*

Re: disabling incoming SMS

2019-02-24 Thread Stipe Tolj

Am 19.02.19 17:46, schrieb 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.


Hi Stuart,

what you can do is to ensure that the "visible" impact is minimal. The 
SMSC AT module has no way to "refuse" MOs directly. It will send any MO 
to your connected smsbox instance.


If you have no application driven MOs that you want to receive, then you 
can drop the MOs to nirvana and ensure that there is no response bounced 
back to the originator, i.e. via config context


  group = sms-service
  keyword = default
  text = "No action specified"
  max-messages = 0

You WILL still see the MOs in the bearerbox access-log and the smsbox 
access-log though.


It MAY BE an option to think about a config directive for the SMSC AT 
module to "turn off" MO interpretation and simply drop anything we get 
on the modem.


@devel: Anyone from the SMSC AT developer folks that wants to pick this up? 

--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

st...@kannel.org  s...@tolj.org
---



Re: OPENSMPPBox issue.

2019-02-24 Thread Stipe Tolj

Am 19.02.19 08:08, schrieb Gert Tamm:

2019-02-19 08:07:13 [13238] [0] INFO: Debug_lvl = 0, log_file = ,
log_lvl = 0
2019-02-19 08:07:13 [13238] [0] DEBUG: Loading include file
`/etc/kannel/opensmppbox.conf' (on line 39 of file /etc/kannel/kannel.conf).
2019-02-19 08:07:13 [13238] [0] ERROR: Group 'opensmppbox' is no valid
group identifier.
2019-02-19 08:07:13 [13238] [0] ERROR: Error found on line 5 of file
`/etc/kannel/kannel.conf'.
2019-02-19 08:07:13 [13238] [0] PANIC: Couldn't read configuration from
`/etc/kannel/kannel.conf'.
2019-02-19 08:07:13 [13238] [0] PANIC: bearerbox(gw_panic+0x16b) [0x48068b]
2019-02-19 08:07:13 [13238] [0] PANIC: bearerbox(main+0xe3a) [0x40d69a]
2019-02-19 08:07:13 [13238] [0] PANIC:
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f9fe54d0830]
2019-02-19 08:07:13 [13238] [0] PANIC: bearerbox(_start+0x29) [0x40d759]


2019-02-19 08:07:15 [13239] [0] INFO: Debug_lvl = 0, log_file = ,
log_lvl = 0
2019-02-19 08:07:15 [13239] [0] DEBUG: Loading include file
`/etc/kannel/opensmppbox.conf' (on line 39 of file /etc/kannel/kannel.conf).
2019-02-19 08:07:15 [13239] [0] ERROR: Group 'opensmppbox' is no valid
group identifier.
2019-02-19 08:07:15 [13239] [0] ERROR: Error found on line 5 of file
`/etc/kannel/kannel.conf'.
2019-02-19 08:07:15 [13239] [0] PANIC: Couldn't read configuration from
`/etc/kannel/kannel.conf'.
2019-02-19 08:07:15 [13239] [0] PANIC: smsbox(gw_panic+0x16b) [0x439adb]
2019-02-19 08:07:15 [13239] [0] PANIC: smsbox(main+0x12b9) [0x40d7d9]
2019-02-19 08:07:15 [13239] [0] PANIC:
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fbc458d8830]
2019-02-19 08:07:15 [13239] [0] PANIC: smsbox(_start+0x29) [0x40da69]

2/19/2019 09:05 Web Min kirjutas:

try the following instead

bearerbox -v 0 /etc/kannel/kannel.conf

smsbox -v 0 /etc/kannel/kannel.conf


that's actually correct, since the opensmppbox is an add-on component 
that registers it's own config group identifiers, and therefore they can 
ONLY be used in the configuration scope of the opensmppbox runtime.


In other words, if you add a 'group = opensmppbox' context to your 
kannel.conf that is used for bearebox and smsbox, they will NOT KNOW 
about that config group, and hence complain.


The best idea is that you separate the configuration structure, so that 
opensmppbox uses only it's own parts and bearerbox/smsbox vice versa.


--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

st...@kannel.org  s...@tolj.org
---