SIP Response: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 252: Line 252:


== See also ==
== See also ==
* https://en.wikipedia.org/wiki/List_of_SIP_response_codes - List of SIP response codes
* http://www.nexpert.net/494 - 다시쓰는 SIP의 이해 - 10편 Chapter 4. SIP Response
* http://www.nexpert.net/494 - 다시쓰는 SIP의 이해 - 10편 Chapter 4. SIP Response


Line 257: Line 258:
<references />
<references />


[[category:telephony]]
[[category:SIP protocol]]

Latest revision as of 13:46, 3 February 2020

Overview

SIP status/response code 에 대한 정확한 정의는 RFC 3261 문서에서 확인할 수 있다.

SIP Response의 개요

SIP 요청에 대한 응답이 이루어져야 트랜잭션이 완료된다. 요청에 대한 응답이 없을 경우에는 사전 정의된 타이머(Timer)까지 기다린 후에 재송신된다.

SIP 응답은 일련 번호가 정의되어 있으며, 일련 번호 앞자리만 보다도 일반적인 의미를 해석할 수 있다.

  • 1xx Provisional : 정보
  • 2xx Success : 정상
  • 3xx Redirection : 요청을 다른 주소로 재송신
  • 4xx Client Error : 클라이언트 장애
  • 5xx Server Error : 서버 장애
  • 6xx Global Failure : 사용자 연결은 가능하지만 통화불가

1xx Provisional Response

1xx Informational Response 라고도 하며 요청에 대해 최종응답(Final Response) 전에 요청을 처리하는 시간이 200ms 이상일 때 서버가 처리중임을 통지하기 위해 발행한다. 1xx 응답에는 SDP와 같은 SIP 메시지 바디가 함께 전송되기도 한다.

  • 100 Trying
수신된 요청을 다음 서버로 전송하거나 처리중임을 의미한다. 만일 데이터베이스에 대한 쿼리나 상대방으로부터의 응답이 늦어 최종응답을 보내지 못할 경우 송신자는 요청에 대한 재송신을 할 수도 있으므로 100 Trying 을 UAC로 전송한다.
일반적으로 INVITE와 같은 요청을 받아서 즉시 처리할 수 없을 경우에 거의 대부분 발행된다.
  • 180 Ringing
UAS가 사용자에게 Alerting(전화기의 링을 울림)중이므로 UAC에게 Ringback tone을 재생하거나 준비할 것을 통지하는 것이다.
호 절차상 발신자가 링백톤을 듣는다면 호가 거의 설립된 것으로 간주되므로 중요한 응답이다.
  • 181 Call Is Being Forwarded
UAS가 착신전환되어 있으므로 현재 호가 착신전환 번호로 재시도 중임을 UAC에게 통지하는 것이다.
  • 182 Queued
UAS가 일시적으로 통화를 할 수 없는 상태일 때 호를 대기 큐에 넣은 후 UAS가 통화가 가능해지면 호를 재 연결할 것임을 통지한다.
예를 들면, IPCC와 같은 고객센터에서 모든 상담원이 통화중일 경우 상담원이 통화가 가능해질 때 까지 호는 큐잉되어 음악이나 큐잉 메시지를 듣게 된다.
  • 183 Session In Progress
진행중인 호에 대한 추가적인 정보를 전송하기 위해 사용한다.
일반적으로 잘 사용되진 않지만, 간혹 사용되는 경우가 있다.
  • 199 Early Dialog Terminated
RFC 6228 SIP Response Code for Indication of Terminated Dialog 에 새롭게 명시된 응답으로 UAS와 SIP Forking Proxy가 최종 응답전에 다이얼로그가 종료되었음을 통지한다.

2xx Successful

Request가 정상적으로 처리되었음을 의미한다. 문서 상에는 202와 204가 표시되어 있지만, 실제 200 OK 이외의 응답을 본 적이 없다.

  • 200 OK
요청을 성공적으로 처리하였음을 통지한다.
  • 202 Accepted
요청은 처리를 위해 승인이 되었지만, 아직 처리중임을 통지한다.
  • 204 No Notification
RFC 5839 An Extension to SIP Events for Conditional Event Notification 에 명시된 응답으로 기존 다이얼로그 내에서 SUBSCRIBE 메시지와 관련된 응답이 보내지지 않았음을 표시한다.

3xx Redirect

사용자의 새로운 위치나 UA 정보 또는 호를 위한 변경된 서비스로 응답한다.

  • 300 Multiple Choices
사용자가 여러개의 단말을 소유할 수 있음을 의미하므로 선호되는 UA로 호를 진행한다.
  • 301 Moved Permanently
요청된 Request-URI의 주소로 단말을 찾을 수 없음을 의미한다. 사용자는 응답에 포함된 Contact 헤더 주소로 re-INVITE를 진행하고, Local Directories, 주소록 등에 업데이트 한다.
  • 302 Moved Temporarily
일시적으로 다른 곳으로 이동했음을 의미한다. 발신자는 응답에 포함된 Contact Header 주소로 re-INVITE를 진행한다. 일시적인 이동이므로 Local Directories에 업데이트할 필요가 없다.
  • 305 Use Proxy
UAS에 도닥한 Request가 Proxy를 경유하지 않았음을 의미한다. UAS는 메시지가 SIP Proxy를 경유하도록 Contact address를 포함한다.
  • 308 Alternative Service
진행중인 서비스 요청은 실패하였으나 다른 서비스는 이용 가능하다는 것을 의미한다.

4xx Request Failure

호의 실패를 의미하므로 실패 이유를 명기하여 응답한다. UA 메시지는 변경없는 같은 Request를 반복해서는 안된다.

4xx responses are definite failure responses from a particular server. The client SHOULD NOT retry the same request without modification(for example, adding appropriate authorization). However, the same request to a different server might be successful.

  • 400 Bad Request
잘못된 문구나 메시지 포멧을 따르고 있지않아 처리될 수 없음을 의미한다. 필수적인 SIP 헤더가 빠져있을 때 발행된다.
The request could not be understood due to malformed syntax. The Reason-Phrase SHOULD identify the syntax problem in more detail, for example, "Missing Call-ID header field".
  • 401 Unauthorised & 407 Proxy Authentication Required
요청은 사용자 인증이 필요함을 의미한다. Registrar 또는 UAS는 401 응답을 발행하고, SIP Proxy 서버는 407 응답을 발행한다.
The request requires user authentication. This response is issued by UASs and registrars, while 407(Proxy Authentication Required) is used by proxy server.
  • 402 Payment Required
Reserved for future use.
  • 403 Forbidden
서버는 Request에 대한 처리를 거절함을 의미한다.
The server understood the request, but is refusing to fulfill it. Authorization will not help, and the request SHOULD NOT be repeated.
  • 404 Not Found
Request-URI에 있는 도메인 주소가 존재하지 않는다.
The server has definitive information that the user does not exist at the domain specified in the Request-URI. This status is also returned if the domain in the Request-URI does not match any of the domains handled by the recipient of the request.
  • 405 Method Not Allowed
The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI. The response MUST include an Allow header field containing a list of valid methods for the indicated address.
  • 406 Not Acceptable
Accept Header에 열거되지 않은 컨텐츠 타입을 요구했다.
The resource identified by the request is only capable of generating response entities that have content characteristics not acceptable according to the Accept header field sent in the request.
  • 408 Request Timeout
일정 시간안에 Request에 대한 응답을 할 수 없다.
The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time. The client MAY repeat the request without modifications at any later time.
  • 410 Gone
요청한 자원이 서버에서 소정적으로 이용가능하지 않는다.
The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404(Not found) SHOULD be used instead.
  • 413 Request Entity Too Large
Request 의 내용이 서버가 처리할 수 있는 것보다 너무 큼을 의미한다. 일시적인 상황일 경우 Retry-After 헤더로 UAC가 재시도 할 수 있음을 표시한다.
The server is refusing to process a request because the request entity-body is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request. If the condition is temporary, the server SHOULD include a Retry-After header filed to indicate that it is temporary and after what time the client MAY try again.
  • 414 Request-URI Too Long
The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
  • 415 Unsupported Media Type
서버는 메시지 바디에 서버가 지원되지 않는 포멧으로 요청함을 의미한다. 서버는 반드시 Accept, Accept-Encoding, 또는 Accept-Language 헤더 등을 이용하여 응답해야 한다.
The server is refusing to service the request because the message body of the request is in a format not supported by the server for the requested method. The server MUST return a list of acceptable formats using the Accept, Accept-Encoding, or Accept-Language header field, depending on the specific problem with the content. UAC processing of this response.
  • 416 Unsupported URI Scheme
Request-URI 스킴을 서버가 해석할 수 없음을 의미한다.
The server cannot process the request because the scheme of the URI in the Request-URI is unkown to the server. Client processing of this response.
  • 420 Bad Extension
서버는 Proxy-Require 나 Require 헤더에 정의된 Extension (확장)을 이해하지 못함을 의미한다. 서버는 반드시 Unsupported Header에 지원하지 않는 Extension 을 명기하여 응답한다.
The server did not understand the protocol extension specified in a Proxy-Require or Require header field. The server MUST include a list of the unsupported extensions in an Unsupported header field in the response. UAC processing of this response.
  • 421 Extension Required
UAS는 Request 를 처리하기 위해 특정 Extension 이 필요하지만, Supported Header 에 명기되지 않았음을 의미한다. UAS는 응답시에 Require 헤더에 필요한 Extension 을 명기해야 한다.
The UAS needs a particular extension to process the request, but this extension is not listed in a Supported header field in the request. Responses with this status code MUST contain a Require header field listing the required extensions.
A UAS SHOULD NOT use this response unless it truly cannot provide any useful service to the client. Instead, if a desirable extension is not listed in the Supported header field, servers SHOULD process the request using baseline SIP capabilities and any extensions supported by the client.
  • 423 Interval Too Brief
Request 에 의해 자원을 확보하기 위한 시간이 너무 부족함을 의미한다.
The server is rejecting the request because the expiration time of the resource refreshed by the request is too short. This response can be used by a registrar to reject a registration whose Contact header field expiration time was too small. The use of this response and the related Min-Expires header field are descrbed in RFC 3261.
  • 480 Temporarily Unavailable
상대방을 성공적으로 연결하였지만, 현재 상대방이 응대 가능하지 않음을 의미한다. 예를 들면, 로그인은 했지만 통화가 안되거나 Do no disturb 기능을 이용 중일 경우이다.
The callee's end system was contacted successfully but the callee is currently unavailable(for example, is not logged in, logged in but in a state that precludes communication with the calle, or has activated the "do not disturb" feature). The response MAY indicate a better time to call in the Retry-After header field. The user could also be available elsewhere (unbeknownst to this server). The reason phrase SHOULD indicate a more precise cause as to why the callee is unavailable. This value SHOULD be settable by the UA. Status 486(Busy Here) MAY be used to more precisely indicate a particular reason for the call failure.
This status is also returned by a redirect or proxy server that recognizes the user identified by the Request-URI, but does not currently have a valid forwarding location for that use.
  • 481 Call/Transaction Does not Exist
UAS가 기존 다이얼로그나 트랜잭션과 매치되지 않는 요청을 받았음을 의미한다.
This status indicates that the UAS received a request that does not match any existing dialog or transaction.
  • 482 Loop Detected
UAS 가 루프 상황을 검출하였음을 의미한다. Via 헤더의 값을 통해서 전 서버에서 보낸 요청이 다시 돌아왔음을 알 수 있다.
The server has detected a loop.
  • 483 Too Many Hops
서버는 Max-Forwards 헤더 값이 0인 Request 를 받았음을 의미한다.
The server received a request that contains a Max-Forwards header field with the value zero.
  • 484 Address Incomplete
서버는 불완전한 Request-URI 를 가진 Request 를 받았음을 의미한다.
The server received a request with a Request-URI that was incomplete. Additional information SHOULD be provided in the reason phrase.
This status code allows overlapped dialing. With overlapped dialing, the client does not know the length of the dialing string. It sends strings of increasing lengths, prompting the user for more input, until it no longer receives a 484(Address Incomplete) status response.
  • 485 Ambiguous
서버는 애매모호한 Request-URI 를 가진 Request 를 받았음을 의미한다. 서버는 응답시에 Contact 헤더에 명확한 주소를 리스팅한다.
The Request-URI was ambiguous. The response MAY contain a listing of possible unambiguous addresses in Contact header fields. Revealing alternatives can infringe on privacy of the user or the organization. It MUST be possible to configure a server to response with status 404(Not Found) or to suppress the listing of possible choices for ambiguous Request-URIs.
Example response to a request with the Request-URI.
sip:lee@example.com:

      SIP/2.0 485 Ambiguous
      Contact: Carol Lee <sip:carol.lee@example.com>
      Contact: Ping Lee <sip:p.lee@example.com>
      Contact: Lee M. Foote <sips:lee.foote@example.com>
Some email and voice mail systems provide this functionality. A status code separate from 3xx is used since the semantics are different: for 300, it is assumed that the same person or service will be reached by the choices provieded. While an automated choice or sequential search makes sense for a 3xx response, user intervention is required for a 485 (Ambiguous) response.
  • 486 Busy Here
상대방을 성공적으로 연결했지만, 현재 상대방이 응대가능하지 않음을 의미한다.
The callee's end system was contacted successfully, but the callee is currently not willing or able to take additional calls at this end system. The response MAY indicate a better time to call in the Retry-After header field. The user could also be available elsewhere, such as through a voice mail service. Status 600 (Busy Everywhere) SHOULD be used if the client knows that no other end system will be able to accept this call.
  • 487 Request Terminated
Request 는 BYE 나 CANCEL 요청에 의해 종료되었음을 의미한다. CANCEL 요청에 대한 응답으로 사용되지는 않는다.
The request was terminated by a BYE or CANCEL request. This response is never returned for a CANCEL request itself.
  • 488 Not Acceptable Here
Request-URI 에 명기된 특정 자원이나 코덱을 사요할 수 없음을 의미한다.
The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere.
A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE(or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.
  • 491 Request Pending
UAS 는 같은 다이얼로그안에 펜딩된 요청을 가지고 있음을 의미한다.
The request was received by a UAS that had a pedning request within the same dialog.
  • 493 Undecipherable
Request 에 암호화된 MIME 바디를 포함하고 있어 처리할 수 없음을 의미한다.
The request was received by a UAS that contained an encrypted MIME body for which the recipient does not possess or will not provide an appropriate decryption key. This response MAY have a single body containing an appropriate public key that should be used to encrypt MIME bodies sent to this UA.

5xx Server Failure

서버 자체 에러가 발생하여 요청을 처리할 수 없음을 의미한다.

5xx responses are failure responses given when a server itself has erred.

  • 500 Server Internal Error
The server could not fulfill the request due to some unexpected condition.
  • 501 Not Implemented
The server does not support the functionality required to fulfill the request. This is the appropriate response when a UAS does not recognize the request method and is not capable of supporting it for any user(Proxies forward all requests regardless of method).
Note that a 405 (Method Not Allowed) is sent when the server recognizes the request method, but that method is not allowed or supported.
  • 502 Bad Gateway
The server, while acting as a gateway or proxy, received an invalid response from the downstream server it accessed in attempting to fulfill the request.
  • 503 Service Unavailable
The server is temporarily unable to process the request due to a temporary overloading or maintenance of the server. The server MAY indicate when the client should retry the request in a Retry-After header field. If no Retry-After is given, the client MUST act as if it had received a 500(Server Internal Error) response.
A client (proxy or UAC) receiving a 503(Service Unavailable) SHOULD attempt to forward the request to an alternate server. It SHOULD NOT forward any other requests to that server for the duration specified in the Retry-After header field, if present.
Servers MAY refuse the connection or drop the request instead of responding with 503 (Service Unavailable).
  • 504 Server Time-out
The server did not receive a timely response from an external server it accessed in attempting to process the request. 408 (Request Timeout) should be used instead if there was no response within the period specified in the Expires header field from the upstream server.
  • 505 Version Not Supported
The server does not support, or refuses to support, the protocol version that was used in the erquest. The server is indicating it is unable or unwilling to complete the request using the same major version as the client, other than with this error message.
  • 513 Message Too Large
The server was unable to process the request since the message length exceeded its capabilities.

6xx Global Failures

6xx responses indicate that a server has definitive information about a particular user, not just the particular instance indicated in the Request-URI.

  • 600 Busy Everywhere
The callee's end system was contacted successfully but the callee is busy and does not wish to take the call at this time. The response MAY indicate a better time to call in the Retry-After header field. If the callee does not wish to reveal the reason for declining the call, the callee uses status code 603 (Decline) instead. This status response is returned only if the client knows that no other end point (such as a voice mail system) will answer the request. Otherwise, 486 (Busy here) should be returned.
  • 603 Decline
The callee's machine was successfully contacted but the user explicitly does not wish to or cannot participate. The response MAY indicate a better time to call in the Retry-After header field. This status response is returned only if the client knows that no other end point will answer the request.
  • 604 Does Not Exist Anywhere
The server has authoritative information that the user indicated in the Request-URI does not exist anywhere.
  • 606 Not Acceptable
The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable.
A 606 (Not Acceptable) response means that the user wishes to communicate, but cannot adequately support the session described. The 606 (Not Acceptable) response MAY contain a list of reasons in a Warning header field describing why the session described cannot be supported.
A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE (or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.
It is hoped that negotiation will not frequently be needed, and when a new user is being invited to join an already existing conference, negotiation may not be possible. It is up to the invitation initiator to decide whether or not to act on a 606 (Not Acceptable) response.
This status response is returned only if the client knows that no other end point will answer the request.

See also

References

<references />