SIP

SIP 204 No Notification vs 406 Not Acceptable

SIP 204 (No Notification) is a 2xx Success response, while 406 (Not Acceptable) 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, 406 means that the resource identified by the request is only capable of generating responses with content characteristics not acceptable according to the Accept header.

Mô tả

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

Khi bạn thấy mã này

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

Cách khắc phục

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

Mô tả

The resource identified by the request is only capable of generating responses with content characteristics not acceptable according to the Accept header.

Khi bạn thấy mã này

When content negotiation fails — the server cannot produce a response matching the Accept header fields in the request.

Cách khắc phục

Review the Accept headers in your request and broaden the acceptable content types.

Sự khác biệt chính

1.

204 is a 2xx Success response, while 406 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 406: The resource identified by the request is only capable of generating responses with content characteristics not acceptable according to the Accept header.

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 406 when when content negotiation fails — the server cannot produce a response matching the Accept header fields in the request.

Khi nào dùng cái nào

For 204 (No Notification): No fix needed. The subscription was accepted but there is no state change to notify about yet. For 406 (Not Acceptable): Review the Accept headers in your request and broaden the acceptable content types.

Tìm hiểu thêm