logo

Openplatform.xyz

Placeholder for our stuff related to Telecom, IT, Internet of things (IOT), ESP8266, Raspberry Pi

Home IOT Telecom IT stuff About Us Contact Us Site Map
Untitled Template
To open call flow image in new window click here.

SIP Registration

SIP Registration is used by UA to notify it's contact address to SIP server.


REGISTER: UA to Registrar

R-URI: Domain of Registrar server (without user part).
To header: Contains the SIP URI of the AOR (address of record) of the user agent that is being registered.
From header: Contains the SIP URI of the sender of the request. In case of third party or surrogate Registration From header is different then To header.




REGISTER sips:ss2.biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashds7
Max-Forwards: 70
To: Bob <sips:[email protected]>
From: Bob <sips:[email protected]>;tag=a73kszlfl
Call-ID: [email protected]
CSeq: 1 REGISTER
Contact: <sips:[email protected]>
Expires: 7200
Content-Length: 0



401 Unauthorized: Registrar to UA


This response means that the request requires user authentication.

Registrar server, sends a 401 Unauthorized response to a REGISTER message that does not contain the proper credentials. The server generating a 401 response MUST send a WWW-Authenticate header field containing at least one challenge applicable to the target resource.

If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials. The user agent MAY repeat the request with a new or replaced Authorization header field.

Note: 407 Proxy Authentication Required is sent by a proxy that requires authentication.


SIP/2.0 401 Unauthorized
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashds7;received=192.0.2.201
From: Bob<sips:[email protected]>;tag=a73kszlfl
To: Bob<sips:[email protected]>;tag=1410948204
Call-ID: [email protected]
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm="atlanta.example.com", qop="auth", nonce="ea9c8e88df84f1cec4341ae6cbe5a359", opaque="", stale=FALSE, algorithm=MD5
Content-Length: 0

REGISTER with Auth: UA to Registrar


UA sends register with authentication. UA encrypts (digest 5 - MD5) and sends shared secret to Registrar. The shared secret is never sent unencrypted in the SIP message.

See here, how is response in Auth Digest is calculated.

Usually, the same Call-ID and From tag is used, but a different branch ID and incremented CSeq.


REGISTER sips:ss2.biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashd92
Max-Forwards: 70
From: Bob<sips:[email protected]>;tag=ja743ks76zlflH
To: Bob <sips:[email protected]>
Call-ID:[email protected]
CSeq: 2 REGISTER
Contact: <sips:[email protected]>
Authorization: Digest username="bob", realm="atlanta.example.com" nonce="ea9c8e88df84f1cec4341ae6cbe5a359", opaque="", uri="sips:ss2.biloxi.example.com", response="dfe56131d1958046689d83306477ecc" Content-Length: 0

200 OK: Registrar to UA

Registrar matches authentication, stores AOR (To header) binding with Contact header in database and sends 200 OK.


SIP/2.0 200 OK
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashd92;received=192.0.2.201
From: Bob <sips:[email protected]>;tag=ja743ks76zlflH
To: Bob <sips:[email protected]>;tag=37GkEhwl6
Call-ID: [email protected]
CSeq: 2 REGISTER
Contact: <sips:[email protected]>;expires=3600
Content-Length: 0

Related Pages

Related Links