SUBSCRIBE/NOTIFY Methods

Overview

The ability to request asynchronous notification of events proves useful in many types of SIP services for which cooperation between  end-nodes is required.  Examples of such services include automatic callback services (based on terminal state events), buddy lists (based on user presence events), message waiting indications (based on mailbox state change events), and PSTN and Internet Interworking (PINT) [2] status (based on call state events).

The general concept is that entities in the network can subscribe to resource or call state for various resources or calls in the network, and those entities (or entities acting on their behalf) can send notifications when those states change.

 

SUBSCRIBE

The SUBSCRIBE method is used to request current state and state updates from a remote node. SUBSCRIBE requests SHOULD contain an "Expires" header. This expires value indicates the duration of the subscription. In order to keep subscriptions effective beyond the duration communicated in the "Expires" header, subscribers need to refresh subscriptions on a periodic basis using a new SUBSCRIBE message on the same dialog. If no "Expires" header is present in a SUBSCRIBE request, the implied default is defined by the event package being used.

 

NOTIFY

NOTIFY messages are sent to inform subscribers of changes in state to which the subscriber has a subscription.  Subscriptions are typically put in place using the SUBSCRIBE method; however, it is possible that other means have been used.

 

 

Call Flow

 A typical flow of messages would be:

 

Subscriber                 Notifier

|-----SUBSCRIBE---->|     Request state subscription

|<-------200---------|     Acknowledge subscription

|<------NOTIFY------|     Return current state information

|---------200------->|

|<------NOTIFY------|     Return current state information

|--------200-------->|

   

 

Subscriptions are expired and must be refreshed by subsequent SUBSCRIBE messages. For more information see 3265 - Session Initiation Protocol (SIP)-Specific Event Notification.