SIP

SIP 204 No Notification vs 412 Conditional Request Failed

SIP 204 (No Notification) is a 2xx Success response, while 412 (Conditional Request Failed) is a 4xx Client Failure response. 204 indicates that the request was successful but the server has decided not to send a NOTIFY for this SUBSCRIBE request. In contrast, 412 means that the precondition given in the request was not met. Used with SIP event state publication (RFC 3903).

説明

The request was successful but the server has decided not to send a NOTIFY for this SUBSCRIBE request.

このコードが表示される場合

When subscribing to event packages that may not generate immediate notifications, such as dialog or presence packages.

解決方法

No fix needed. The subscription was accepted but there is no state change to notify about yet.

説明

The precondition given in the request was not met. Used with SIP event state publication (RFC 3903).

このコードが表示される場合

When a PUBLISH request includes an If-Match header with an entity tag that does not match the current state on the server.

解決方法

Refresh the entity tag by performing a new PUBLISH without If-Match, then use the returned SIP-ETag for subsequent updates.

主な違い

1.

204 is a 2xx Success response, while 412 is a 4xx Client Failure response.

2.

SIP 204: The request was successful but the server has decided not to send a NOTIFY for this SUBSCRIBE request.

3.

SIP 412: The precondition given in the request was not met. Used with SIP event state publication (RFC 3903).

4.

You encounter 204 when when subscribing to event packages that may not generate immediate notifications, such as dialog or presence packages.

5.

You encounter 412 when when a PUBLISH request includes an If-Match header with an entity tag that does not match the current state on the server.

どちらをいつ使うか

For 204 (No Notification): No fix needed. The subscription was accepted but there is no state change to notify about yet. For 412 (Conditional Request Failed): Refresh the entity tag by performing a new PUBLISH without If-Match, then use the returned SIP-ETag for subsequent updates.

詳しく見る