Hi Arnar,
Have a look at the msg-id-type option in the user guide under SMPP,
it is for this exact issue :-)
Regards
Ben
On 12 Jul 2007, at 15:35, Arnar Gestsson wrote:
Hi guys,
I've been dealing with an SMSC using SMPP protocol. What happens
is that Kannel is not able to correlate the DR with the submitted
SMS. It's because the Comverse SMSC sets the timestamp in hex
format when the submit is done but when the delivery report is sent
it comes as a decimal string possibly with zero padding, i.e.
submit_sm phase:
Adding DLR smsc=smppconn, ts=13bc6b1, src=yyyyy, dst=xxxx,
mask=19, boxc=KANNELSMSC
dlr phase:
Looking for DLR smsc=smppconn, ts=0020694705, dst=xxxx, type=1
and subsequently it states that it doesn't find the message
associated with the id!! I've in a quick and dirty manner fixed
this by using mysql as a dlr storage so the select and the delete
from dlr are now like this
sql = octstr_format("SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE %
s='%s' AND (%s='%s' or %s=conv('%s', 10,16));",
octstr_get_cstr(fields->field_mask),
octstr_get_cstr(fields->field_serv),
octstr_get_cstr(fields->field_url),
octstr_get_cstr(fields->field_src),
octstr_get_cstr(fields->field_dst),
octstr_get_cstr(fields->field_boxc),
octstr_get_cstr(fields->table),
octstr_get_cstr(fields->field_smsc),
octstr_get_cstr(smsc), octstr_get_cstr
(fields->field_ts), octstr_get_cstr(ts),
octstr_get_cstr(fields->field_ts),
octstr_get_cstr(ts));
sql = octstr_format("DELETE FROM %s WHERE %s='%s' AND (%s='%s' or %
s=conv('%s',10,16)) LIMIT 1;",
octstr_get_cstr(fields->table),
octstr_get_cstr(fields->field_smsc),
octstr_get_cstr(smsc), octstr_get_cstr
(fields->field_ts), octstr_get_cstr(ts),
octstr_get_cstr(fields->field_ts),
octstr_get_cstr(ts));
This is as stated quick and dirty but solves my problem right now.
What I would like to know is if others are stumbling into the same
problem and also if some sort of more elegant solution shouldn't be
included into kannel, possibly with configuration directive, thus
instead of or-ing use conv only when needed.
BR. Arnar
Arnar Gestsson
Amivox ehf.
aeBeat: arnargestsson
Phone: +4520617605
Email: [EMAIL PROTECTED]
------------------------------
Non-intrusive voice messaging