Many companies rely on internet-capable phones and SIP trunking to eliminate the need for physical phone lines. With the correct infrastructure in place, a business can cut down on costs, eliminate the need for a forwarding service, and allows them to represent their company anywhere in the world. However, before any of that can happen, the company must register its system via a process called SIP registration.
Read More on Webhooks
What Is SIP?
Before diving into what SIP registration is, there should be a basic understanding of what is getting registered – SIP in this instance. SIP, or session initiation protocol, moves the voice packets between the two communicating devices, with the transportation happening via a UDP port or TCP port on port numbers 5060 or 5061, which delivers the data to the endpoint. SIP, as a protocol, brings a lot of flexibility, which is further detailed below. However, for now, one point of interest is that SIP has a general-purpose use for real-time communications, as opposed to explicit telephone use. SIP works with audio calls, along with video calls, and the ability to provide instant messaging.
UDP vs TCP
As addressed, transportation of the voice packets for SIP happens across either a UDP or TCP port. TCP, or Transmission Control Protocol, uses computers to communicate across a network. TCP delivers this data, though will perform error checking to guarantee the delivery of the packets in the order they were sent. UDP, or User Datagram Protocol, on the other hand, though similar to TCP, sends data packets to the recipient, whether they are ready to receive them or not, meaning some of the data can get lost. Though TCP can work with SIP, UDP often works better as it operates in real-time and best suited for SIP calls and VOIP overall.
Another vital component of SIP, along with SIP registration, comes in the form of SIP trunking. The SIP trunk is best compared to a physical phone line, though it is virtual instead. SIP trunking, in place, can connect multiple channels to a PBX service, though each channel needs to go through SIP registration before it works.
What is SIP Registration?
A VOIP phone connected to a PBX or any other applications that requires SIP needs to first register with a primary server. This SIP registration process allows the server to know where the phones connected to the server are, which is necessary for the server to route incoming calls to the right location. SIP registration happens each time the IP phone gets turned on because, as it requires an Internet connection, the IP address that the server uses to deduce the location can change. A device might get connected via an ethernet cable to an Internet router, then change over to a Wi-Fi network at another location, to then link to a public Wi-Fi hotspot. Each time the location changes, so will the public IP address of the device, and the SIP registration service needs to account for that. No connection means no calls, and SIP registration works to ensure that there is always a connection in place that is both secure and stable.
When it comes to registering the device, the device is known as a SIP endpoint, which comes with a SIP URI, which is a form of URL. The SIP endpoint then sends a SIP REGISTER message to the SIP domain. This exchange of messages to complete the SIP registration is called a SIP protocol.
However, SIP registration is not just limited to Internet telephony devices, as the primary SIP server may also register itself, on occasion. This SIP register request allows the SIP server to then receive incoming calls.
Related Topic: SMS Short Code and What it Can Do for a Business
Expiry Of SIP Registration
When an IP phone, or other similar devices, gets turned off, the ideal thing to happen is that it would automatically de-register from the SIP registrar server, the official name for the above-mentioned central server. Unfortunately, this is not the case as once power gets removed from a device, it stops performing any functions, including the ability to deregister. For this reason, the SIP registrar server sets an expiry time limit, which can be between 30 minutes and an hour. If the SIP client of the device doesn’t re-register when the time is up, the connection gets broken. With the connection broken, the record gets deleted. The server does this to keep an accurate record of how many clients are using the service.
Additional Article: The Inconvinience That Is the SMS Character Limit
How Does Registering A Location Help SIP Calls Reach A Device?
No matter where the phone intended to receive calls is, it should be able to receive calls. Why should a business miss out on a sale because no one could get into the office for the day? SIP registration is for this very purpose, among others. As addressed above, the IP phone sends its location to the SIP server, which then stores it. Any other SIP users can access the location server, to then acquire the details, allowing each user agent to contact each other via the IP address. However, not everyone can access these details, and in fact, it would be impractical, as the server will quickly become overwhelmed with requests from inbound calls.
The solution to this is that a SIP proxy server links external calls, made without a SIP system, to the data stored on the location server. That also works the other way around, where a SIP device will make an outgoing call by sending a request to the proxy server, which, by accessing the location server, can forward the call on to the intended recipient. In short, the SIP server, knowing the location of the SIP-enabled device, is essential to get calls to and from the device, though it also requires a SIP proxy server. Typically, a SIP proxy server and a location server will come together in the same application packet, meaning setting up such a system is easier for a business than if the two servers came as two separate entities.
Similar Topic: Push Notifications and Their Place in Marketing
But How Does The Location Server Know Which Proxy Server To Connect To?
A proxy server does not get reserved explicitly for a single SIP domain, with a proxy server hosting numerous SIP domains at any one time. Through the use of the DNS or domain name system, the location server uses the SIP domain name to assist with finding the correct proxy server. It is then the responsibility of the proxy server to locate users of the service.
What Exactly Is A SIP Proxy Server?
The above details briefly, that a SIP proxy forwards data to the location server. However, to fully understand the SIP registration, a more in-depth description is required. The SIP proxy server acts as the go-between for two SIP devices, which is the endpoint and SIP registrar in the case of SIP registration. The proxy server connects the two points and then drops out of the communication. In short, a proxy server’s purpose is to help a caller find and connect with the recipient. When a SIP phone makes a call, it will send a SIP invite request, which the proxy server will process, before connecting the call.
Though the SIP proxy server’s primary purpose is to connect two devices, it also has the responsibility of enacting a find me or follow me rule. The SIP proxy server, when configured correctly, will forward a call to multiple phones, either in a particular order or all at once. If the call doesn’t get answered in a predetermined amount of time, the proxy server can try to forward it on to another extension or on to a voice mailbox, subject to the user’s preference.
However, the SIP proxy server isn’t quite finished with its responsibilities, as it also handles security. If the caller is trying to connect to an international recipient or a number that charges to receive calls, the proxy server will check the caller’s ID and ensure there is enough credit on the SIP account, before making the call. Monitoring of the ID ensures first that the caller can pay for the outgoing call, but also confirms that the SIP user agent making the call is the user agent who initially registered with the SIP service and not an impersonator.
SIP proxy servers come with two different operating modes, known as stateless and stateful. In the stateless operating mode, the proxy server forgets, by design, each request it handles, whether that is a SIP registration request or a call forwarding request. In the stateful operating mode, the SIP proxy server will remember the entire transaction until it is complete. When the transaction finishes, the server will revert to a stateless state. A stateful proxy is necessary for performing SIP forking, which is detailed below.
As stated, the proxy server is just one link in the chain, with the redirect server, and the registrar becoming the other two pieces to form a full chain. A SIP device connects to the registrar server, which then links the device to the redirect server. The proxy server then picks up the calls and forwards them to the redirect server, which then forwards the calls to the SIP device.
Further Reading: The Ultimate Guide To The TCPA
Registering Two Or More Phones To The Same SIP Line
SIP registration makes connecting multiple devices to the registrar, with the same number, easy. The SIP account can get hosted on a desktop IP phone, a smartphone, and a laptop, all at the same time. For a business with multiple phones, this is ideal, as it allows a single SIP line to provide the entire infrastructure for the business’s communication. A potential customer calls in and then the first person to get to their phone answers the call. SIP registering two or more phones is also known as SIP forking.
SIP Registrars Provide An Extra Layer Of Security
As addressed above, SIP registering is necessary for an IP phone to work. However, it does bring additional benefits, including extra security to a user’s system. On occasion, the user agent attempting SIP registration will get challenged before the registration process is complete. A user getting challenged would go something like this, though the user experience varies depending on the SIP application getting used:
- When a user sends a register request, they also send a To and From header, both of which contain the user’s details. These details are necessary for the server to locate the device getting registered. The user can also specify how long they wish for the session to remain valid in the expires header.
- Instead of accepting the request, the registrar returns a 401 unauthorized response, with the header “WWW-Authenticate.” The header will contain data that will allow users to encrypt their usual password for registering with the server.
- The user attempting to register their device will once more submit a registration request. The authorization header will contain the encrypted password.
- The registrar will then reply with an “OK” SIP response to signify that the registration is complete. Concerning the expired header as detailed above, the header may be different than what the user requested. Usually, this happens when the expired request sent by the user is not in line with the rules of the registrar’s policy.
The actual process of SIP registration, along with additional details on the headers that make up each message, gets detailed further below.
Read Further About: Blocked SMS-The Bane of a Company’s Marketing Strategy
SIP Registration Not Successful
SIP is an ideal solution that lets modern call centers and any other type of businesses, that rely on outgoing and incoming calls, operate at maximum efficiency. However, as with all technology, things can and will go wrong. Luckily, there are a few common causes for a failed SIP registration, which can get easily addressed.
● Failure Caused by Firewall – A firewall is supposed to protect a network from external threats. On occasion, that same firewall can misidentify a service as a threat to be stopped, and step into action, causing registration to fail. To fix the problem, the firewall should either get temporarily removed until a connection gets established. Alternatively, the device’s IP address might be getting blocked by the firewall, so a user should check that’s not the case and unblock it if necessary.
● Improper Port Mapping – Port numbers get used to forward a request, such as the UDP and TCP ports mentioned above, whether it is a website function, or in this case, a customer calling in. If SIP registration fails and the firewall is not the reason, then the issue may lie with how the system was setup. Though it is not guaranteed, the SIP port that connects to a PBX system tends to be port 5060.
What Does A Successful SIP Registration Look Like?
When SIP registration takes place, headers get used to define information, as touched on above. Each SIP message as part of the registration comes with different header fields, as detailed below.
Message 1: The Initial SIP Registration Request
The initial SIP registration request gets sent by the device attempting to register so that it can connect to the SIP trunking in place.
The first header found in the first message is the Max-Forwards header. This header defines the maximum number of hops the SIP request can perform.
The next header of note in the SIP register message is the VIA header. The VIA header gets used to define three pieces of information for the registrar, the transportation method, the transaction ID, and the last SIP hop. The transaction ID allows the user’s device and the SIP proxy server to understand which request is getting handled, so the ID will always be unique.
The next headers of note are the To and From headers. As the name suggests, these headers help identify who is sending the registration request and who is receiving it. The From header contains the details of the user making the request and can include a display name. Though a display name is optional, it will provide a sense of personalization to receivers of a call made through the system, as the display name will appear as part of the caller ID. The To header represents the SIP address of the request. These headers also include the AOR or address of record, which details the entire SIP client that manages the connected devices. The AOR will remain the same in both the To and From header.
The next header in the message is the Call-ID header. The Call-ID header identifies the group of SIP messages in the exchange, with both the request and the response messages using the same header. The Call-ID is generated by taking the host device name, or IP address, and pairing it with a random string. The purpose of the Call-ID is to identify the exchange. However, the To and From headers are still required to determine the sender and recipient.
The CSeq header should also get noted, as it is this field that keeps track of the transactions made per session between the device requesting SIP registration and the server. For the first request, the field will read “CSeq: 1 Register” as it is the first message getting sent.
The last header of interest is the Contact header field. The Contact header field contains the SIP URI, which is the URL used to connect to the SIP endpoint. All devices, whether IP phones, laptops, and smartphones, provided they get connected to the PBX, will get hosted by this URL.
Message 2: The Authentication Challenge
As addressed above, sometimes, SIP registration will require authentication. The authentication challenge register message will come with headers, like the above message, and is titled “401 Unauthorized.” The primary header is the WWW-Authenticate header field, which will contain all the information needed for a user to authenticate their system before the registration can go through. This header will come with a variety of sub-headers, including:
● Realm – The SIP realm is the component that defines the username and password for the domain protecting the SIP registration. Though it can be the same, the domain is not necessarily the SIP domain the client is using.
● QoP – QoP, or quality of protection, is an optional field that defines, as the name suggests, the quality of protection the authentication will provide. The two options are either a simple authentication or authentication and integrity. The phrases “auth” and “auth-int” are used respectively, depending on the SIP provider’s preference.
● Nonce – A nonce, or number once, is a number that’s used once for encryption. The number gets used to encrypt the credentials sent for the authentication, though the number is different each time registration happens. After its use, the number becomes useless, meaning if someone managed to get hold of it, and thus the encrypted username and password, it wouldn’t do them any good.
● Opaque – The opaque field is another optional field. The contents get generated by the server and can get kept in further requests, though many prefer to leave it blank.
● Stale – The stale field, is once more, optional. It gets used to indicate whether the nonce is still valid. If not, the nonce is considered stale, hence the name of the field.
Message 3 – Authenticated SIP Registration Request
Message 3 in the exchange will be precisely the same as message 1, though, with two differences. As the message is in response to the authentication request, it will have the authentication header, filled out, and placed in the request. The message will also have the Cseq count listed as 2, as this is effectively a new request, though authenticated.
Message 4 – The Ok Message
The last message in the chain is the OK message that confirms the registration is complete, and the registered device is ready to receive calls. The message will read “200 OK.”
SIP Registration Led To VOIP Becoming Global
Upon its conception, SIP was not the only way a business could utilize voice over IP communications. There was competition from a variety of similar services, with minimal differences between them all. Calling worked the same over all the variants, without much difference in call quality, with the same codecs used to process the audio. There is a reason that SIP came out on top in the end, and that reason is that SIP gave more control to the endpoint devices. However, another reason as to why SIP became the preference, was due to SIP registration.
Before SIP, all other voice technologies, internet-capable or not, worked on the basis that all numbers got connected to a physical location. A static-IP address provided the fixed location for the other IP services. However, as more businesses began to use IP phones, they each needed a static-IP, which soon became costly, so SIP soon became preferable, as it worked with any device that was SIP capable.
As discussed, SIP registration allows a SIP line to work, no matter where the phone is. SIP registration brought mobility to a business’s contact solution, which was something missing from the services offered by similar systems. That’s not to say that other IP telecommunications systems didn’t allow for multiple phones, though any off-premise phones would need configuring, as opposed to just picking up the phone. One example that does that and the closest comparison to SIP is MGCP or Media Gateway Control Protocol.
MGCP is a communications protocol that converts the audio signals carried on traditional telephone circuits into data packets transmitted over the internet, ultimately leading to the ability to perform VOIP calls. MGCP thus allows a user to have a centralized admin interface to handle all incoming communications, along with the ability to scale the incoming call lines, to the amount the call agent could handle. And though that sounds great, MGCP is getting phased out, with fewer service providers offering support for the protocol. It does not support caller id and has proven challenging to troubleshoot, both of which are two things SIP does as standard.
SIP is more customizable than alternative competitors. It is also more affordable, secure, and provides unified communications. For those reasons, along with the rest listed above, and many more, SIP is something a company that relies on telephony services and other forms of communication, should invest in. To do that, however, those same companies need to understand how SIP registration works. Without SIP registration done correctly, all the implemented communications infrastructure will go to waste.