Users,
 
After much fun and games with Kannel I have finally got DLR working! Thanks for the help (especially Alejandro!). I now have another problem:
 
I can't match the DLR message with the outgoing message group.
 
I'm now having problems reconciling DLR messages to the right SMSC it was sent from. I have a set of configuration files running for one SMSC. The configuration files contain multiple SMSC groups. One for each network at a set premium.
 
The example configuration below contains two SMSC's. If I send an SMS over smsc1 it creates the DLR for that SMSC. However, when I get another DLR response it attempts to look for
a DLR in the database that was created for the other SMSC, smsc2.  See notes in log file snippet.
 
I scoured the mail archive and couldn't seem to find anybody who has had this problem before. Hopefully somebody can help.
 
 
Log file:
2004-10-21 14:54:15 [7755] [10] DEBUG: boxc_receiver: sms received
2004-10-21 14:54:15 [7755] [10] DEBUG: send_msg: sending msg to boxc: <smsbox>
### Message received for SMSC1 ####
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP[smsc1]: Manually forced dest addr ton = 1, dest add npi = 1
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP[smsc1]: Sending PDU:
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP PDU 0x95fc530 dump:
2004-10-21 14:54:15 [7755] [6] DEBUG:   type_name: submit_sm
2004-10-21 14:54:15 [7755] [6] DEBUG:   command_id: 4 = 0x00000004
2004-10-21 14:54:15 [7755] [6] DEBUG:   command_status: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   sequence_number: 14 = 0x0000000e
2004-10-21 14:54:15 [7755] [6] DEBUG:   service_type: "####"
2004-10-21 14:54:15 [7755] [6] DEBUG:   source_addr_ton: 2 = 0x00000002
2004-10-21 14:54:15 [7755] [6] DEBUG:   source_addr_npi: 1 = 0x00000001
2004-10-21 14:54:15 [7755] [6] DEBUG:   source_addr: "#####'"
2004-10-21 14:54:15 [7755] [6] DEBUG:   dest_addr_ton: 1 = 0x00000001
2004-10-21 14:54:15 [7755] [6] DEBUG:   dest_addr_npi: 1 = 0x00000001
2004-10-21 14:54:15 [7755] [6] DEBUG:   destination_addr: "#########"
2004-10-21 14:54:15 [7755] [6] DEBUG:   esm_class: 3 = 0x00000003
2004-10-21 14:54:15 [7755] [6] DEBUG:   protocol_id: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   priority_flag: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   schedule_delivery_time: NULL
2004-10-21 14:54:15 [7755] [6] DEBUG:   validity_period: NULL
2004-10-21 14:54:15 [7755] [6] DEBUG:   registered_delivery: 1 = 0x00000001
2004-10-21 14:54:15 [7755] [6] DEBUG:   replace_if_present_flag: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   data_coding: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   sm_default_msg_id: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   sm_length: 29 = 0x0000001d
2004-10-21 14:54:15 [7755] [6] DEBUG:   short_message:
2004-10-21 14:54:15 [7755] [6] DEBUG:    Octet string at 0x95fc630:
2004-10-21 14:54:15 [7755] [6] DEBUG:      len:  29
2004-10-21 14:54:15 [7755] [6] DEBUG:      size: 30
2004-10-21 14:54:15 [7755] [6] DEBUG:      immutable: 0
2004-10-21 14:54:15 [7755] [6] DEBUG:      data: 74 65 73 74 20 6d 79 20 63 6f 6e 6e 65 63 74 69   test my connecti
2004-10-21 14:54:15 [7755] [6] DEBUG:      data: 6f 6e 20 6d 62 6c 6f 78 20 66 72 65 65            on mblox free
2004-10-21 14:54:15 [7755] [6] DEBUG:    Octet string dump ends.
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP PDU dump ends.
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP[smsc1]: Got PDU:
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP PDU 0x95fc530 dump:
2004-10-21 14:54:15 [7755] [6] DEBUG:   type_name: submit_sm_resp
2004-10-21 14:54:15 [7755] [6] DEBUG:   command_id: 2147483652 = 0x80000004
2004-10-21 14:54:15 [7755] [6] DEBUG:   command_status: 0 = 0x00000000
2004-10-21 14:54:15 [7755] [6] DEBUG:   sequence_number: 14 = 0x0000000e
2004-10-21 14:54:15 [7755] [6] DEBUG:   message_id: "26d9a42c"
2004-10-21 14:54:15 [7755] [6] DEBUG: SMPP PDU dump ends.
###### DLR created for SMSC1 ########
2004-10-21 14:54:15 [7755] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smsc1, ts=26, src="" dst=447956583543, mask=31, boxc=smsbox
2004-10-21 14:54:15 [7755] [6] DEBUG: sql: INSERT INTO delivery_receipts (smsc, timestamp, source, destination, service, url, mask, boxc, status) VALUES ('smsc1', '26', '#####', '########', 'smsc1', 'http://my.web.com/dlr.php?type=%d', '31', 'smsbox', '0');
2004-10-21 14:54:15 [7755] [6] DEBUG: SMSC[smsc1]: creating DLR message
2004-10-21 14:54:15 [7755] [6] DEBUG: SMSC[smsc1]: DLR = http://my.web.com/dlr.php?type=%d
2004-10-21 14:54:15 [7755] [11] DEBUG: send_msg: sending msg to boxc: <smsbox>
2004-10-21 14:54:15 [7755] [11] DEBUG: boxc_sender: sent message to <127.0.0.1>
2004-10-21 14:54:15 [7755] [10] DEBUG: boxc_receiver: got ack
###### DLR received for SMSC2 ########
2004-10-21 14:54:17 [7755] [7] DEBUG: SMPP[smsc2]: Got PDU:
2004-10-21 14:54:17 [7755] [7] DEBUG: SMPP PDU 0x95fd8f8 dump:
2004-10-21 14:54:17 [7755] [7] DEBUG:   type_name: deliver_sm
2004-10-21 14:54:17 [7755] [7] DEBUG:   command_id: 5 = 0x00000005
2004-10-21 14:54:17 [7755] [7] DEBUG:   command_status: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   sequence_number: 3 = 0x00000003
2004-10-21 14:54:17 [7755] [7] DEBUG:   service_type: NULL
2004-10-21 14:54:17 [7755] [7] DEBUG:   source_addr_ton: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   source_addr_npi: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   source_addr: "#########"
2004-10-21 14:54:17 [7755] [7] DEBUG:   dest_addr_ton: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   dest_addr_npi: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   destination_addr: NULL
2004-10-21 14:54:17 [7755] [7] DEBUG:   esm_class: 4 = 0x00000004
2004-10-21 14:54:17 [7755] [7] DEBUG:   protocol_id: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   priority_flag: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   schedule_delivery_time: NULL
2004-10-21 14:54:17 [7755] [7] DEBUG:   validity_period: NULL
2004-10-21 14:54:17 [7755] [7] DEBUG:   registered_delivery: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   replace_if_present_flag: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   data_coding: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   sm_default_msg_id: 0 = 0x00000000
2004-10-21 14:54:17 [7755] [7] DEBUG:   sm_length: 103 = 0x00000067
2004-10-21 14:54:17 [7755] [7] DEBUG:   short_message:
2004-10-21 14:54:17 [7755] [7] DEBUG:    Octet string at 0x95fd7c8:
2004-10-21 14:54:17 [7755] [7] DEBUG:      len:  103
2004-10-21 14:54:17 [7755] [7] DEBUG:      size: 104
2004-10-21 14:54:17 [7755] [7] DEBUG:      immutable: 0
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 69 64 3a 36 35 31 37 39 37 35 34 38 20 73 75 62   id:651797548 sub
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 3a 30 30 31 20 64 6c 76 72 64 3a 30 30 31 20 73   :001 dlvrd:001 s
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 75 62 6d 69 74 20 64 61 74 65 3a 30 34 31 30 32   ubmit date:04102
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 31 31 33 35 34 20 64 6f 6e 65 20 64 61 74 65 3a   11354 done date:
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 30 34 31 30 32 31 31 33 35 34 20 73 74 61 74 3a   0410211354 stat:
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 41 43 4b 45 44 20 20 20 65 72 72 3a 30 30 33 20   ACKED   err:003
2004-10-21 14:54:17 [7755] [7] DEBUG:      data: 74 65 78 74 3a 20 00                              text: .
2004-10-21 14:54:17 [7755] [7] DEBUG:    Octet string dump ends.
2004-10-21 14:54:17 [7755] [7] DEBUG: SMPP PDU dump ends.
####### DLR handled from SMSC2 ##########
2004-10-21 14:54:17 [7755] [7] DEBUG: SMPP[smsc2] handle_pdu, got DLR
2004-10-21 14:54:17 [7755] [7] DEBUG: DLR[mysql]: Looking for DLR smsc=smsc2, ts=651797548, dst=#########, type=4
2004-10-21 14:54:17 [7755] [7] DEBUG: sql: SELECT mask, service, url, source, destination, boxc FROM delivery_receipts WHERE smsc='smsc2' AND timestamp='651797548';
2004-10-21 14:54:17 [7755] [7] DEBUG: no rows found
2004-10-21 14:54:17 [7755] [7] WARNING: DLR[mysql]: DLR for DST<447956583543> not found.
2004-10-21 14:54:17 [7755] [7] ERROR: SMPP[smsc2]: got DLR but could not find message or was not interested in it id<651797548> dst<(null)>, type<4>
 
 
Here are my config files:
 
Bearerbox config:
 
group = core
admin-port = #####
wapbox-port = #####
admin-password = bar
wdp-interface-name = "*"
log-file = "bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
 
group = wapbox
bearerbox-host = localhost
log-file = "wapbox.log"
log-level = 3
syslog-level = none
 
include = "smskannel_test.conf"
 
Smsbox config:
 
group = core
admin-port = #####
smsbox-port = #####
admin-password = bar
log-file = "smsbox.log"
log-level = 5
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
unified-prefix = "00358,0"
dlr-storage = mysql
 
group = smsbox
smsbox-id = smsbox
bearerbox-host = localhost
sendsms-port = #####
#global-sender = "#####"
#sendsms-chars = "0123456789 +-"
log-file = "smsbox.log"
log-level = 0
access-log = "access.log"
 
# DATABASE CONNECTION FOR DELIVERY RECEIPTS
 
group = mysql-connection
id = mydlr
host = localhost
mysql-username = ######
mysql-password = ######
database = ######
max-connections = 1
 
group = dlr-db
id = mydlr
table = delivery_receipts
field-smsc = smsc
field-timestamp = timestamp
field-destination = destination
field-source = source
field-service = service
field-url = "">field-mask = mask
field-status = status
field-boxc-id = boxc
 
# SMSC CONNECTIONS
 
group = smsc
smsc = smpp
smsc-id = smsc1
allowed-smsc-id = smsc1
host = #####
port = ####
smsc-username = "########"
smsc-password = "########"
enquire-link-interval = 50
system-type = "VMA"
address-range = ""
source-addr-ton = 3
#source-addr-npi = 1
dest-addr-npi = 1
dest-addr-ton = 1
transceiver-mode = TRUE
service-type = ####
msg-id-type = 0x00
 
group = sendsms-user
username = smsc1
forced-smsc = smsc1
default-smsc = smsc1
password = #####
user-deny-ip = "*.*.*.*"
user-allow-ip = "127.0.0.1"
dlr-url = ""http://my.web.com/dlr.php?type=%d&bypass=1&using=mblox">http://my.web.com/dlr.php?type=%d"
 
group = smsc
smsc = smpp
smsc-id = smsc2
allowed-smsc-id = smsc2
host = #####
port = ####
smsc-username = "######"
smsc-password = "######"
enquire-link-interval = 50
system-type = "VMA"
address-range = ""
source-addr-ton = 3
#source-addr-npi = 1
dest-addr-npi = 1
dest-addr-ton = 1
transceiver-mode = TRUE
service-type = ####
msg-id-type = 0x00
 
group = sendsms-user
username = smsc2
forced-smsc = smsc2
default-smsc = smsc2
password = #####
user-deny-ip = "*.*.*.*"
user-allow-ip = "127.0.0.1;81.89.143.76;81.89.143.77;81.89.143.78"
dlr-url = ""http://my.web.com/dlr.php?type=%d&bypass=1&using=mblox">http://my.web.com/dlr.php?type=%d"

# there should be default always
group = sms-service
keyword = default
max-messages = 0
get-url = ""http://my.web.com/dlr.php?type=%d&bypass=1&using=mblox">http://my.web.com/dlr.php?type=%d"
 
Thanks in advance.
 
Nick

Reply via email to