Knowledge Base

Device Not Registering

Article ID: 60
Last updated: 02 Mar, 2019

When diagnosing a device that will not register, it is always best to be able to run a network packet capture on the LAN/WAN, or directly from the registering device such as the PBX or phone (if they support it). Yealink phones have a capture button built right into their GUI, and many PBXs and routers can do traces from their CLI (Command Line Interface). The diagram below represents a successful registration attempt. The device sends out its initial REGISTER. The responding server sends back a 100 Trying signal followed by a 401 Unauthorized. This is completely normal. The 401 Unauthorized says to the device, "Hey, prove to me who you are! I've sent you a nonce (random string of hex characters). Send me back your username and realm, and use my nonce string in combination with your password to come up with the correct MD5 sum!" The device then sends a second REGISTER signal that has an additional header (piece of information) in the SIP packet. This header is called the 'Authorization'. In the authorization, the device places its authentication username, realm, nonce (the string provided by the SIP server), and password in an MD5 sum. The server then sends back yet another 100 Trying signal. If all the auth information is correct and the MD5 sum matches what calculation the server came up with (combining nonce with password), the server then sends back a 200 OK indicating that the device is now registered. I have placed an example below, highlighting the nonce and registration Authorization lines (I have removed the 100 Trying responses to save space).

Bad password/nonce MD5 sums will result in a 403 Forbidden response from the server - generally this is due to an incorrect password. Although Copy and Paste usually works, sometimes it's worth it to manually type the password in if you are experiencing an issue.

Bad Authorization username or realm with result in a 404 Not Found response from the server. Ensure you have the SIP username defined at both the SIP Username and Auth Username parameters in your device.

If you are sending multiple registrations, but not seeing any responses, this is usually because our servers are not getting the REGISTER packets to begin with. If we are getting the packets, then something in the headers is incorrect (NAT issue) and our server is unable to route back to the device. Check all NAT policies rules in the device, router, and modem as well as all SIP proxy addressing, DNS, and firewall access rules to remedy.

If you are sending multiple registrations, and keep getting the 401 Unauthorized, this is because your device is either not receiving the 401 Unauthorized packet from the SIP server, or because your device is not responding in turn with another REGISTER packet containing the Authorization header (as underlined below). To verify if the device is not receiving or responding to the 401 Unauthorized, you can inspect the "CSeq" header of the REGISTER packet, if you have multiple REGISTER packets with the same "CSeq" number, this indicates the device is not receiving or responding to the 401 Unauthorized as it is attempting to send the same initial register.

U 98.114.28.158:1024 -> 162.252.248.41:5060
REGISTER sip:spaz.jh.atlas.wlcomm.net SIP/2.0.
Via: SIP/2.0/UDP 98.114.28.158:1024;branch=z9hG4bK80cf3f826bcee4119ff15177a99db095;rport.
From: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>;tag=24997148.
To: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>.
Call-ID: 80CF3F82-6BCE-E411-9FEF-5177A99DB095@192.168.1.160.
CSeq: 1 REGISTER.
Contact: <sip:sipspaz_ec28@98.114.28.158:1024>;+sip.instance="".
Allow: INVITE, OPTIONS, ACK, BYE, CANCEL, INFO, NOTIFY, MESSAGE, UPDATE.
Max-Forwards: 70.
User-Agent: SIPPER for PhonerLite.
Expires: 900.
Content-Length: 0.

U 162.252.248.41:5060 -> 98.114.28.158:1024
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 98.114.28.158:1024;branch=z9hG4bK80cf3f826bcee4119ff15177a99db095;rport=1024.
From: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>;tag=24997148.
To: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>;tag=ef612c4dc016c456d43108a2b5f4bca3.d578.
Call-ID: 80CF3F82-6BCE-E411-9FEF-5177A99DB095@192.168.1.160.
CSeq: 1 REGISTER.
WWW-Authenticate: Digest realm="spaz.jh.atlas.wlcomm.net", nonce="VQ3DFVUNwenn/k4y1iFiRkQPNQOBF/ic".
Content-Length: 0.

U 98.114.28.158:1024 -> 162.252.248.41:5060
REGISTER sip:spaz.jh.atlas.wlcomm.net SIP/2.0.
Via: SIP/2.0/UDP 98.114.28.158:1024;branch=z9hG4bK80cf3f826bcee4119ff35177a99db095;rport.
From: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>;tag=24997148.
To: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>.
Call-ID: 80CF3F82-6BCE-E411-9FEF-5177A99DB095@192.168.1.160.
CSeq: 3 REGISTER.
Contact: <sip:sipspaz_ec28@98.114.28.158:1024>;+sip.instance="".
Authorization: Digest username="sipspaz_ec28", realm="spaz.jh.atlas.wlcomm.net", nonce="VQ3DFVUNwenn/k4y1iFiRkQPNQOBF/ic", uri="sip:spaz.jh.atlas.wlcomm.net", response="1d154f373ac2d0e3d01275092dee2412", algorithm=MD5.
Allow: INVITE, OPTIONS, ACK, BYE, CANCEL, INFO, NOTIFY, MESSAGE, UPDATE.
Max-Forwards: 70.
User-Agent: SIPPER for PhonerLite.
Expires: 900.
Content-Length: 0.

U 162.252.248.41:5060 -> 98.114.28.158:1024
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 98.114.28.158:1024;branch=z9hG4bK80cf3f826bcee4119ff35177a99db095;rport=1024.
From: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>;tag=24997148.
To: "PhonerLite" <sip:sipspaz_ec28@spaz.jh.atlas.wlcomm.net>;tag=ef612c4dc016c456d43108a2b5f4bca3.70c8.
Call-ID: 80CF3F82-6BCE-E411-9FEF-5177A99DB095@192.168.1.160.
CSeq: 3 REGISTER.
Contact: <sip:sipspaz_ec28@98.114.28.158:1024>;expires=900;+sip.instance="".
Content-Length: 0.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 60
Last updated: 02 Mar, 2019
Revision: 1
Views: 121