Hi, I'm having a problem with dlr and mysql. It seems the messageid assigned by the smsc are altered to a different value when used in sql-sentences. The problem is that the value is the same for all messages, 9223372036854775807, which is the max value if an unsigned bigint. The original messageid is eg. 12ce1e325e0ac103ffffffffb9579f1c
2010-12-13 23:39:08 [15400] [8] DEBUG: boxc_receiver: sms received 2010-12-13 23:39:08 [15400] [8] DEBUG: send_msg: sending msg to box: <127.0.0.1> 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: throughput (0.00,5.00) 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: Manually forced source addr ton = 0, source add npi = 1 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: Sending PDU: 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP PDU 0x1d45480 dump: 2010-12-13 23:39:08 [15400] [6] DEBUG: type_name: submit_sm 2010-12-13 23:39:08 [15400] [6] DEBUG: command_id: 4 = 0x00000004 2010-12-13 23:39:08 [15400] [6] DEBUG: command_status: 0 = 0x00000000 2010-12-13 23:39:08 [15400] [6] DEBUG: sequence_number: 9912 = 0x000026b8 2010-12-13 23:39:08 [15400] [6] DEBUG: service_type: NULL 2010-12-13 23:39:08 [15400] [6] DEBUG: source_addr_ton: 0 = 0x00000000 2010-12-13 23:39:08 [15400] [6] DEBUG: source_addr_npi: 1 = 0x00000001 2010-12-13 23:39:08 [15400] [6] DEBUG: source_addr: "xxxx" 2010-12-13 23:39:08 [15400] [6] DEBUG: dest_addr_ton: 1 = 0x00000001 2010-12-13 23:39:08 [15400] [6] DEBUG: dest_addr_npi: 1 = 0x00000001 2010-12-13 23:39:08 [15400] [6] DEBUG: destination_addr: "xxxxxxxxxx" 2010-12-13 23:39:08 [15400] [6] DEBUG: esm_class: 3 = 0x00000003 2010-12-13 23:39:08 [15400] [6] DEBUG: protocol_id: 0 = 0x00000000 2010-12-13 23:39:08 [15400] [6] DEBUG: priority_flag: 3 = 0x00000003 2010-12-13 23:39:08 [15400] [6] DEBUG: schedule_delivery_time: NULL 2010-12-13 23:39:08 [15400] [6] DEBUG: validity_period: NULL 2010-12-13 23:39:08 [15400] [6] DEBUG: registered_delivery: 1 = 0x00000001 2010-12-13 23:39:08 [15400] [6] DEBUG: replace_if_present_flag: 0 = 0x00000000 2010-12-13 23:39:08 [15400] [6] DEBUG: data_coding: 241 = 0x000000f1 2010-12-13 23:39:08 [15400] [6] DEBUG: sm_default_msg_id: 0 = 0x00000000 2010-12-13 23:39:08 [15400] [6] DEBUG: sm_length: 40 = 0x00000028 2010-12-13 23:39:08 [15400] [6] DEBUG: short_message: 2010-12-13 23:39:08 [15400] [6] DEBUG: Octet string at 0x1d29900: 2010-12-13 23:39:08 [15400] [6] DEBUG: len: 40 2010-12-13 23:39:08 [15400] [6] DEBUG: size: 41 2010-12-13 23:39:08 [15400] [6] DEBUG: immutable: 0 2010-12-13 23:39:08 [15400] [6] DEBUG: data: 4d 65 6c 64 69 6e 67 65 6e 20 64 69 6e 20 62 6c Meldingen din bl 2010-12-13 23:39:08 [15400] [6] DEBUG: data: 65 20 73 65 6e 64 74 20 75 74 20 74 69 6c 20 39 e sendt ut til 9 2010-12-13 23:39:08 [15400] [6] DEBUG: data: 20 62 72 75 6b 65 72 65 brukere 2010-12-13 23:39:08 [15400] [6] DEBUG: Octet string dump ends. 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP PDU dump ends. 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: throughput (1.00,5.00) 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: throughput (1.00,5.00) 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: Got PDU: 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP PDU 0x1d45480 dump: 2010-12-13 23:39:08 [15400] [6] DEBUG: type_name: submit_sm_resp 2010-12-13 23:39:08 [15400] [6] DEBUG: command_id: 2147483652 = 0x80000004 2010-12-13 23:39:08 [15400] [6] DEBUG: command_status: 0 = 0x00000000 2010-12-13 23:39:08 [15400] [6] DEBUG: sequence_number: 9912 = 0x000026b8 2010-12-13 23:39:08 [15400] [6] DEBUG: message_id: 2010-12-13 23:39:08 [15400] [6] DEBUG: Octet string at 0x1d29900: 2010-12-13 23:39:08 [15400] [6] DEBUG: len: 32 2010-12-13 23:39:08 [15400] [6] DEBUG: size: 33 2010-12-13 23:39:08 [15400] [6] DEBUG: immutable: 0 2010-12-13 23:39:08 [15400] [6] DEBUG: data: 31 32 63 65 31 65 33 32 35 65 30 61 63 31 30 33 12ce1e325e0ac103 2010-12-13 23:39:08 [15400] [6] DEBUG: data: 66 66 66 66 66 66 66 66 62 39 35 37 39 66 31 63 ffffffffb9579f1c 2010-12-13 23:39:08 [15400] [6] DEBUG: Octet string dump ends. 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP PDU dump ends. 2010-12-13 23:39:08 [15400] [6] DEBUG: DLR[mysql]: Adding DLR smsc=CONN_123, ts=9223372036854775807, src=xxxx, dst=xxxxxxxxxx, mask=31, boxc= 2010-12-13 23:39:08 [15400] [6] DEBUG: adding DLR entry into database 2010-12-13 23:39:08 [15400] [6] DEBUG: sql: INSERT INTO `dlr` (`smsc`, `ts`, `source`, `destination`, `service`, `url`, `mask`, `boxc`, `status`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0) 2010-12-13 23:39:08 [15400] [6] DEBUG: SMSC[CONN_123]: creating DLR message 2010-12-13 23:39:08 [15400] [6] DEBUG: SMSC[CONN_123]: DLR = http://localhost/dlr.php?id=8972625&status=%d 2010-12-13 23:39:08 [15400] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1> 2010-12-13 23:39:08 [15400] [9] DEBUG: boxc_sender: sent message to <127.0.0.1> 2010-12-13 23:39:08 [15400] [6] DEBUG: SMPP[CONN_123]: throughput (1.00,5.00) 2010-12-13 23:39:08 [15400] [8] DEBUG: boxc_receiver: got ack 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP[CONN_123]: throughput (0.00,5.00) 2010-12-13 23:39:20 [15400] [6] DEBUG: Optional parameter tag (0x0427) 2010-12-13 23:39:20 [15400] [6] DEBUG: Optional parameter length read as 1 2010-12-13 23:39:20 [15400] [6] DEBUG: Optional parameter tag (0x001e) 2010-12-13 23:39:20 [15400] [6] DEBUG: Optional parameter length read as 33 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP[CONN_123]: Got PDU: 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP PDU 0x1d4e920 dump: 2010-12-13 23:39:20 [15400] [6] DEBUG: type_name: deliver_sm 2010-12-13 23:39:20 [15400] [6] DEBUG: command_id: 5 = 0x00000005 2010-12-13 23:39:20 [15400] [6] DEBUG: command_status: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: sequence_number: 792 = 0x00000318 2010-12-13 23:39:20 [15400] [6] DEBUG: service_type: NULL 2010-12-13 23:39:20 [15400] [6] DEBUG: source_addr_ton: 1 = 0x00000001 2010-12-13 23:39:20 [15400] [6] DEBUG: source_addr_npi: 1 = 0x00000001 2010-12-13 23:39:20 [15400] [6] DEBUG: source_addr: "xxxxxxxxxx" 2010-12-13 23:39:20 [15400] [6] DEBUG: dest_addr_ton: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: dest_addr_npi: 1 = 0x00000001 2010-12-13 23:39:20 [15400] [6] DEBUG: destination_addr: "xxxx" 2010-12-13 23:39:20 [15400] [6] DEBUG: esm_class: 4 = 0x00000004 2010-12-13 23:39:20 [15400] [6] DEBUG: protocol_id: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: priority_flag: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: schedule_delivery_time: NULL 2010-12-13 23:39:20 [15400] [6] DEBUG: validity_period: NULL 2010-12-13 23:39:20 [15400] [6] DEBUG: registered_delivery: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: replace_if_present_flag: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: data_coding: 3 = 0x00000003 2010-12-13 23:39:20 [15400] [6] DEBUG: sm_default_msg_id: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: sm_length: 144 = 0x00000090 2010-12-13 23:39:20 [15400] [6] DEBUG: short_message: 2010-12-13 23:39:20 [15400] [6] DEBUG: Octet string at 0x1d28240: 2010-12-13 23:39:20 [15400] [6] DEBUG: len: 144 2010-12-13 23:39:20 [15400] [6] DEBUG: size: 145 2010-12-13 23:39:20 [15400] [6] DEBUG: immutable: 0 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 69 64 3a 31 32 63 65 31 65 33 32 35 65 30 61 63 id:12ce1e325e0ac 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 31 30 33 66 66 66 66 66 66 66 66 62 39 35 37 39 103ffffffffb9579 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 66 31 63 20 73 75 62 3a 30 30 31 20 64 6c 76 72 f1c sub:001 dlvr 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 64 3a 30 30 31 20 73 75 62 6d 69 74 20 64 61 74 d:001 submit dat 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 65 3a 31 30 31 32 31 33 32 33 33 39 20 64 6f 6e e:1012132339 don 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 65 20 64 61 74 65 3a 31 30 31 32 31 33 32 33 33 e date:101213233 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 39 20 73 74 61 74 3a 44 45 4c 49 56 52 44 20 65 9 stat:DELIVRD e 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 72 72 3a 30 30 30 20 74 65 78 74 3a 20 20 20 20 rr:000 text: 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2010-12-13 23:39:20 [15400] [6] DEBUG: Octet string dump ends. 2010-12-13 23:39:20 [15400] [6] DEBUG: message_state: 2 = 0x00000002 2010-12-13 23:39:20 [15400] [6] DEBUG: receipted_message_id: 2010-12-13 23:39:20 [15400] [6] DEBUG: Octet string at 0x1d153a0: 2010-12-13 23:39:20 [15400] [6] DEBUG: len: 32 2010-12-13 23:39:20 [15400] [6] DEBUG: size: 33 2010-12-13 23:39:20 [15400] [6] DEBUG: immutable: 0 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 31 32 63 65 31 65 33 32 35 65 30 61 63 31 30 33 12ce1e325e0ac103 2010-12-13 23:39:20 [15400] [6] DEBUG: data: 66 66 66 66 66 66 66 66 62 39 35 37 39 66 31 63 ffffffffb9579f1c 2010-12-13 23:39:20 [15400] [6] DEBUG: Octet string dump ends. 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP PDU dump ends. 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP[CONN_123] handle_pdu, got DLR 2010-12-13 23:39:20 [15400] [6] DEBUG: DLR[mysql]: Looking for DLR smsc=CONN_123, ts=9223372036854775807, dst=xxxxxxxxxx, type=1 2010-12-13 23:39:20 [15400] [6] DEBUG: sql: SELECT `mask`, `service`, `url`, `source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND `ts`=? LIMIT 1 2010-12-13 23:39:20 [15400] [6] DEBUG: column=mask buffer_type=1 max_length=0 length=2 2010-12-13 23:39:20 [15400] [6] DEBUG: column=service buffer_type=253 max_length=0 length=15 2010-12-13 23:39:20 [15400] [6] DEBUG: column=url buffer_type=253 max_length=0 length=255 2010-12-13 23:39:20 [15400] [6] DEBUG: column=source buffer_type=253 max_length=0 length=5 2010-12-13 23:39:20 [15400] [6] DEBUG: column=destination buffer_type=253 max_length=0 length=40 2010-12-13 23:39:20 [15400] [6] DEBUG: column=boxc buffer_type=253 max_length=0 length=40 2010-12-13 23:39:20 [15400] [6] DEBUG: DLR[mysql]: created DLR message for URL <http://localhost/dlr.php?id=8972625&status=%d> 2010-12-13 23:39:20 [15400] [6] DEBUG: removing DLR from database 2010-12-13 23:39:20 [15400] [6] DEBUG: sql: DELETE FROM `dlr` WHERE `smsc`=? AND `ts`=? LIMIT 1 2010-12-13 23:39:20 [15400] [6] DEBUG: new group created `smpp' 2010-12-13 23:39:20 [15400] [6] DEBUG: group=`smpp' key=`dlr_err' value=`000' 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP[CONN_123]: Sending PDU: 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP PDU 0x1d45ec0 dump: 2010-12-13 23:39:20 [15400] [6] DEBUG: type_name: deliver_sm_resp 2010-12-13 23:39:20 [15400] [6] DEBUG: command_id: 2147483653 = 0x80000005 2010-12-13 23:39:20 [15400] [6] DEBUG: command_status: 0 = 0x00000000 2010-12-13 23:39:20 [15400] [6] DEBUG: sequence_number: 792 = 0x00000318 2010-12-13 23:39:20 [15400] [6] DEBUG: message_id: NULL 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP PDU dump ends. 2010-12-13 23:39:20 [15400] [6] DEBUG: SMPP[CONN_123]: throughput (0.00,5.00) 2010-12-13 23:39:20 [15400] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1> 2010-12-13 23:39:20 [15400] [9] DEBUG: boxc_sender: sent message to <127.0.0.1> 2010-12-13 23:39:20 [15400] [8] DEBUG: boxc_receiver: got ack It will work as long as the DR is received before the next MT is sent. Else I would get a duplicate entry in the dlr-table and DR's will be lost. Any help would be appreciated. Br Gunnar Gilhoff
