3CX FAQ: All About SIP

3CX FAQ: All About SIP

On February 7, 2018, Posted by , In 3CX, With No Comments

Can You List All Known SIP Responses?

SIP responses are the codes used by Session Initiation Protocol for communication. We have put together a list of all the SIP responses known.

1xx = Informational SIP Responses

  • 100 Trying – Extended search is being perform so a forking proxy must send a 100 Trying response.
  • 180 Ringing – The Destination User Agent has received the INVITE message and is alerting the user of call.
  • 181 Call Is Being Forwarded – Optional, send by Server to indicate a call is being forwarded.
  • 182 Queued – Destination was temporarily unavailable, the server has queued the call until destination is available.
  • 183 Session Progress – This response may be used to send extra information for a call which is still being set up.
  • 199 Early Dialog Terminated – Send by the User Agent Server to indicate that an early dialog has been terminated.

2xx = Success Responses

  • 200 OK – Shows that the request was successful
  • 202 accepted – Indicates that the request has been accepted for processing , mainly used for referrals.
  • 204 No Notification – Indicates that the request was successful but no response will be received.

3xx = Redirection Responses

  • 300 Multiple Choices – The address resolved to one of several options for the user or client to choose between.
  • 301 Moved Permanently – The original Request URI is no longer valid, the new address is given in the Contact header.
  • 302 Moved Temporarily – The client should try at the address in the Contact field.
  • 305 Use Proxy – The Contact field details a proxy that must be used to access the requested destination.
  • 380 Alternative Service – The call failed, but alternatives are detailed in the message body.

4xx = Request Failures

  • 400 Bad Request – The request could not be understood due to malformed syntax.
  • 401 Unauthorized – The request requires user authentication. This response is issued by UASs and registrars.
  • 402 Payment Required – (Reserved for future use).
  • 403 Forbidden – The server understood the request, but is refusing to fulfill it.
  • 404 Not Found – The server has definitive information that the user does not exist at the (User not found).
  • 405 Method Not Allowed – The method specified in the Request-Line is understood, but not allowed.
  • 406 Not Acceptable – The resource is only capable of generating responses with unacceptable content.
  • 407 Proxy Authentication Required – The request requires user authentication.
  • 408 Request Timeout – Couldn’t find the user in time.
  • 409 Conflict – User already registered (deprecated)
  • 410 Gone – The user existed once, but is not available here any more.
  • 411 Length Required – The server will not accept the request without a valid content length (deprecated).
  • 413 Request Entity Too Large – Request body too large.
  • 414 Request URI Too Long – Server refuses to service the request, the Req-URI is longer than the server can interpret.
  • 415 Unsupported Media Type – Request body is in a non supported format.
  • 416 Unsupported URI Scheme – Request-URI is unknown to the server.
  • 417 Uknown Resource-Priority – There was a resource-priority option tag, but no Resource-Priority header.
  • 420 Bad Extension – Bad SIP Protocol Extension used, not understood by the server.
  • 421 Extension Required – The server needs a specific extension not listed in the Supported header.
  • 422 Session Interval Too Small – The request contains a Session-Expires header field with duration below the minimum.
  • 423 Interval Too Brief – Expiration time of the resource is too short.
  • 424 Bad Location Information – The request’s location content was malformed or otherwise unsatisfactory.
  • 428 Use Identity Header – The server policy requires an Identity header, and one has not been provided.
  • 429 Provide Referrer Identity – The server did not receive a valid Referred-By token on the request.
  • 430 Flow Failed – A specific flow to a user agent has failed, although other flows may succeed.
  • 433 Anonymity Disallowed – The request has been rejected because it was anonymous.
  • 436 Bad Identity Info – The request has an Identity-Info header and the URI scheme contained cannot be de-referenced.
  • 437 Unsupported Certificate – The server was unable to validate a certificate for the domain that signed the request.
  • 438 Invalid Identity Header – Server obtained a valid certificate used to sign a request, was unable to verify the signature.
  • 439 First Hop Lacks Outbound Support – The first outbound proxy doesn’t support “outbound” feature.
  • 470 Consent Needed – The source of the request did not have the permission of the recipient to make such a request.
  • 480 Temporarily Unavailable – Callee currently unavailable.
  • 481 Call/Transaction Does Not Exist – Server received a request that does not match any dialog or transaction.
  • 482 Loop Detected – Server has detected a loop.
  • 483 Too Many Hops – Max-Forwards header has reached the value ‘0’.
  • 484 Address Incomplete – Request-URI incomplete.
  • 485 Ambiguous – Request-URI is ambiguous.
  • 486 Busy Here – Callee is busy.
  • 487 Request Terminated – Request has terminated by bye or cancel.
  • 488 Not Acceptable Here – Some aspects of the session description of the Request-URI are not acceptable.
  • 489 Bad Event – The server did not understand an event package specified in an Event header field.
  • 491 Request Pending – Server has some pending request from the same dialog.
  • 493 Undecipherable – UndecipherableRequest contains an encrypted MIME body, which recipient can not decrypt.
  • 494 Security Agreement Required – The server has received a request that requires a negotiated security mechanism.

5xx = Server Errors

  • 500 Server Internal Error – The server could not fulfill the request due to some unexpected condition.
  • 501 Not Implemented – The SIP request method is not implemented here.
  • 502 Bad Gateway – The server, received an invalid response from a downstream server while trying to fulfill a request.
  • 503 Service Unavailable – The server is in maintenance or is temporarily overloaded and cannot process the request.
  • 504 Server Time-out – The server tried to access another server while trying to process a request, no timely response.
  • 505 Version Not Supported – The SIP protocol version in the request is not supported by the server.
  • 513 Message Too Large – The request message length is longer than the server can process.
  • 580 Precondition Failure – The server is unable or unwilling to meet some constraints specified in the offer.

6xx = Global Failures

  • 600 Busy Everywhere – All possible destinations are busy.
  • 603 Decline – Destination cannot/doen’t wish to participate in the call, no alternative destinations.
  • 604 Does Not Exist Anywhere – The server has authoritative information that the requested user does not exist anywhere.
  • 606 Not Acceptable – The user’s agent was contacted successfully but some aspects of the session description were not acceptable.

What are SIP Phones?

Simply put, a SIP Phone is a phone that uses the Open Standard “SIP” to set up and manage phone calls. The actual voice is carried over an IP-based network using another Open Standard called “RTP“. Since these protocols are generically termed “VoIP” (voice-over-internet-protocol), these phones are also sometimes called VoIP Phones or VoIP Clients.

SIP Phones can be classified in 2 main categories:
  • Hardphones or Deskphones or Hardware SIP Phones
  • Softphones or Software SIP Phones

HardPhones

A HardPhone looks like a regular telephone, and indeed behaves as one. However, the hardware is built using network-aware, or more specifically, IP-aware components. The hardphone will connect to an IP-Network using regular ethernet cables or using WiFi. Cordless hardphones are also available, and these devices take another industry standard cordless technology called DECT, so that the phones communicate with a base station using the DECT protocol, while the base station communicates with an IP-PBX using SIP and RTP as their transport protocols.

SoftPhones

A SoftPhone is quite simply what their name implies – a software program that provides telephone functionality. Again, a softphone will, just like a hardphone, use the Open Standards protocols SIP and RTP for call setup and voice delivery. Any computing device such as:
  • Desktop computers (Windows, Mac, Linux)
  • Tablets (Android, iOS)
  • Smartphones (Android, iOS)

…can run softphone programs, providing a very wide array of options from which to choose. Any computer or smart device that has a microphone and speakers (or a headset) can double up as a softphone. The only pre-requisite is an IP-based connection to a VoIP Provider or a SIP Server, often in the form of an IP-PBX.

SoftPhone Benefits

Using a softphone allows us to make better use of computing resources, but a more important benefit is actually the fact that it is software-based. The limit of the functionality that can be added to a softphone is limited to the software developer’s imagination, allowing him to create powerful visual tools for the user, integrate into other systems using the softphone itself as the intermediary, and so on…

3CX can be used with most popular hardware SIP Phones, but also comes with a completely FREE software-based SIP Phone that showcases the benefits of a softphone, with extended functions which are not possible to achieve with a hardphone.

An Example of SIP Call Session Between Two Phones





A SIP call session between two phones is established as follows:
1. The calling phone sends out an INVITE.
2. The called phone sends an information response 100 – Trying – back.
3. When the called phone starts ringing a response 180 – Ringing – is sent back.
4. When the caller picks up the phone, the called phone sends a response 200 – OK.
5. The calling phone responds with ACK – acknowledgement.
6. Now the actual conversation is transmitted as data via RTP.
7. When the person calling hangs up, a BYE request is sent to the calling phone. 8. The calling phone responds with a 200 – OK.

It’s as simple as that! The SIP protocol is logical and very easy to understand.

What SIP-based IP PBXs are Available?

This list shows some of the currently available SIP-based IP PBXs in the telco sector:
  • 3CX Phone System – a cross-platform IP PBX that runs on Windows and Linux. Watch the video Why Choose 3CX Phone System. 3CX offers benefits over other vendors, such as:
    • Easy to deploy both in-house and in-cloud
    • Automation for in-cloud deployment to top-tier hosting platforms such as Google and Amazon
    • Best-of-breed phone provisioning automation
    • Robust feature-set, including:
      • IVR
      • VoiceMail
      • Queues
      • Groups
      • User-based and Group-based rights management
      • Security and Anti-Hacking
  • Asterisk – a Linux based IP PBX
  • sipX – another Linux based IP PBX
  • Elastix – Linux Based PBX
  • Brekeke PBX, and others.

A number of open-source alternatives are available, but these all suffer from:
  • hard-to-use interface
  • poor or non-existent provisioning tools
  • limited or non-existent commercial support
  • feature set NOT driven by market needs, but by the wants of the individuals that contribute the code

What is a SIP Server?





A SIP server is the main component of an IP PBX, and mainly deals with the management of all SIP calls in the network. A SIP server is also referred to as a SIP Proxy or a Registrar.

Although the SIP server can be considered the most important part of a SIP-based IP-PBX phone system, it only handles or manages sessions; more specifically, a SIP Server can:
  • Set up a session between two (or more) endpoints (an audio conference would have more than two endpoints)
  • Negotiate the media parameters and specifications for the session for each endpoint using the SDP protocol
  • Adjust the media parameters and specifications of a session DURING the session (putting a call on hold, for example)
  • Substituting one endpoint with a new endpoint (call transfer)
  • Terminate a session

The SIP server does not actually transmit or receive any media – this is done by the media server in using the RTP protocol. Within the context of an IP-PBX environment, it is almost always true that the SIP server and its Media server companion reside on the same machine.

Do keep in mind, however, that very-high-volume SIP servers (such as a large VoIP Provider, for example), may separate their Media server to a different machine to better handle the workload, and could also possibly distribute the load to multiple Media servers.

SIP Phones / VoIP Phones Types

A VoIP Phone System requires the use of SIP phones / VoIP phones. SIP phones come in several versions and types:

SIP / VoIP Soft Phones – Software Based SIP Phone

A software-based SIP phone is an application which makes use of your computer’s microphone and speakers or an attached headset to allow you to make or receive calls. An example of a SIP phone is 3CX’s own SIP clients, which are free to use for all 3CX 12 and above users.

3CX SIP clients for Windows, Android and iPhone


Hardware SIP Phone

A hardware-based SIP phone looks and behaves just like a normal phone. However, it is connected directly to the data network, rather than to standard PSTN line(s). These phones have an integrated mini hub, so that they can share the network connection with the computer, which means you don’t need an additional network point for the phone. Examples of hardware SIP phones are snom and Yealink IP phones which work seamlessly with 3CX.



Use an Analog Phone via an ATA Adapter

If you want to use your current phone with the VoIP phone system, you can use an ATA adapter. An ATA adapter allows you to plug in the ethernet network jack into the adapter and then plug the phone into the adapter. Your old phone will appear to the VoIP phone system software as a regular SIP phone. VoIP phones are very inexpensive to buy and can bought online via one of the many VoIP product online shops. 3CX supports all popular VoIP phones as it’s based on the Open SIP Standard. You can even automatically provision most IP phone models too.

What is SIP – Session Initiation Protocol?

SIP (Session Initiation Protocol) is a signalling protocol used to establish a “session” between 2 or more participants, modify that session, and eventually terminate that session. It has found its MAJOR use in the world of IP Telephony. The fact that SIP is an open standard has sparked enormous interest in the telephony market, and manufacturers shipping SIP-based phones have seen tremendous growth in this sector.

The SIP Protocol is text-based, and bears significant resemblance to the HTTP protocol. The messages are text-based, and the request-response mechanism makes for easier troubleshooting. The actual data transmission is done by the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP) on layer 5 of the OSI model. The Session Description Protocol (or SDP) controls which of the protocols is used.

The SIP messages describe the identity of the participants in a call, and how the participants can be reached over an IP network. Encapsulated inside the SIP messages we can sometimes also see an SDP declaration. SDP (Session Description Protocol) will define the type of media channels that will be established for the session – typically this will declare which codecs are available, and how the media engines can reach each other over an IP network.

Once this exchange of setup messages is completed, the media is exchanged using yet another protocol, typically RTP (Real-Time Transmission Protocol). SIP was developed by the IETF and published as RFC 3261, and its flexibility has allowed it to replace almost completely the H.323 protocol in the VoIP world.

What is SIP Forking?

SIP forking refers to the process of “forking” a single SIP call to multiple SIP endpoints. This is a very powerful feature of SIP. A single call can ring many endpoints at the same time.



With SIP forking you can have your desk phone ring at the same time as your softphone or a SIP phone on your mobile. For example, you would use SIP forking to ring your desk phone and your Android SIP Phone at the same time, allowing you to take the call from either device easily. No forwarding rules would be necessary as both devices would ring. In the same manner SIP forking can be used in an office and allow the secretary to answer calls to the extension of his/her boss when he is away or unable to take the call.

What are SIP Methods / Requests and Responses?

SIP uses Methods / Requests and corresponding Responses to communicate and establish a call session.



SIP Requests:

There are fourteen SIP Request methods of which the first six are the most basic request / method types:
  • INVITE = Establishes a session.
  • ACK =Confirms an INVITE request.
  • BYE =Ends a session.
  • CANCEL =Cancels establishing of a session.
  • REGISTER =Communicates user location (host name, IP).
  • OPTIONS =Communicates information about the capabilities of the calling and receiving SIP phones.
  • PRACK =Provisional Acknowledgement.
  • SUBSCRIBE =Subscribes for Notification from the notifier.
  • NOTIFY =Notifies the subscriber of a new event.
  • PUBLISH =Publishes an event to the Server.
  • INFO =Sends mid session information.
  • REFER =Asks the recipient to issue call transfer.
  • MESSAGE =Transports Instant Messages.
  • UPDATE =Modifies the state of a session.

SIP Responses:

SIP Requests are answered with SIP responses, of which there are six classes:
  • 1xx =Informational responses, such as 180 (ringing).
  • 2xx =Success responses.
  • 3xx =Redirection responses.
  • 4xx =Request failures.
  • 5xx =Server errors.
  • 6xx =Global failures.

What are SIP trunks?

SIP trunks are telephone line trunks delivered over IP using the SIP protocol. Using this standard protocol, telecom service (VoIP) providers connect one or more channels to the customer’s PBX. Phone numbers and DIDs are linked to the SIP trunk. In many cases numbers can be ported to the SIP trunk.

Benefits of SIP trunking

But our farewell to the PSTN brings many benefits. SIP trunks deliver:
  • Lower monthly Line & DID Rental The monthly fee to have a number of lines installed at your office drops significantly with SIP trunks. And DIDs cost a lot less.
  • Lower call charges –There are many SIP trunk providers and competition has driven down call charges significantly. Some SIP trunks even come with unlimited calling.
  • Better customer service –Provide better customer service by adding more geographical and international numbers. Quickly and easily add numbers to your SIP trunk and terminate them on your IP PBX – you can give customers more options to dial in at a significantly lower cost. Customers can contact you more easily and sales will increase.
  • Move offices and keep the same number –SIP trunks are not bound to a location, so it’s easy to move offices without having to change your stationary or inform your customers. There is no longer any need to pay to forward phone calls to the new offices.
  • Eliminate VoIP Gateways –SIP trunks will eliminate the need to buy and manage VoIP Gateways. All phone calls come in via IP. No extra conversion often means better quality too.
  • Leverage a modern IP PBX –Modern IP PBX / Unified Communications solutions will give customers increased productivity, mobility and boost sales. Connecting an IP PBX to SIP trunks is much easier than via the PSTN.
  • Flexibility –It is easy to add channels to your SIP trunk to cope with increased calls. A simple phone call will allow you to add channels, and often this can be done immediately. Compare that to the delay in having additional lines installed and then having to upgrade your old PBX to handle more lines!
  • Correct number of channels –With SIP trunks, you can easily choose the correct number of channels that you need. Using ISDN/T1, you often have to choose to add either 15 or 30 lines. This usually means you end up with expensive extra capacity.

What is a SIP-URI?

A SIP-URI is the SIP addressing scheme that communicates who to call via SIP. In other words, a SIP URI is a user’s SIP phone number. The SIP URI resembles an e-mail address and is written in the following format:

SIP-URI = sip:x@y:Port where x=Username and y=host (domain or IP)

Note:If you do not specify a port, the default sip port will be assumed (5060). This is shown in the first two examples below. If you have changed the default SIP port to something else then you need to specify it in the SIP-URI (third example below).

Examples:
1. sip:joe.bloggs@212.123.1.213
2. sip:support@phonesystem.3cx.com
3. sip:22444032@phonesystem.3cx.com:6000

The SIP URI scheme has been defined in the RFC 3261 standard. 3CX uses SIP URIs.
Comments are closed.