Format of SSI item   

     SSI service allow you to store various information on the server. Server-side information is stored as a list of items. Here is common structure of item:

 xx xx   word   Length of the item name
 xx ..   string   Item name string
 xx xx   word   Group ID#
 xx xx   word   Item ID#
 xx xx   word   Type of item flag (see list bellow)
 xx xx   word   Length of the additional data
 xx xx   word   TLV.Type (TLV #1)
 xx xx   word   TLV.Length
 .. ..   xxxx   TLV.Value
 ....   ....   ....
 xx xx   word   TLV.Type (TLV #n)
 xx xx   word   TLV.Length
 .. ..   xxxx   TLV.Value

     About name of the item. It can be icq uin, aim screenname, group name or special id. SSI contains a "master group" which contains all other groups. Master group has a group ID# of 0x0000. All groups have item ID# of 0x0000. You can't have groups or items with same group/item ID#.

     Every item can have additional data stored as tlv chain. For example group item can store its buddy ID numbers in TLV(0x00C8). Buddy item may contain buddy comment in TLV(0x013C) or/and SMS number in TLV(0x013A) or/and alerts settings in TLV(0x013D). You can't add buddy that requires authorization without permission. You can add it only with TLV(0x0066) as a buddy record awaiting authorization.

     Each item has a type. It can be buddy record, group record, permit record, presence permissions or something other. Each item type have its limitations and you can request them via SNAC(13,02). Here is the list of known item types:

  0x0000   Buddy record (name: uin for ICQ and screenname for AIM)
  0x0001   Group record
  0x0002   Permit record ("Allow" list in AIM, and "Visible" list in ICQ)
  0x0003   Deny record ("Block" list in AIM, and "Invisible" list in ICQ)
  0x0004   Permit/deny settings or/and bitmask of the AIM classes
  0x0005   Presence info (if others can see your idle status, etc)
  0x0009   Unknown. ICQ2k shortcut bar items ?
  0x000E   Ignore list record.
  0x000F   Last update date (name: "LastUpdateDate").
  0x0010   Non-ICQ contact (to send SMS). Name: 1#EXT, 2#EXT, etc
  0x0013   Item that contain roster import time (name: "Import time")
  0x0014   Own icon (avatar) info. Name is an avatar id number as text

     Here is the list of known TLVs in additional data blob (itype - item type that may have this tlv in its data blob):

     [TLV(0x0066), itype 0x00, size 00] - Signifies that you are awaiting authorization for this buddy. The client is in charge of putting this TLV, but you will not receiving status updates for the contact until they authorize you, regardless if this is here or not. Meaning, this is only here to tell your client that you are waiting for authorization for the person. This TLV is always empty.

     [TLV(0x00C8), itype 0x01, size XX] - If group is the master group, this contains the group ID#s of all groups in the list. If the group is a normal group, this contains the buddy ID#s of all buddies in the group. Each ID# is 2 bytes. If there are no groups in the list (if in the master group), or no buddies in the group (if in a normal group), then this TLV is not present.

     [TLV(0x00C9), itype 0x05, size 04] - Unknown (contain 0x0000006f when others could not see idle time, contain 0x0000046f when others could see idle time).

     [TLV(0x00CA), itype 0x04, size 01] - This is the byte that tells the AIM servers your privacy setting. If 1, then allow all users to see you. If 2, then block all users from seeing you. If 3, then allow only the users in the permit list. If 4, then block only the users in the deny list. If 5, then allow only users on your buddy list.

     [TLV(0x00CB), itype 0x04, size 04] - This is a bit mask which tells the AIM servers which class of users you want to be visible to. If 0xffffffff, then all users can see you. If 0x00000004, then AIM users can not see you. See known user classes here.

     [TLV(0x00CC), itype 0x04, size 04] - Bitmask of flags containing "Allow others to see..." options. The default is 0x00000000. The flags are the following, logically ORed together:
  • 0x00000002 - Do not allow others to see that I am using a wireless device
  • 0x00000400 - Allow others to see my idle time
  • 0x00400000 - Allow others to see that I am typing a response
     [TLV(0x00CD), itype 0x09, size XX] - This item type (9) looks like ICQ2k shortcut list. Examples: "2672,0,2,1" and "3097,0,0,0"

     [TLV(0x00D4), itype 0x13, size 04] - TLV for import time item (type 0x0013). Contains timestamp in unix_t format (seconds since 1.1.1970) when the buddylist has been first time uploaded to the server

     [TLV(0x00D5), itype 0x14, size XX] - TLV for buddy icon info (type 0x0014). Contains the icon flags (1 byte), md5 hash size (1 byte) and md5 hash of the you are using (allways 16 bytes).

     [TLV(0x0131), itype 0x00, size XX] - This stores the name that the contact should show up as in the contact list. It should initially be set to the contact's nick name, and can be changed to anything by the client.

     [TLV(0x0137), itype 0x00, size XX] - Your buddy locally assigned mail address.

     [TLV(0x013A), itype 0x00, size XX] - Your buddy locally assigned SMS number.

     [TLV(0x013C), itype 0x00, size XX] - This stores the "buddy comment" field. The max length winaim lets you use is 0x0054. I'm not sure if that is a true limit or not.

     [TLV(0x013D), itype 0x00, size 02] - Personal alerts for this buddy.
First byte:
  • 0x01 - Pop up window notification
  • 0x02 - Play sound (sound file specified in 0x013e TLV)
Second byte:
  • 0x01 - When contact comes online
  • 0x02 - When contact becomes unidle
  • 0x04 - When contact returns from away
     [TLV(0x013E), itype 0x00, size XX] - Sound client should play as alert for this buddy.

     [TLV(0x0145), itype 0x00, size XX] - Date/time (unix time() format) when you send message to this you first time. Actually I noticed that ICQLite adds this TLV then you first open message dialog at this user. Also I've seen this tlv in LastUpdateDate item.


SSI item examples:
  Buddy item ('6218897', gid=0x0A1E, iid=0x4318, nick='FunBoo')
  00 07 36 32 31 38 38 39  37 0A 1E 43 18 00 00 00  ..6218897..C....
  0A 01 31 00 06 46 75 6E  42 6F 6F                 ..1..FunBoo

  Group item ('General', gid=0x1DCA, iid=0, contain iid=0x1f11)
  00 07 47 65 6e 65 72 61  6c 1d ca 00 00 00 01 00  ..General.......
  06 00 c8 00 02 1f 11                              ....... 

  System item ('LastUpdateDate', gid=0, iid=0x69D9, type=0x0f)
  00 0e 4c 61 73 74 55 70  64 61 74 65 44 61 74 65  ..LastUpdateDate
  00 00 69 d9 00 0f 00 08  01 45 00 04 41 e2 e4 e8  ..i......E..A...

  Own icon hash ('1', gid=0, iid=0x1813, type=0x14, +tlv(0x00D5))
  00 01 31 00 00 18 13 00  14 00 1A 00 D5 00 12 01  ..1.............
  10 FC 23 B3 F7 C8 00 D3  92 EF 5E 06 8A D3 66 7F  ..#.......^...f.
  C7 01 31 00 00                                    ..1..

  Non-icq contact ('1#EXT', gid=0, iid=0x2BD6, type=0x10)
  00 05 31 23 45 58 54 00  00 2b d6 00 10 00 20 01  ..1#EXT..+.... .
  31 00 08 41 6c 65 78 61  6e 64 72 01 3a 00 10 2b  1..Alexandr.:..+
  37 20 28 39 30 32 29 20  35 34 32 32 39 39 33     7 (902) 5422993

  Main | Basic | Login | Snaclist | Sequences | Misc | Changes | Credits | Terms