Share via


contact Element

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The contact that belongs in the users contact list.

Syntax

<contact uri="SIP Uri formatted string value" name="string value" subscribed="true"|"false" tag="true"|"false"/> 

Attributes

Attribute

Data Type

Description

Action

String

This optional attribute is present when the contact element is present as a child of contactGroup. The attribute is a verb representing the action performed on the contact. The possible values are added | updated | deleted

Uri

Xs:AnyUri

The URI of the contact. This attribute is required.

Name

String

The name of the contact. This element is required when adding a contact using the addContact or updateContact element.

Subscribed

Boolean

Determines whether the Communicator Web Access Server creates a permanent subscription to this contact's presence.

Tag

Boolean

Indicates whether this contact was tagged to receive alert notifications. This element is required when adding a contact using the addContact or updateContact element.

Groups

xs:list (integers)

Space-separated list of GroupId values to which this contact belongs.

Element Information

Parent Element

Element

Description

contactGroup

Describes the operations performed on a list of contacts or contact groups. This element is returned as an event.

addContact

Makes an addContact request.

updateContact

Makes an updateContact request.

Remarks

The contact element is sent as part of a request to add or update a contact. contact is returned as part of a contactGroup in the asynchronous reply to initiateSession. The contactGroup element contains the contacts needed to initially load a contact list for display in a client.

The tagattribute is an informational flag set by the client application. Best Practice is that when a presence event occurs from the tagged user, your application emphasizes the "tagged" user. This emphasis can take any form. For example, you might change the font color of the tagged user in your displayed contact list.

The subscribed attribute indicates that the Communicator Web Access Server is to create a subscription for the newly added contact. If the attribute is set to false, the client must manually subscribe or query the presence of the new contact. This is done in situations where SIP traffic must be minimized. For example, a mobile device client might not subscribe to presence. Instead, a query on a remote user presence is made at the time the mobile device user wants to initiate an IM with the remote user. Setting the attribute value to true causes the server to create a subscription to the contact each time the local user initiates a session. The subscription is essentially permanent. A permanent subscription can be cancelled by issuing an updateContact request, setting the subscribed attribute of the contact to false. The value of subscribed is set to false if not specified. Contact list members can be auto-subscribed by setting the autoSubscribePresenceForContacts attribute to true in the options element of an initiateSession request.

Examples

In this example, the added contact is also auto-subscribed and tagged for an event to be triggered when the contact user presence information changes.

<contact uri="sip:alice@contoso.com" name="alice" subscribed="true" tag="true" />

See Also

Concepts

addContact Element

updateContact Element

initiateSession Element