SIP 401 Unauthorized

KamailioRFC 3261 §22.1

The server is challenging the request for digest authentication. This is normal on the first INVITE / REGISTER and almost never indicates an issue on its own — but a *loop* of 401s usually does.

Common causes on Kamailio

  • Wrong SIP password or username casing
  • Authentication realm mismatch
  • Auth header reused after `nonce` expired
  • PBX expecting MD5 vs SHA-256 (depending on RFC 8760 support)

Stop guessing — paste your trace

Drop your PCAP or sngrep log and SIP Flow will render the ladder, surface the failing transaction, and (optionally) ask Gemini to suggest the fix grounded in Kamailio docs.

Open analyzer

Don't have a trace yet? See how to capture one in Wireshark, sngrep, or your PBX

Same error on a different vendor

SIP Flow · Free, private SIP/VoIP analyzer

Core utility runs entirely in your browser. AI debugging is opt-in and pseudonymizes by default.