Icon Storage

This demonstrates how to store and retrieve user icons that can be displayed in a buddy list of a Presence enabled SIP User Agent by using the OMA oma_status-icon specification.

/images/XCAP-icon-new.png

Usage Scenario

This is a typical Presence scenario where one user subscribes to the Presence information of another user. One user sets his icon by capturing an image or selecting a picture on his local computer. Then his image can be made known to all subscribers that have subscribed for the presence event package.

SIP Publisher

  1. SIP User A uploads the Icon to the XCAP server
  2. SIP User A publishes a PIDF with CIPID extension and sets the HTTP URL for the icon

SIP Subscriber

  1. SIP user B subscribes to SIP user A
  2. SIP user B receives a NOTIFY with PIDF update from SIP User A
  3. SIP User B fetches icon of SIP User A by using HTTP GET

Example

You can test the above scenario by using xcap-icon and xcap-directory scripts provided with the SIP SIMPLE client SDK.

PUT an Icon

adigeo@ag-imac3:~$xcap-icon -f CIMG4463-73.png PUT
Icon uploaded successfully
201 Created <https://xcap.sipthor.net/xcap-root/oma_status-icon/users/sip:31208005169@ag-projects.com/UsRfcDxIAMgGYj8zuXOH.png>
content-length: 0
server: OpenXCAP/1.2.0
connection: close
etag: "40a3d13d13e17fb5273c29173dbfbea2"
date: Mon, 26 Apr 2010 13:54:42 GMT
content-type: application/vnd.oma.pres-content+xml

The icon can be retrieved by any HTTP client from:

https://xcap.sipthor.net/xcap-root/oma_status-icon/users/sip:31208005169@ag-projects.com/UsRfcDxIAMgGYj8zuXOH.png

List Available Icons

adigeo@ag-imac3:~$xcap-directory
Retrieving xcap-directory from https://xcap.sipthor.net/xcap-root/
Folder 'dialog-rules':
    index etag: da7fa279da3f4945040ea1491185db13
Folder 'rls-services':
    index etag: 5dc035d6782cb9873969d494c744c26e
Folder 'resource-lists':
    index.xml etag: 2b80b0c517548ef93c3b533a424ecfaf
    resource-list.xml etag: d1cca4d66a35b58cc67602406742b337
    buddies-resource-list.xml etag: 91f2a762b66c2edfcbfe2d52520a3f12
Folder 'test-app':
    index.xml etag: 6e1c86d91073507502b3970c502af91b
Folder 'oma_status-icon':
    UsRfcDxIAMgGYj8zuXOH.png etag: 40a3d13d13e17fb5273c29173dbfbea2
Folder 'pres-rules':
    index.xml etag: cab6d17285885ce2bd2655f4f0856265

Delete an Icon

adigeo@ag-imac3:~$xcap-icon -f SoA0lBF6a1wWJjCx3UmV.png DELETE
200 OK <https://xcap.sipthor.net/xcap-root/oma_status-icon/users/sip:31208005169@ag-projects.com/SoA0lBF6a1wWJjCx3UmV.png>
date: Mon, 26 Apr 2010 13:54:17 GMT
content-length: 0
content-type: application/vnd.oma.pres-content+xml
connection: close
server: OpenXCAP/1.2.0