IMS

 

 

 

 

SIP Header : Expire

 

Simply put, the Expire header indicate the duration in which a message/session remain valid, but the detailed meaning varies a little bit depending on each message and situation. The official definition of Expire header is described as follows in RFC 3261 20.19.

 

The Expires header field gives the relative time after which the message (or content) expires. The precise meaning of this is method dependent.

The expiration time in an INVITE does not affect the duration of the actual session that may result from the invitation.  Session description protocols may offer the ability to express time limits on the session duration, however.

The value of this field is an integral number of seconds (in decimal) between 0 and (2**32)-1, measured from the receipt of the request

 

 

Meaning of Expires 0

 

The meaning of Expires header is pretty straightfoward when the value is not Zero. But when the value is zero, the meaning changes widely.

 

< Expires 0 in REGISTER >

 

If expires header is set to be Zero in REGISTER message, it means 'DeREGISTER'. Refer to following specifications.

 

34.229-1 8.3 Mobile Initiated Deregistration - 8.3.2 Conformance requirement

....

On sending a REGISTER request that will remove the binding between the public user identity and one of its contact

addresses, the UE shall populate the header fields as follows:

...

e) a registration expiration interval value set to the value of zero, appropriate to the deregistration requirements of

the user;

....

 

 

< Expires 0 in SUBSCRIBE >

 

If expires header is set to be Zero in SUBSCRIBE message, it means UNSUBSCRIBE or 'ONE-TIME SUBSCRIBE'. 'ONE-TIME SUBSCRIBE' means 'Get tne status only once and stop subscription'. Refer to following specifications.

 

34.229-1 8.3 Mobile Initiated Deregistration - 8.3.2 Conformance requirement

 

If all public user identities are deregistered and all security association or TLS session is removed, then the UE shall consider subscription to the reg event package cancelled (i.e. as if the UE had sent a SUBSCRIBE request with an Expires header field containing a value of zero).

 

RFC 3856 - 4.Overview of Operation

...

[Last Pharagraph] It is also possible to fetch the current presence state, resulting in a one-time notification containing the current state.  This is accomplished by sending a SUBSCRIBE request with an immediate expiration. <-- 'Immediate expiration' can be interpreted as 'Expires 0'.