[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Correlating SMS sent with Delivery Reports
From: |
Gary Reuter |
Subject: |
Correlating SMS sent with Delivery Reports |
Date: |
Fri, 24 Sep 2004 21:30:26 -0000 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20040913) |
Hi,
Some of you may remember me from a few years ago... well, I'm back! :-)
(FYI, I'm using a Nokia 6190, which is the nk6100 protocol)
I'm in the process of improving 'smsd' to make it a more robust SMS
server, and for me an essential part of that is being able to correlate
sent SMS with the Delivery Report.
If I use NDS3 and the virtual modem under Windows, the AT+CMGS to send a
message, it replies with a reference number. The next message sent will
reply with the same number +1.
When using gnokii/smsd, the reference number is returned in same frame
that confirms the message was sent (in message[5]).
The delivery report has the reference number just before the
report_status, in message[21].
The reference number starts at 1 and it looks like it will 'rollover'
when it gets to 255 (0x01 -> 0xFF), although I haven't sent that many
messages yet...
It's easy enough to add a couple lines in the nk6100.c to set the
raw_sms->reference to the proper value, but my problem is the gn_sms
structure has no place to keep this value. As well, some lowlevel
functions clear the rawsms from the gn_data so it's unuseable from the
higher-level functions.
So, which is the better solution:
1) adding a 'reference' value to the gn_sms structure.
OR
2) removing code that clears the raw_sms info.
For the second option, I mean removing lines like those below (taken
from gsm-sms.c) so the raw_sms is still available as part of gn_data.
1298,1299c1304,1305
< free(data->raw_sms);
< data->raw_sms = NULL;
- Correlating SMS sent with Delivery Reports,
Gary Reuter <=