I have configured Kannel When trying to activate the DLR I am having a lot of problems/doubts..
I need to use the DLR to know if the phone to which I send the message is receiving it or not and thus verify if it is turned off or not.
I am using MySql for storage and I have 3 tables created: dlr, sent_sms and send_sms
in the dlr table I have the id, datetime, smsc, ts, destination, source, service and url stored, however the boxc-id is not.
No information is being stored in the other two tables.
I think it has something to do with the dlr-url since I have not created any file and I have seen that people create their own .php scripts.
I put the following in the url:
http://192.168.252.222:13013/cgi-bin/sendsms?dlr-url=http://192.168.252.222/dlr-url&dlr-mask=31&username=tester&password=foobar&to=123456789&text=prueba+sms
And in the log I get this:
2023-04-27 12:13:35 [12228] [9] DEBUG: HTTP: Status line: <HTTP/1.1 404 Not Found>
kannel.conf:
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!
# 3) read the user guide
#
# Kalle Marjola for Kannel project 2001, 2004
#---------------------------------------------
# CORE
#
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
# configuration variables like 'store-file' (or 'store-dir'),
# 'admin-allow-ip' and 'access.log'
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
#status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
log-file = "/var/log/kannel/gateway/kannel.log"
log-level = 0
#box-deny-ip = "*.*.*.*"
box-allow-ip = "*.*.*.*"
dlr-storage = mysql
#unified-prefix = "+358,00358,0;+,00"
#access-log = "/tmp/access.log"
#store-file = "kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"
#---------------------------------------------
# SMSC CONNECTIONS
#
# SMSC connections are created in bearerbox and they handle SMSC specific
# protocol and message relying. You need these to actually receive and send
# messages to handset, but can use GSM modems as virtual SMSCs
# This is a fake smsc connection, _only_ used to test the system and services.
# It really cannot relay messages to actual handsets!
group = smsc
smsc = at
modemtype = auto
device = /dev/ttyUSB1
log-file = "/var/log/kannel/smsc/smsc.log"
smsc-id = KANNEL
#port = 20000
#connect-allow-ip = 127.0.0.1
log-level = 0
group = modems
id = generic
name = ZTE
#---------------------------------------------
# SMSBOX SETUP
#
# Smsbox(es) do higher-level SMS handling after they have been received from
# SMS centers by bearerbox, or before they are given to bearerbox for delivery
group = smsbox
bearerbox-host = 127.0.0.1
bearerbox-port = 13001
sendsms-port = 13013
global-sender = 13013
#sendsms-chars = "0123456789 +-"
log-file = "/var/log/kannel/smsbox/smsbox.log"
log-level = 0
#sendsms-port-ssl = true
#access-log = "/tmp/access.log"
#---------------------------------------------
# SEND-SMS USERS
#
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar...
group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""
#---------------------------------------------
# SERVICES
#
# These are 'responses' to sms PULL messages, i.e. messages arriving from
# handsets. The response is based on message content. Only one sms-service is
# applied, using the first one to match.
#group = sms-service
#keyword = nop
#text = "You asked nothing and I did it!"
# There should be always a 'default' service. This service is used when no
# other 'sms-service' is applied.
#group = sms-service
#keyword = default
#text = "No service specified"
group = mysql-connection
id = mydlr
host = localhost
username = kannel
password = kannel
database = kannel
# max count of connections that will be opened for dbpool
# default is 1
max-connections = 1
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:
group = sqlbox
id = sqlbox-db
smsbox-id = sqlbox
#global-sender = ""
bearerbox-host = localhost
bearerbox-port = 13001
#smsbox-port = 13005
#smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
log-file = "/var/log/kannel/sqlbox/sqlbox.log"
log-level = 0
#ssl-client-certkey-file = ""
#ssl-server-cert-file = ""
#ssl-server-key-file = ""
#ssl-trusted-ca-file = ""
# Database connection examples. Please uncomment as needed
# Example MYSQL Connection
group = mysql-connection
id = sqlbox-db
host = localhost
port = 3306
username = kannel
password = kannel
database = kannel
In conclusion, I have 2 doubts:
-What do I have to put in "/dlr-url", where is this file to configure it and if someone can give me some code since I do not know how to program.
-Why is the boxc column of the dlr table empty and why are the send_sms and sent_sms tables empty?