Discussion:
[BitPim-devel] Proposed SMS design schema
d***@netzero.com
2005-03-14 21:25:36 UTC
Permalink
I'm thinking of adding an SMS Tab to BitPim, and this is what I came up so far:

SMS Item Dict:

from: string (email addr or phone #)
to: string (email addr or phone #)
subject: string
text: string
datetime: 'YYYYMMDDThhmmss'
callback: string (callback phone #)

SMS Items will be organized into 3 areas:
Inbox (g)et from phone
Sent (g)
Draft (g/s)

The SMS items would be ordered and listed as 'datetime+subject'.
Phone# and email address lookup from BitPim phonebook would be done when possible.

Additionally, there'd be a fourth area displaying and allowing users to maintain the phone's "canned phrases".

As always, comments and suggestions are welcome.

-Joe Pham


______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-03-15 08:08:32 UTC
Permalink
Post by d***@netzero.com
Inbox (g)et from phone
Sent (g)
Draft (g/s)
Add 'folder' as a field for item. The gui display can then show them
in the right place (somewhat similar to origins with images/ringtones).

There should also be a flags key. One flag from my phone is 'locked'
which means that the message won't be deleted even when you choose
'erase all'.

I would like my SMS synced with IMAP folders and no doubt others would
want the same with Outlook. This means deriving a messageid from the
message.

We should also have a log somewhere of what messages we have seen before
so that we don't keep syncing the same ones (eg if user deletes message
in Outlook, we don't want to put it back again when reading from phone).

The simplest way is using the database since that keeps track of
everything even when you delete an item.

My VX4400 uses the SMS PDU format. Other phones appear to use a
converted version of PDU without all the 7 bit nonsense.

http://www.dreamfabric.com/sms/

Roger
d***@netzero.com
2005-03-15 13:51:57 UTC
Permalink
SMS Item dict:

from: string (email addr or phone #)
to: string (email addr or phone #)
subject: string
text: string
datetime: "YYYYMMDDThhmmss"
callback: string (optional callback phone #)
folder: string (where this item belongs: inbox, sent, draft, etc)
flags: [{'locked': True/<False|None>}]
msg_id: unique message id (hexstring sha encoded (ESN+folder+datetime))
Post by Roger Binns
We should also have a log somewhere of what messages we have seen
before so that we don't keep syncing the same ones (eg if user deletes
message in Outlook, we don't want to put it back again when reading
from phone).
The simplest way is using the database since that keeps track of
everything even when you delete an item.
Agreed. This would be done as part of retrieving SMS data from the phone and syncing them with other data source.

-Joe Pham


______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-03-16 17:30:23 UTC
Permalink
Post by d***@netzero.com
msg_id: unique message id (hexstring sha encoded (ESN+folder+datetime))
One thing to consider is what if I have two phones(*) and read from
one and then write to another. Is it the same message or a different
one?

When placing the message into an IMAP folder, I would want to replace
the numbers with email addresses (eg a from of 1234567890 becomes a
from of ***@vtext.com)

Messages should be immutable. I'd be inclined to sha only the timestamp
and the message content itself. Even that gets a little tricky as some
times the same message is in muliple messages. Eg if someone sends
you a message from a BlackBerry, the BB will split it into multiple
messages 160 characters long. I don't know if it is apparent to
anyone except a human that it is all one long message.

Has anyone found a reliable automated way to work out what carrier
a number is on? As a fallback we can use @teleflip.com

Roger
d***@netzero.com
2005-03-16 01:38:13 UTC
Permalink
Should users be able edit incoming SMS messages?

-Joe Pham



______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-03-16 17:24:22 UTC
Permalink
Post by d***@netzero.com
Should users be able edit incoming SMS messages?
Take the same approach as IMAP. You can make a copy that you
change, but the original is immutable.

Roger
d***@netzero.com
2005-03-17 00:43:34 UTC
Permalink
Post by Roger Binns
One thing to consider is what if I have two phones(*) and read from
one and then write to another. Is it the same message or a different
one?
That'd be 2 messages in this schema.
Post by Roger Binns
I'd be inclined to sha only the timestamp and the message content
itself
Are you suggesting sha.new(cotents+timestamp).hexdigest()? That'd eliminate individual phones as unique factors, but that'd be ok with me.
Post by Roger Binns
When placing the message into an IMAP folder
Is this one of the predefined folders, or are these folders being generated dynamically based on the values of the 'folder' attribute?
Post by Roger Binns
I would want to replace the numbers with email addresses (eg a from
Has anyone found a reliable automated way to work out what carrier
Not sure what you meant by that, can you elaborate?

-Joe Pham



______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-03-17 07:48:34 UTC
Permalink
Post by d***@netzero.com
Post by Roger Binns
One thing to consider is what if I have two phones(*) and read from
one and then write to another. Is it the same message or a different
one?
That'd be 2 messages in this schema.
Yes. We need to consider if we want this to be 2 seperate messages.
Think of syncing. If the message becomes different when going from
phone A to phone B then syncing B back to A will cause it to be seen
as new on A and the message will keep respawning.

That is why I am suggesting we treat it as the same message, and
have it remain the same message even if dumped in Outlook or IMAP
and read back.

That then has implications on how we calculate the message id ...
Post by d***@netzero.com
Post by Roger Binns
I'd be inclined to sha only the timestamp and the message content
itself
Are you suggesting sha.new(cotents+timestamp).hexdigest()? That'd
eliminate individual phones as unique factors, but that'd be ok with me.
The sha should reflect how unique we want the message id to be.
Post by d***@netzero.com
Post by Roger Binns
When placing the message into an IMAP folder
Is this one of the predefined folders, or are these folders being
generated dynamically based on the values of the 'folder' attribute?
I'd probably have some mapping that Inbox on the phone maps to a
particular IMAP folder, and Outbox on the phone maps to a different
IMAP folder. Something similar would be appropriate for Outlook/
Evolution etc.
Post by d***@netzero.com
Post by Roger Binns
I would want to replace the numbers with email addresses (eg a from
to be appended to the numbers?)
As part of the export to IMAP (and probably Outlook), the exporter
should turn numbers into valid email addresses and do the reverse
on import. The idea is that hitting 'reply' in your mail client
should just work.
Post by d***@netzero.com
Post by Roger Binns
Has anyone found a reliable automated way to work out what carrier
Not sure what you meant by that, can you elaborate?
If we know that 212 555 1234 is VZW, then it can be converted to an
email address by appending @vtext.com. There are similar rules
for the other carriers. But we need to know the carrier first.

teleflip.com have a service where you can email ***@teleflip.com
and they forward to the correct carrier. They fund things by appending
adverts to the messages, but it is better than nothing and they don't
truncate the messages.

Roger
d***@netzero.com
2005-03-17 13:29:04 UTC
Permalink
Post by Roger Binns
That is why I am suggesting we treat it as the same message
If that's the case, the only viable solution for message ID would be to sha the message contents, given the assumption that the messages are immutable.
Post by Roger Binns
I'd probably have some mapping that Inbox on the phone maps to a
particular IMAP folder, and Outbox on the phone maps to a different
IMAP folder. Something similar would be appropriate for Outlook/
Evolution etc.
Part of Import/Export process, I'd assume.
You were right. We should just default to that 'till we find a more reliable scheme.

I think I have enough to go forward with the GUI. Import/Export would be the next step.

-Joe Pham



______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-03-17 16:09:24 UTC
Permalink
Post by d***@netzero.com
Post by Roger Binns
That is why I am suggesting we treat it as the same message
If that's the case, the only viable solution for message ID would be to sha the
message contents, given the assumption that the messages are immutable.
The time can also be used.

Roger
d***@netzero.com
2005-03-17 17:24:13 UTC
Permalink
Post by Roger Binns
The time can also be used.
In the particular example that you gave, getting messages from phone A to phone B and back, depending on the phone models, the message date/time stamps may change.

-Joe Pham


______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-03-17 18:08:54 UTC
Permalink
Post by d***@netzero.com
In the particular example that you gave, getting messages from phone
A to phone B and back, depending on the phone models, the message
date/time stamps may change.
The timestamp is a property within the SMS and all phones show it.
Outlook/IMAP etc also have settable timestamps, and a message id
field.

It would have to be a very defective phone indeed that didn't have
a way of storing the timestamp.

Roger

Loading...