UC LabFree University
Offline

Progress

SIP ยท RFC 3261 ยง10

SIP registration

REGISTER stores a binding. It does not create a call.

Registrar challengePhoneRegistrarREGISTER401REGISTER200 OK

  1. REGISTER โ€” Request-URI is the registrar domain. Contact is the binding the phone wants stored.
  2. 401 โ€” WWW-Authenticate challenges the user. 401 is from the registrar, not a proxy.
  3. REGISTER โ€” The retry carries Authorization. The Call-ID stays with this registration dialog usage.
  4. 200 OK โ€” The binding is stored until the Contact expires. No media starts.

A phone that cannot register never places a call. Read the realm, the nonce, and whether the second REGISTER was sent to the same registrar. A 407 would mean a proxy challenged the request, which is a different hop than 401.

Sources

Study card carried forward

SIP ยท RFC 3261

Registration

A phone registers to publish where it is. The registrar stores a binding from an address-of-record to a Contact URI. Registration is not a phone call, and it does not by itself reserve media.

Ladder: phone sends REGISTER, registrar returns 401 with a digest challenge, phone sends REGISTER with Authorization, registrar returns 200 OK.
Open the SVG beside this page if you want the drawing on its own.

On a phone, swipe a wide ladder sideways. The steps below repeat the same sequence.

Sequence

  1. REGISTER โ€” Phone (UAC) to Registrar. Request-URI is the domain
  2. 401 Unauthorized โ€” Registrar to Phone (UAC). WWW-Authenticate: Digest
  3. REGISTER โ€” Phone (UAC) to Registrar. Authorization: Digest response
  4. 200 OK โ€” Registrar to Phone (UAC). Binding stored, Expires set

What the messages mean

The Request-URI of a REGISTER is the registrar's domain, such as sip:example.com. The To header is the address-of-record being registered, such as sip:alice at example.com. The Contact is the device URI the registrar should use later, such as sip:alice@192.0.2.10:5060. From and To are often the same on a REGISTER. They are not the same idea.

The first REGISTER usually has no credentials. The registrar answers 401 Unauthorized with WWW-Authenticate containing the digest realm and nonce. The phone answers with a second REGISTER that carries Authorization. A 200 OK lists the bindings the registrar stored and the Expires value that applies.

A proxy in front of the registrar is a different challenge. A proxy uses 407 Proxy Authentication Required and Proxy-Authenticate / Proxy-Authorization. Do not treat 401 and 407 as interchangeable.

Bindings

  • Expires: 0 on a Contact removes that binding.
  • Contact: * with Expires: 0 removes all bindings for the address-of-record (RFC 3261).
  • The Call-ID and CSeq still identify the REGISTER transaction. CSeq increases when the phone retries after 401.
  • If the phone is behind NAT, the Contact it writes may be an address the registrar cannot reach. The reachable address is a separate problem from the digest challenge.

Sources

  • RFC 3261, section 10 (registrations) and section 22 (digest authentication)
  • Example addresses: sip:alice at example.com, 192.0.2.10

Download exports