阿嵩 唉唷

關於部落格
  • 190330

    累積人氣

  • 1

    今日人氣

    0

    訂閱人氣

SIP Response- 401 or 407

我看完後的心得是:

401是由UAS或Registrars發出,UAS利用回應401來對UAC
做身份挑戰(challenge),Registrars和redirect servers則利用401
來做身份驗證:而Proxy則是「不可以」用401,而是用407
來回應。

至於為什麼他會回應我401呢?那就是因為其實我所用的
Brekeke SIP Server他是結合了regitsration server、proxy server,
而我做REGISTER的動作,應該就是由registration server來回應,
因此回應的內容就是401了,如果我是作INVITE的話,
那回應的結果應該就是407。


RFC內容:

22.1 Framework

The framework for SIP authentication closely parallels that of HTTP
(RFC 2617 [17]). In particular, the BNF for auth-scheme, auth-param,
challenge, realm, realm-value, and credentials is identical (although
the usage of "Basic" as a scheme is not permitted). In SIP, a UAS
uses the 401 (Unauthorized) response to challenge the identity of a
UAC. Additionally, registrars and redirect servers MAY make use of
401 (Unauthorized) responses for authentication, but proxies MUST
NOT, and instead MAY use the 407 (Proxy Authentication Required)
esponse. The requirements for inclusion of the Proxy-Authenticate,
Proxy-Authorization, WWW-Authenticate, and Authorization in the
various messages are identical to those described in RFC 2617 [17].
..........
相簿設定
標籤設定
相簿狀態