SIP 401 Unauthorized
SIP 401 Unauthorized means the server wants your username and password. One 401 is normal; a 401 that keeps coming back means the login is wrong.
- Who sends it
- The SIP trunk
- When
- Logging in (REGISTER)
- Retry?
- Your phone retries on its own with the password. If 401 repeats, fix the details before trying again.
- The caller hears
- Nothing, because no call is made. The phone or PBX shows the account as not registered or failed.
What causes 401, and how to fix it
A single 401 is part of normal SIP digest authentication: the server challenges, your system answers with a hashed password, and the request goes through. A loop of 401s means the answer is wrong.
- 1Most common
The password or username is wrong, often a typo or a space pasted at the end.
Paste the username and password again from your account, with no spaces before or after.
- 2Most common
The authentication username field is empty or different from the SIP username.
Where your app has a separate auth username or login field, put the same SIP username in it.
- 3Sometimes
The server or domain field does not match the one in your account, so the realm does not match.
Use the server exactly as shown in your account, in both the server and the domain fields.
- 4Sometimes
Several devices use the same login, and one still has an old password saved.
Update every phone and app that uses this login, or give each device its own login.
- 5Rare
Many failed attempts got your address blocked for a while, so you now see 403 or no reply.
Stop the retries, correct the details, then wait before registering again.
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.0.113.10:5060;branch=z9hG4bK-74bf9
Call-ID: [email protected]
WWW-Authenticate: Digest realm="sip.linkedsip.com", nonce="5f2b9c1e", algorithm=MD5SIP 401 questions
Is a SIP 401 always a problem?
Why do I get 401 again and again?
What is digest authentication?
Not 401? Look up another code.
The full list: SIP response codes. 401 again and again? Check your SIP trunk configuration.