Am 07.04.2016 10:21, schrieb Arif Noor:
Hi Elton,
Please find below for the logs.
1435309:2016-04-01 17:20:51 [2353] [6] DEBUG: Optional parameter tag
(0x0501)
1435310:2016-04-01 17:20:51 [2353] [6] DEBUG: Optional parameter length
read as 1
1435311:2016-04-01 17:20:51 [2353] [6] DEBUG: Found configured optional
parameter `ussd_srv_op'
1435312:2016-04-01 17:20:51 [2353] [6] DEBUG: Optional parameter tag
(0x4006)
1435313:2016-04-01 17:20:51 [2353] [6] DEBUG: Optional parameter length
read as 2
1435314:2016-04-01 17:20:51 [2353] [6] DEBUG: Found configured optional
parameter `ussd_hlr'
1435315:2016-04-01 17:20:51 [2353] [6] DEBUG: Optional parameter tag
(0x400c)
1435316:2016-04-01 17:20:51 [2353] [6] DEBUG: Optional parameter length
read as 16
1435317:2016-04-01 17:20:51 [2353] [6] DEBUG: Found configured optional
parameter `ussd_optional'
1435318:2016-04-01 17:20:51 [2353] [6] DEBUG: SMPP[smppUSSD]: Got PDU:
1435319:2016-04-01 17:20:51 [2353] [6] DEBUG: SMPP PDU 0x7f41bc01c660 dump:
1435320:2016-04-01 17:20:51 [2353] [6] DEBUG: type_name: deliver_sm
1435321:2016-04-01 17:20:51 [2353] [6] DEBUG: command_id: 5 = 0x00000005
1435322:2016-04-01 17:20:51 [2353] [6] DEBUG: command_status: 0 = 0x00000000
1435323:2016-04-01 17:20:51 [2353] [6] DEBUG: sequence_number: 102277 =
0x00018f85
1435324:2016-04-01 17:20:51 [2353] [6] DEBUG: service_type: "USSD"
1435325:2016-04-01 17:20:51 [2353] [6] DEBUG: source_addr_ton: 1 =
0x00000001
1435326:2016-04-01 17:20:51 [2353] [6] DEBUG: source_addr_npi: 1 =
0x00000001
1435327:2016-04-01 17:20:51 [2353] [6] DEBUG: source_addr: "60xxxxxxxx"
1435328:2016-04-01 17:20:51 [2353] [6] DEBUG: dest_addr_ton: 0 = 0x00000000
1435329:2016-04-01 17:20:51 [2353] [6] DEBUG: dest_addr_npi: 0 = 0x00000000
1435330:2016-04-01 17:20:51 [2353] [6] DEBUG: destination_addr: NULL
1435331:2016-04-01 17:20:51 [2353] [6] DEBUG: esm_class: 0 = 0x00000000
1435332:2016-04-01 17:20:51 [2353] [6] DEBUG: protocol_id: 0 = 0x00000000
1435333:2016-04-01 17:20:51 [2353] [6] DEBUG: priority_flag: 0 = 0x00000000
1435334:2016-04-01 17:20:51 [2353] [6] DEBUG: schedule_delivery_time: NULL
1435335:2016-04-01 17:20:51 [2353] [6] DEBUG: validity_period: NULL
1435336:2016-04-01 17:20:51 [2353] [6] DEBUG: registered_delivery: 0 =
0x00000000
1435337:2016-04-01 17:20:51 [2353] [6] DEBUG: replace_if_present_flag: 0
= 0x00000000
1435338:2016-04-01 17:20:51 [2353] [6] DEBUG: data_coding: 15 = 0x0000000f
1435339:2016-04-01 17:20:51 [2353] [6] DEBUG: sm_default_msg_id: 0 =
0x00000000
1435340:2016-04-01 17:20:51 [2353] [6] DEBUG: sm_length: 1 = 0x00000001
1435341:2016-04-01 17:20:51 [2353] [6] DEBUG: short_message: "1"
1435342:2016-04-01 17:20:51 [2353] [6] DEBUG: ussd_service_op:
1435343:2016-04-01 17:20:51 [2353] [6] DEBUG: Octet string at
0x7f41bc01d010:
1435344:2016-04-01 17:20:51 [2353] [6] DEBUG: len: 1
1435345:2016-04-01 17:20:51 [2353] [6] DEBUG: size: 2
1435346:2016-04-01 17:20:51 [2353] [6] DEBUG: immutable: 0
1435347:2016-04-01 17:20:51 [2353] [6] DEBUG: data: 12 .
1435348:2016-04-01 17:20:51 [2353] [6] DEBUG: Octet string dump ends.
1435349:2016-04-01 17:20:51 [2353] [6] DEBUG: ussd_hlr: "60"
1435350:2016-04-01 17:20:51 [2353] [6] DEBUG: ussd_optional:
"0010015156FE3D42"
1435351:2016-04-01 17:20:51 [2353] [6] DEBUG: ussd_srv_op:
1435352:2016-04-01 17:20:51 [2353] [6] DEBUG: Octet string at
0x7f41bc00d440:
1435353:2016-04-01 17:20:51 [2353] [6] DEBUG: len: 1
1435354:2016-04-01 17:20:51 [2353] [6] DEBUG: size: 2
1435355:2016-04-01 17:20:51 [2353] [6] DEBUG: immutable: 0
1435356:2016-04-01 17:20:51 [2353] [6] DEBUG: data: 12 .
1435357:2016-04-01 17:20:51 [2353] [6] DEBUG: Octet string dump ends.
1435358:2016-04-01 17:20:51 [2353] [6] DEBUG: SMPP PDU dump ends.
1435359:2016-04-01 17:20:51 [2353] [6] ERROR: SMPP[smppUSSD]: Malformed
destination_addr `(null)', may not be empty. Discarding MO message.
Hi Arif,
Kannel bearebox does refuse the MO (deliver_sm PDU) with an empty (NULL)
destination_addr. The source code part is this:
/*
* Follows SMPP spec. v3.4. issue 1.2
* it's not allowed to have destination_addr NULL
*/
if (pdu->u.deliver_sm.destination_addr == NULL) {
error(0, "SMPP[%s]: Malformed destination_addr `%s', may not be
empty. "
"Discarding MO message.", octstr_get_cstr(smpp->conn->id),
octstr_get_cstr(pdu->u.deliver_sm.destination_addr));
*reason = SMPP_ESME_RINVDSTADR;
goto error;
}
touch, reviewing the SMPP spec again in detail, I don't find any LITERAL
reference that a NULL'ed destination_addr is not allowed. The only thing
I see is this section:
Section 4.4.1.1 (page 66):
An ESME Transmitter may enter NULL values in the ‘source address’
fields. In this event, the SMSC may then substitute a default address
for that particular ESME. This feature is designed for interfaces that
are not normally familiar with the notion of a source address for a
short message, e.g., paging systems, voice mail system.
But this doesn't imply that a destination_addr MAY NOT be NULL.
I'll prepare a simple patch that let's you resolve the issue.
Can you please share the specification documents for the USSD gateway
(how the TLVs are defined, etc) in a private email to me.
We'll go ahead and make sure we can handle the vendor cleanly.
Stipe
--
Best Regards,
Stipe Tolj
-------------------------------------------------------------------
Düsseldorf, NRW, Germany
Kannel Foundation tolj.org system architecture
http://www.kannel.org/ http://www.tolj.org/
stolj at kannel.org st at tolj.org
-------------------------------------------------------------------