rfc-3680

A Session Initiation Protocol (SIP) Event Package for Registrations

J. Rosenberg
date2004-03 streamIETF arearai wgsipping statusPROPOSED STANDARD pages26 canonicalhttps://www.rfc-editor.org/rfc/rfc3680 doi10.17487/RFC3680 errataview
This document defines a Session Initiation Protocol (SIP) event package for registrations. Through its REGISTER method, SIP allows a user agent to create, modify, and delete registrations. Registrations can also be altered by administrators in order to enforce policy. As a result, these registrations represent a piece of state in the network that can change dynamically. There are many cases where a user agent would like to be notified of changes in this state. This event package defines a mechanism by which those user agents can request and obtain such notifications. [STANDARDS-TRACK]

updated by

Extracted elements (25)

design-rationale §4.9

Forked SUBSCRIBE requests are prohibited for this package because registration state is stored in a single repository, making it readily handled by a single element, so there is no compelling need for a subscription to fork.

sip, realtime

design-rationale §5.1

The contact "id" attribute for same-URI contacts SHOULD (not MUST) be stable across notifications because SIP URI equality is non-transitive, making it impossible for a hash function to strictly satisfy a MUST-level requirement.

sip, realtime

design-rationale §4.4

The default subscription duration is 3761 seconds (slightly longer than the default registration expiration of 3600 seconds) to avoid coupling of subscription and registration refresh cycles.

sip, realtime

normative-requirement §4.7.2 MUST NOT

A notification MUST NOT be sent for the transition from terminated to init in the address-of-record state machine. For other transitions, whether a notification is sent is policy dependent.

sip, realtime

normative-requirement §4.9 MUST NOT

A subscriber MUST NOT create multiple dialogs as a result of a single subscription request, since registration state resides in a single repository and forking provides no benefit.

sip, realtime

normative-requirement §4.5 MUST

All subscribers and notifiers MUST support the "application/reginfo+xml" format for NOTIFY bodies. If no Accept header is present in SUBSCRIBE, the default value is "application/reginfo+xml".

sip, realtime

normative-requirement §5.1 MUST

If the contact event attribute is "shortened", the "expires" attribute MUST be present, containing the seconds remaining until binding expiry. If the event is "probation", the "retry-after" attribute MUST be present with the retry delay in seconds.

sip, realtime

normative-requirement §4.6 RECOMMENDED

It is RECOMMENDED that a user be allowed to subscribe to their own registration state, as this is useful when multiple devices represent a single user.

sip, realtime

normative-requirement §4.10 RECOMMENDED

It is RECOMMENDED that the server not generate notifications for a single subscriber at a rate faster than once every 5 seconds, for congestion control reasons.

sip, realtime

normative-requirement §4.7.2 SHOULD

Notifications SHOULD contain information about contacts which have changed state rather than the full state of all contacts. However, notifications triggered by a fetch operation (SUBSCRIBE with Expires of 0) SHOULD contain full state of all contacts.

sip, realtime

normative-requirement §5.1 MUST

Registration information documents MUST be well-formed XML, SHOULD be valid, MUST be based on XML 1.0, and MUST be encoded using UTF-8. The namespace URI is urn:ietf:params:xml:ns:reginfo.

sip, realtime

normative-requirement §4.6 SHOULD

Subscriptions to registration state SHOULD be authenticated and authorized before approval. Authentication MAY be performed using digest, S/MIME, TLS, or other transport-specific mechanisms.

sip, security, realtime

normative-requirement §5.1 MUST

The "version" attribute in reginfo MUST be representable using a 32-bit integer, starts at 0, and increments by one per document sent to a subscriber within a subscription scope.

sip, realtime

protocol-element §5.2

Subscribers maintain a per-registration table keyed by contact "id". On receiving a full-state document, all tables are flushed and repopulated. On partial state, existing tables are updated with changed contacts; if the version gap is more than 1, the subscriber SHOULD send a refresh request for full state.

sip, realtime

protocol-element §5.1

The "contact" element has required attributes "id" (unique contact identifier), "state" ("active" or "terminated"), and "event" (registered, created, refreshed, shortened, expired, deactivated, probation, unregistered, or rejected). Optional attributes include "expires", "retry-after", "duration-registered", "q", "callid", and "cseq".

sip, realtime

protocol-element §4.1

The event package name for SIP registration subscriptions is "reg". This value appears in the Event header of SUBSCRIBE and NOTIFY requests.

sip, realtime

protocol-element §5.1

The reginfo XML document has a root "reginfo" element with required "version" (32-bit non-negative integer, incremented per document per subscription) and "state" ("full" or "partial") attributes, and contains zero or more "registration" sub-elements.

sip, realtime, json

protocol-element §5.1

The "registration" element has required attributes: "aor" (the address-of-record URI), "id" (unique identifier stable across notifications within a subscription), and "state" ("init", "active", or "terminated"). Registration state for a single AOR MUST be in a single "registration" element.

sip, realtime

registry §8.2

This document registers the MIME type "application/reginfo+xml" for the registration information XML document format.

sip, registry, realtime

registry §8.1

This document registers the SIP event package named "reg" in the SIP Event Package registry, as defined in RFC 3265.

sip, registry, realtime

registry §8.3

This document registers the XML namespace urn:ietf:params:xml:ns:reginfo in the IETF XML Registry per BCP 81 (RFC 3688).

sip, registry, realtime

security-consideration §7

Registration information is sensitive and potentially private. Subscriptions SHOULD be authenticated and authorized per local policy. Notifications SHOULD be sent with confidentiality, message integrity, and subscriber identity verification, e.g., using SIPS URLs or S/MIME-protected bodies.

sip, security, privacy, realtime

state-machine §4.7.1

The address-of-record registration state machine has three states: init (no contacts registered), active (at least one contact bound), and terminated (last contact removed). The transition from terminated back to init MUST NOT ever be reported to a subscriber in a NOTIFY.

sip, realtime

state-machine §4.7.1

The per-contact state machine transitions from init to active via "registered" or "created" events, remains active on "refreshed" or "shortened" events, and moves to terminated via "expired", "deactivated", "probation", "unregistered", or "rejected" events.

sip, realtime

wire-format §5.4

The application/reginfo+xml MIME type is an XML document conforming to the XML schema defined in Section 5.4, with namespace urn:ietf:params:xml:ns:reginfo. File extensions are .rif or .xml.

sip, realtime