Realm (SIP Authentication)
The realm is the protection domain named in a SIP authentication challenge. The client includes it when hashing the password, so it must match what the server expects.
Published 8 November 2026 · 1 min read · By SpaGreen Creative
Short answer
The realm is a string sent by a SIP server in a digest authentication challenge that names the protection space and is included in the hash the client computes from its password.
When a SIP server wants a client to prove its identity, it responds with 401 Unauthorized or 407 Proxy Authentication Required and includes a WWW-Authenticate or Proxy-Authenticate header. That header carries a realm, a nonce and the algorithm to use. The realm is a label for the protection space, often the server's domain name or a fixed string such as asterisk.
RFC 3261 section 22 applies HTTP digest authentication to SIP. In digest, the client computes a hash over the username, the realm and the password. The result only matches the server's expectation if all three agree. The realm therefore ties credentials to a particular server or domain, and the same password produces a different hash for a different realm.
Most softphones take the realm from the challenge automatically, and there is nothing to configure. Some PBX systems let the administrator set the realm. If a server uses a non-default realm and a client has a fixed value configured elsewhere, authentication fails with repeated 401 responses even though the password is correct.
In detailed SIP logs the realm appears in the challenge line, which makes it a useful clue when diagnosing registration failures.
Sources and further reading
- RFC 3261: SIP: Session Initiation Protocol, Section 22 Usage of HTTP Authenticationwww.rfc-editor.org
- RFC 7616: HTTP Digest Access Authenticationwww.rfc-editor.org
This article is published by SpaGreen Creative, the maker of SIPdia. Product names mentioned belong to their owners. Where it describes other software, treat the steps as general guidance and check the official documentation linked above.
