Understanding SIP Registration

Let’s start at the very beginning

a very good place to start

when you read you begin with A B C

when you sing you begin with Do Re Mi

I have always loved musicals and Rogers and Hammerstein’s “The Sound of Music” is high on my list of favorites. Sure, it’s corny and far from historically accurate, but that doesn’t bother me in the least. I am always willing to set aside any sense of reality for good singing, romance, and adventure and “The Sound of Music” has them all.

So, what does this have to do with unified communications? REGISTER, of course. Like Do Re Me, you begin SIP with REGISTER.

Can you get SIP devices to communicate without REGISTER? Absolutely. In fact, when I teach my SIP class, the students put their SIP clients into point-to-point mode which does not require REGISTER. This means that clients send SIP requests and responses directly to the other clients and not through a proxy. The clients can do everything all by themselves.

However, point-to-point without REGISTER has a serious downfall. The clients are required to know the IP addresses of all the other clients they wish to communicate with. While this is fine in a limited classroom environment, it becomes unwieldy after you grow beyond a handful of endpoints.

As an analogy, imagine having to know the IP address of everyone you wanted to send an email to.   That’s the same problem you have if you don’t use REGISTER. It’s simply not practical.

The Tie that Binds

REGISTER associates a user’s identification, or Address of Record (AOR), with one or more locations. Note that I said locations. You are not limited to registering an AOR to a single device. Personally, I routinely register my AOR to a physical desk phone and multiple SIP soft-clients. Present day Avaya Aura supports up to ten such registrations per user. That’s enough to make even the most device crazy nerd happy.

You bind an AOR to an IP address with a Contact header.  For example, one of my soft clients might tell a SIP registrar that aprokop can be reached at with this Contact header.

Contact: Andrew Prokop <SIP:aprokop@>

Registrations are time-based and will eventually expire. This requires the client to periodically refresh a REGISTER with a new REGISTER. Actually, new isn’t the correct word to use for this. Subsequent REGISTER messages must contain the same Contact, To, From, call-ID, and From tag  as the original registration. This allows the SIP registrar to know that it’s simply a refresh and not a new registration for the same AOR.

Please note that CSeq will increment with each REGISTER sent.

To learn more about registration timers, please see my article, Understanding SIP Timers Part II.

Keeping Things Secure

I may tell my communications system that I am Andrew Prokop, but it would be foolish to trust me at face value. That’s why SIP allows a REGISTER to be challenged as to the authenticity of the user.

Before I go through a REGISTER challenge, allow me to define something known as a nonce.

Nonce stands for Number Once and is an arbitrary number used only once in a cryptographic communication. The recipient of a nonce will use it to encrypt his or her credentials. Number once refers to the fact that encryption with this nonce can only be done one time. If someone were to sniff the LAN and obtain someone’s encrypted password, it won’t do them any good because it can only be used in a single transaction. It becomes stale and useless immediately after its first use.

A REGISTER flow is fairly simple and follows these steps:

  1. A user sends a REGISTER to the SIP registrar. The To and From headers contain the user’s AOR. The user specifies the number of seconds the registration should be valid in the Expires header. This value can be later raised or lowered by the registrar.
  2. The registrar returns a 401 Unauthorized response with a WWW-Authenticate header.  This header contains data that must be used to encrypt the user’s communications password. Specifically, it contains a nonce along with the name of the encryption algorithm that the client must use.
  3. The user sends a second REGISTER to the SIP registrar. This REGISTER contains an Authorization header.   Within Authorization is the user’s encrypted password.
  4. If the correct password is received by the registrar, a 200 Ok response is sent to signify a successful registration. An Expires header may be present with a different value than what the user requested.  This is the time the registration will be valid as determined by the registrar’s policies.

A registration is removed by sending a REGISTER with an Expires header value of 0 (zero).

In a picture, we have this.


Using the traceSM tool on an Avaya Aura Session Manager, I captured the following trace which shows a REGISTER, the challenge, and a REGISTER with encrypted credentials.  Take a look at the headers and you will see that they are doing exactly what I said they would do.




In the case of my daily life, my various SIP devices will each send a REGISTER, be challenged, and resend the REGISTER with the encrypted credentials. They periodically refresh their registrations to ensure that I am able to make and receive calls on all my devices until I am finished for the day.

Speaking of finished for the day, that’s about all I have to say about REGISTER.  It’s not that complicated once you understand the basics.  Just keep in mind that while registration isn’t absolutely mandatory, it enables a secure, scalable, and easy to manage SIP solution.

And these are a few of my favorite things.


  1. Very nicely explained Andrew!

  2. Very clear article.
    Clean and crisp!!!

  3. Is it mandatory to get 401 response to REGISTER REQUEST always.

    1. No, but it’s smart. You want to make sure that registrations are authenticated.

  4. when device send refresh register

    1. Before the current one expires. Generally, halfway through the Expires time.

  5. Hi,

    Why the From and To header of a register message is same.In the other SIP messages like invite this From and To address header is different.Could you please clarify it.

    1. It’s because you are registering yourself. You aren’t registering anyone else.

      1. Hi ,

        Sorry I am a bit confused. My understanding was when a client is sending the register message the From address will contain the Client address and Register server we are requesting will be in the To address.
        If both the address contains the same address of the client , then how can it identify the register server address.

      2. lokesh loki · ·

        your AOR contains the information of REGISTRAR

  6. Indrani · · Reply

    Hi I am sending register and getting 200 OK response but i want it to get 401 first and then 200 OK.

    1. The SIP Registrar must send the 401. Perhaps there is a security setting you can enable. The client has no control over that.

  7. So when the REGISTER packet is created, let’s say using your example of:

    Contact: Andrew Prokop

    This means that the User device is aprokop and the IP of is the user’s device as well? Or is that IP the address of the proxy session manager (CSCF) that received the REGISTER? If that’s the case, then the VIA header should match the Contact IP address right?

    1. The REGISTER should contain the IP address of the device sending it. It should not be that of a proxy.

    2. jayram sahu · · Reply

      Nice explanation

  8. You said that you register to your AOR using multiple devices. Each of your device use different Call-Id and is authorized separately to add Contact biding. When one of your device sends request for current contact list (no Contact header in REGISTER), should OK response contains all bindings to AOR or just those added with corresponding Call-Id?

    1. The RFC states the following: The registrar returns a 200 (OK) response. The response MUST
      contain Contact header field values enumerating all current
      bindings. Each Contact value MUST feature an “expires”
      parameter indicating its expiration interval chosen by the

      To me, this implies all registrations for that AOR.

      1. It’s not so obvious for me. Same RFC states that ‘the registrar checks whether the Call-ID agrees with the value stored for each binding’. So bindings are somehow related with Call-IDs. I’m saying somehow because I don’t understand rest of RFC – ‘If not, it MUST remove the binding’. Why removing binding from other device? Section 10.3 of RFC… no sorry, whole RFC is clear as mud.

      2. The response MUST contain Contact header field values enumerating all current bindings (I would add) for current Call-ID. Otherwise request with Contact header * and Expiration header zero would result in removing bindings from devices which don’t know about it. Whole Expires header algorithm which gives relative time after which the message expires would break.

        Is that makes sense for you?

  9. Abhilash · · Reply

    What are the possible 4xx responses that can be sent for register request?

    1. 401 is, of course, the most common. The others would depend on the implementation. For instance, I’ve never seen a 416 sent, but I don’t see why it couldn’t be. I can also envision a server that sends a 422.

  10. durga satapathy · · Reply

    what will happen if the authentication Fail ? and how many times proxy will challenge the client??

    1. If the authentication fails, the client is not registered. The challenge is issued once for every Register.

      1. durga satapathy · ·

        thanks andrew!!

  11. Rizwan Khan Nawab John · · Reply

    Phones are constantly sending register to registrar may be once in every 10 minutes. Is this normal? What will happen when phone sends register when it has an active call? Is there a way either to stop register message once the phone is registered with controller or to increase the time between two register requests?

    1. Refreshing a REGISTER is fine. The refresh rate may be configurable, but that depends on your system.

      1. Rizwan Khan Nawab John · ·

        Thanks Andrew!
        I did set up the expiry time as 86400 in the settings file and the phone is also requesting the same to SM when it sends REGISTER. But SM reduces that time to 3600 or less. I can see it in the 200 OK message it sends after authentication. Is there a way to change that time in SM?

        Also we did not set up “SIPREGPOLICY”, so the phone is taking the default value of “alternate”, which means phones will register and maintain a session with only one controller at any given time. Provided this setup, Phone is moving to the secondary controller for some reason when there is an active call processed through primary SM. I am sure that RTP won’t drop but what will happen when I hang up the call.

        I saw a response from SM to a “BYE” from phone saying “call/transaction not available” but couldn’t conclude if it is because of the what I stated above. If the answer is yes, will it be a ghost call on that phone?

  12. medsup · · Reply

    what is happen when the SIP server respond to the Re-register with 200 OK (Authentication-info : nextnonce=xxxxxxx).

    1. That’s a new one to me. All I can think of is that it’s telling you ahead of time a nonce you can use for authentication, but that’s a guess on my part.

  13. Giorgos · · Reply

    Hi Professor,
    What if the nonce will be used by someone else before it will be used by the real client?

    1. Someone could potentially swipe the nonce, but without the password to encrypt, it’s worthless.

  14. excellent explanation. As much as I love reading your articles, have you written any books? or is there a book you could recommend?

  15. What seems that happens is that one user claims one identity, the server says I am not sure that you are the one you claim, take the keys. Oh, yes you are. You have the keys! Where am I wrong?

  16. Hi ,
    Is it ok to see a 100Trying response after a Register request?

    The flow is like:
    user sends Register
    Softswitch sends 100Trying
    Softswitch sends 401 unauthorised
    user sends Register
    softswitch sends 100 Trying
    Softswitch sends 200 OK.

    Does this flow comply with the RFC?

    The usual behavior I have seen is
    User sends Register
    Softswitch sends 401 unauthorised
    User sends Register with authentication details
    Softswitch sends 200 OK.

    1. 100 Trying is legal.

  17. Could please explain me headers from http://www.authenticcate(i.e,digest realm,qop,nonce,opaque,md5,stale)

      1. Thank you

  18. Navin kumar · · Reply

    a).in new INVITE is call -id be same,
    is c-seq will be increase by +1 or it will be different any arbitrary number
    b).is in re INVITE c-seq will increase by 1.

    in parallel search what will be c-seq number all will be same or will increased by each time each diffent invite to UAS

  19. How does it work when an endpoint registers with one transport (undefined as in your example, which equates to UDP), but then needs to communicate over TCP mid-dialog? Is it expected to re-REGISTER with transport=tcp in the contact header? I see in the specs that when a request gets within 200 bytes of maximum MTU size, that it must send over TCP instead of UDP, which seems to me to imply that the UA would not need to re-REGISTER in order to change transport mid-call from UDP to TCP. I don’t see any discussion in the specs about transport as it relates to the contact header in REGISTER messages however, and I was hoping you might be able to provide some input. Thanks!

  20. Hi, thank you for the explanation.
    Is there a timer in the RFC that defines a change the frequency of the REGISTER messages sent by an ATA when there is an 404 reply or no reply from the SSW (or anything else than 200OK)?
    The purpose is to reduce the REGISTRATION attempts when pre configuring the ATA before the service is configured in the SSW.

    1. I’m sorry, but I don’t know of any official declaration of those timers.

  21. I have a question from you Sir, if you could please answer me. I want to have 2 signalling servers for my sip based app. Actually the scenario is I m developing an IOS app where I have 2 types of call:1)free 2)paid. Both are done using SIP. And currently both are done at the same signalling server(voip.abc.com for example). I want separate signalling servers for both of these calls. like for free calls signalling server should be (voip.abcfree.com for example) and for paid calls signalling server should be (voip.abcpaid.com for example). IS IT POSSIBLE????

    1. Are you asking to register to two servers at the same time? If so, this is possible.

  22. thanks for your answer sir, but m not sure about it. Actually our current server is not that rich to handle too many calls as we have both free and paid calls on the same server. so we want to have two different/separate servers to handle calls properly without having our servers down. Free server for free calls and paid for paid calls to share the burden.

  23. How many times a Registration message can be challanged by Registrar server and How many times a user can send a register message to registrar server ?

    1. That depends on how your system is setup. SIP has no limits, but things such as SBCs can impose them.

  24. Shiva Prasad · · Reply

    Can you please expalin in detail about IPSEC Registration??

  25. Peter VERNON · · Reply

    OK So quick question, if the UA receives a 404 response to a register request what should it do?

    I’ve seen everything from never retrying to 9 times a second. Obviously the latter is a fault condition.


    1. Clearly, there is a problem that must be solved. While a retry might fix a momentary issue, it may not.

  26. Kishore G. · · Reply


    Awesome explanation.

    I am learning SIP and need to understand real message flow, is there any tool to analysis the SIP messages.

    Kishore G.

    1. Start with Wireshark.

  27. Hi Andrew,

    Suppose User A and User B is on call. And registration timer expired for User A or User B. then what is the response from server side?

    1. Since the call has already been established, I don’t see why there would be a problem. The registration would need to be refreshed before any additional calls were placed.

  28. Aditya Yadav · · Reply

    Hi Andrew,

    Thank you for this great explanation.

    Is it possible that the phone will initiate the register message from UDP random port to destination port of 5060. but the via and contact field is having 5060 in it.

    Now the server is sending back the traffic on src port 5060 and dst port 5060 ?

    I saw this behaviour in one network, where the return traffic was been dropped by the uplink firewall due to the firewall was not matching the existing session.

    Appreciate your inputs on that.

    Aditya Yadav

    1. It’s possible to do all sorts of things in software. 🙂 This one doesn’t make any sense to me.

  29. Hi Andrew,

    Can you please share Bugs related to SIP while doing testing. what types bugs did you find till now.
    i am new to learn so i wanted to know about some Bugs or defect details in IMS/Volte/SIP in any..

  30. when UDP/TCP used in VIA Header. sometimes i see TCP and Sometimes UDP in VIA header.

    can you please have a look on above question once you get a chance.

    Thanks in Advance

  31. why we used to get a 603 response from Server.

    1. That’s hard to know. Did you not pay your bills with the provider?

  32. It it mandatory to have Contact header in REGISTER message, Do we have any scenario where REGISTER can happen without Contact header

    1. Why would you even want to do that? What are you trying to accomplish?

      1. Since Contact header is not mandatory header, trying to know if we have any other mechanism for binding without Contact

      2. Justin Shariat · ·

        The purpose of Contact being an optional field in a REGISTER message is so that one can query the bindings. From RFC 3261, section 10.2.3, “Fetching Bindings”:

        “A success response to any REGISTER request contains the complete list of existing bindings, regardless of whether the request contained a Contact header field. If no Contact header field is present in a REGISTER request, the list of bindings is left unchanged.”

      3. That is true, but that is not what he is asking for. He wants to create a register bind without a Contact Header.

      4. Justin Shariat · ·

        Right, but it seems that the reason that he thinks that this might be possible is because the Contact in REGISTER is not mandatory. Bindings are definitely established using the Contact header exclusively. The Contact-less REGISTER exists simply for querying the bindings.


      5. I agree. In his original comments he indicated that he wanted a registration/binding to occur and that’s where my mind stayed. Thanks for you input!

  33. Thank you Justin and Andrew..
    “The Contact-less REGISTER exists simply for querying the bindings”

  34. ESWAR RAJU · · Reply

    Hiii I m trying to capture the call flow request and response of Volte so that i can analyse security issues, I have taken a rooted mobile and run tcp dump on rmnet1_ipa0 interface and captured the packets , but not able to get the call communication,(SIP)
    any suggestions ,how else i can do .

  35. Radoslav Ignatov · · Reply

    Hello Andrew,
    You have very nice blog that helped me a lot.
    I have a question related to registration. Is there a way to check If my registration is expired on the server? Imagine the following case. The UA is configured to send REGISTER each 60min. During these 60min the server is restarted(some failure happened for example) The UA is not registered on the SIP central and should wait for the 60min period to send the REGISTER message again. Until this happens the UA is not available. I was thinking of some pinging the server with OPTIONS request for example to check if UA is registered?

    1. An Options won’t provide registration information. I don’t know how to do this without sending another REGISTER. You may want to try the steps described here (https://tools.ietf.org/html/rfc3665#page-8), but that’s still a REGISTER.

  36. ogoooood · · Reply

    Hello Andrew,
    If subsequent REGISTER doesn’t have a same From-tag as the original registration, what will be happened?

    1. Is there a reason why you ask this?

      1. ogoooood · ·

        I found that “A UA SHOULD use the same Call-ID for all registrations during a
        single boot cycle.(10.2.4 Refreshing Bindings from RFC3261)”.
        I wonder why you wrote “Subsequent REGISTER messages must contain the same Contact, To, From, call-ID, and From tag as the original registration”.

      2. It also says, “If the same client were to use different Call-ID values, a registrar could not detect whether a delayed REGISTER request might have arrived out of order.” So, it might say SHOULD, but in practice, I think it’s the right thing to do to keep them the same.

  37. Hi Andrew,
    how can the registrar server differentiate between a re-registration and an (new) initial registration?

    The background of the question:
    When the UA during active operation receives a new IP-address then I expect that it does a initial registration to change the binding.

    1. The SIP address of record and IP address will create a unique binding. If a registration server receives a REGISTER for a tuple it isn’t already controlling, it creates a new binding. If it receives a REGISTER with an existing tuple, it extends or ends (Expires=0) a binding.

      1. That means if a UA get a new IP-address assigned it should terminate the existing binding (Expires=0) and create a new binding for the new Contact. Otherwise the registrar has two bindings where one is obsolete until it expires.
        The REGISTER request of the new Contact still uses the same Call-ID and increments the CSeq as usual for REGISTER refresh requests.

      2. I just looked at the RFC and believe that the safe behavior would be to terminate the existing registration and create a new one. It’s unclear to me what would happen if the Contact was changed for an existing binding.

  38. Jad Kammouh · · Reply

    hi Andrew,

    can you please find me an explanation of SIP Registration Message timeout.

    Thank you,

  39. Simon Newkirk · · Reply

    Great work

  40. What is the standard source code for an initial SIP REGITER request?

    1. I don’t know what you are asking for. There is no standard source code.

  41. Great explanation. Thanks.

    Once registered, how does the server trust the connection on subsequent communications, say an INVITE? Is it just based on the same IP address?

    1. Every Register is challenged. The sender must prove its identity.

  42. manish kumar · · Reply

    hi team,

    after registration of the sip then its again asking for the registration,
    kindly clarify the why is it asking again fo the registration , when it’s already registered (ok response)

    1. What do you mean by it asks for a registration?

  43. Hi Andrew,
    I’m so happy from your explanation about Sip Registration.
    So, I wanna ask some information to distinguish between initial registration and re-registration?

    Thank you,

  44. Hi Andrew,

    why the first registration is challenged?

    1. For security reasons. The sender needs to prove his or her identity.

  45. hi Andrew

    supose a phone is registered . What is the SIP message witch maitain such register?

    It will sends time to time an invite or REgister message? It is configurated?


    1. Often, they send periodic register messages.

  46. Jose Eurico Dias · · Reply

    Mny thanks Andrew. How is controled the time that is necessary to send the register?

    many thanks

    1. That is up to the call server. It sets the Expires time.

  47. Hi Andrew,

    Let’s say there are PBX, SBC and Registrar in the network

    we have Initial registration timer where the register message will forward to registrar
    and refresh registration timer where register message from PBX to SBC not going to registrar.

    refresh registration timer must be lower than Initial registration timer.

    If first registration, registrar revert back 200 OK with expiry=3600 then after 10mins refresh register message from PBX and SBC revert expiry= 240.

    In this case, PBX should follow which expiry ? or there should be two timer on PBX ?

  48. Sruthi Jacob · · Reply

    Hi Andrew,

    Could you please tell me the behavior of Registar, when the user is not periodically refreshing the register Message, what will be the action through sip message Registar will take toward the user?

    1. All subsequent non-REGISTER methods will receive a 401 response.

  49. Hello Andrew

    When you say:
    “Registrations are time-based and will eventually expire. This requires the client to periodically refresh a REGISTER with a new REGISTER. Actually, new isn’t the correct word to use for this. Subsequent REGISTER messages must contain the same Contact, To, From, call-ID, and From tag as the original registration. This allows the SIP registrar to know that it’s simply a refresh and not a new registration for the same AOR.”

    From where you got this “Subsequent REGISTER messages must contain the same Contact, To, From, call-ID, and From tag as the original registration”

    As per my understanding of RFC, from Register, To and Contact are used to create binding. And in my case, i see that for subsequent register contact, to header are same. From header is also same, but from tag is changing everytime.


    1. I no longer have a system I can test this one, but as I recall, I would send the same tag and the recipient would change it.

  50. hi!
    thank you for this articule, excellent explanation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: