Share via


addContact 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.

Adds a user to the caller's contact list.

Syntax

<addContact rid="string value"/>

Attributes

Attribute

Data Type

Description

rid

String

Request Id. This is a string value assigned by the Unified Communications client. This is a required attribute.

Element Information

Parent Element

Element

Description

cwaRequests

Contains one or more methods that a Unified Communications AJAX API Client sends to a Communicator Web Access server.

Child Elements

Element

Occurrences

Description

contact

1

The name, uri, subscription status and tag status of a contact.

Remarks

This request allows the Unified Communications AJAX API Client application to add a user to their contact list. The contact attribute values must be filled when adding the contact. Failure to do so results in a synchronous requestFailed response from the Communicator Web Access server.

Note

Adding multiple contact elements to the addContact request results in a synchronous requestAccepted response as the XML request is technically well-formed. Because the Communicator Web Access server is not enforcing adherence to an XML schema in this release, the additional contact elements do not cause the request to be rejected. Only the first contact element is processed. The rest are ignored. To add multiple contacts, multiple addContact requests must be made.

Along with the requestAccepted response received synchronously on the command channel, the Unified Communications AJAX API Client application receives a contactGroup event. A userPresence event is received asynchronously on the data channel if the subscribed attribute of addContact is set to true.

The Office Communicator Service infrastructure allows you to specify any well-formed SIP URI for a contact to add. You might not receive presence information for the SIP URI you specified because it might not currently exist or exist only in the Public Cloud.

Note

If Office Communicator UI is the primary client that your local clients use to interact with their contact list, this request message must specify at least one contact group to successfully create a contact. In this case, the groups attribute of the contact element is required by Office Communicator server. When a user has not created any contact groups, the groups attribute must specify a group with the id "1".

Examples

<addContact rid="11">
   <contact uri="sip:jessicaa@contoso.com" name="Jessica Arnold" subscribed="true"
   tag="true" groups="2 10"/>
</addContact>

See Also

Concepts

updateContact Element

deleteContact Element