Understanding SIP CANCEL | Tao, Zen, and Tomorrow

08 Jul.,2024

 

Understanding SIP CANCEL | Tao, Zen, and Tomorrow

As I have said on a number of occasions, I occasionally teach a two and half day SIP class. While that&#;s hardly enough time to become a SIP expert, my students always leave with more than enough knowledge to make educated decisions in regards to SIP endpoints, applications, and trunks. Although some may never again have a compelling reason to use Wireshark to trace SIP call flows, just knowing that they can is often good enough.

For more information, please visit Sip Termination Provider.

Every class is different and no two students are alike, but I find commonality in the things that they absorb quickly and the things that require a little more explanation. One of those from the latter camp is the CANCEL request.

On the surface, CANCEL doesn&#;t sound too complicated, but there are a few aspects that are a wee bit confusing.

Before I delve into the details, let&#;s take a look at a basic call flow.

Andrew placed a call to Jennifer and Jennifer answered.  They spoke for a while, but eventually Jennifer grew weary of speaking to Andrew (who can blame her?) and released the call. The session began with INVITE and ended with BYE. Pretty typical stuff.

Note that BYE is used to shut down an established session. In SIP speak, an established session is one that received a final response of 200 OK.

Let&#;s look at a different scenario. Imagine that Andrew calls Jennifer, but this time Jennifer doesn&#;t answer the . Andrew could wait until the call rolls to voice mail, but he doesn&#;t like leaving messages so he simply hangs up the call.

What happens now? I told you that BYE is used to release an established session, but clearly this call hasn&#;t received a final response. Jennifer&#;s is still ringing and on the verge of rolling over to voice mail.

This is where CANCEL comes in. Unlike a BYE, CANCEL shuts down a session that has not received a final response.

So, what does this new call flow look like?

The CANCEL informs Jennifer that Andrew is releasing the session prematurely and Jennifer needs to do the same on her end. In other words, Jennifer&#;s should stop ringing and return to an idle state.

It&#;s important to realize that the 200 OK in the call flow is not for the INVITE. Rather, it&#;s Jennifer acknowledging that she received the CANCEL and has begun the process of tearing down the session. She does this by stopping the ringing and returning a 487 Request Terminated to Andrew. The 487 is the final response for the INVITE sequence.  This causes Andrew to respond with an ACK.

It&#;s absolutely crucial that the 487 be sent. Otherwise, Andrew (and any stateful proxies between Andrew and Jennifer) will not properly release the session.

Call Forking

CANCEL is essential to call forking. Call forking occurs when someone calls a user that is registered to two or more devices at the same time. Every registered device will ring, but only one can be answered. This means that the remaining ringing calls must be cancelled.

Unlike the situation where Andrew releases the unanswered call to Jennifer, Andrew does not send the CANCEL(s). In fact, Andrew doesn&#;t even know that all those devices are ringing because call forking is performed by a SIP proxy on Andrew&#;s behalf. All that he knows is that he made a call, something rang, and the call was answered.

This means that the proxy will send CANCEL messages to all remaining ringing devices after the call is answered.

In the context of Avaya, the SIP proxy is a Session Manager and call forking is supported by the multiple registration feature. This feature allows a single user to register up to ten devices at time. I personally register four devices &#; my desk , One-X Mobile for IOS, One-X Communicator on my PC, and Flare Experience for iPad.

Well, that&#;s it. Remember, BYE is not CANCEL and CANCEL is not BYE. They both perform the task of releasing sessions, but it&#;s all about when those sessions are released. Thankfully, this is done in software and the user simply hangs up the and lets SIP do the rest.

Share this:

Like

The company is the world’s best Itniotech - Notification SMS supplier. We are your one-stop shop for all needs. Our staff are highly-specialized and will help you find the product you need.

Loading...

SIP trunking and DID: Everything you need to know

If you look up VoIP systems, you&#;ll probably come across SIP trunking and DID. Session Initiation Protocol (SIP) and Direct Inward Dialing (DID) are foundational elements of VoIP systems; they work together to make calls over the internet.

According to Yahoo Finance, the SIP trunking market will reach $23.58 billion in . More businesses are switching from traditional communication systems to SIP because of its relatively low cost and higher audio and video quality.

As businesses move to VoIP systems, it&#;s valuable to understand how their underlying technologies function. It&#;s even more crucial if you plan on transitioning from legacy systems to VoIP because acquiring DID numbers and configuring a SIP connection is required to set up your voice communications.

In this guide, we&#;ll explore these technologies and how they work together to scale voice communications and drive business efficiency.

What is SIP trunking?

SIP trunking is a signaling protocol that connects lines to the internet. It&#;s an alternative to a Primary Rate Interface (PRI), the communication system that transmits calls to the Public Switched Network (PSTN).

While a PRI uses a physical connection (like copper wires) to transmit calls, a SIP trunk operates virtually by sending data over the internet, via an ethernet or fiber connection. This makes it easier to reduce or expand lines according to your business needs.

What is Direct Inward Dialing (DID)?

A DID is a service that enables businesses to receive inbound calls without the use of extensions or operators. They&#;re essentially virtual numbers that companies supply employees to connect to specific phones. Cost-efficient and easy-to-use, DID&#;when paired with SIP trunking&#;eliminates the need to build physical lines.

How do DID numbers work with SIP trunking?

In short, your DID number identifies a specific and your SIP trunk is the connection between that and the internet. When someone calls a DID, the SIP trunk connects the call to the internet, and the DID routes the call to the correct .

Since DID numbers are virtual, they can be assigned or reassigned to any or device. They&#;re also flexible, meaning businesses can create unlimited DID numbers on a single SIP trunk, with few limitations.

The only caveat is the bandwidth of your internet connection, and even that isn&#;t a barrier to the volume of DID numbers you can have on a SIP trunk. Your bandwidth only limits the number of simultaneous calls you can make.

This is why it&#;s almost always simpler and more cost-efficient to use a single provider for both your DID numbers and SIP trunking connection. Otherwise, you may pay higher prices for each DID number&#;which adds up the more numbers you purchase. DID numbers coupled with SIP trunking is a cost-efficient option that produces high-quality calls. But there is another, more traditional solution.

Extension numbers vs. DID

When you use DID, you receive a unique number for each of your phones. Callers can simply dial the number, and the call will be routed to the associated .

The alternative is extension numbers. Extension numbers are common with legacy systems in which operators are responsible for manually routing calls.

With extension numbers, businesses own a single or a few numbers. These numbers connect to a central routing hub and each has an associated extension number, usually 3 or 4 digits.

When someone calls one of your numbers, they&#;re prompted to enter an extension number to connect to an employee or department. If they don&#;t know the extension, they&#;re usually connected to a customer service representative to help route the call.

This system works. But it&#;s not as efficient as dialing a direct number without extensions or customer service intervention. Using DID numbers makes the calling experience more enjoyable and reduces the resources you need to build a infrastructure.

The main benefit of using DID numbers over traditional numbers is that it&#;s easier and more affordable to add additional phones and numbers. Expanding traditional infrastructure often requires running new physical wires. With DID, you can add many numbers on a single internet connection as long as you have the bandwidth to support calls.

Here are some popular uses cases for DID numbers:

  • PBX systems: PBX systems are comprised of many phones and require many numbers to operate. Without DID numbers, callers dial a central business and an extension number so the call is routed to the appropriate line. Operators may also intervene to connect callers with employees. Incorporating DID numbers into your PBX system is more straightforward. You can assign unique numbers to each so callers can directly reach employees&#;even if their is connected to your PBX system.

  • Multi-department business phones: Traditionally, businesses use a touch-tone or Interactive Voice Response (IVR) menu to route department calls. Incoming callers dial in and a pre-recorded voice presents them with information and prompts that lead them to specific departments. This is a common practice, but it&#;s not always enjoyable for customers, especially when they navigate complicated menu items for simple questions. When you provide a DID number to each department, customers connect directly to each of your departments, making it a smooth and positive experience.

  • Communication apps: Messenger, over-the-top (OTT) communication apps and VoIP softphones can use DID numbers to produce more familiar calling experiences. Even though users connect to your business through an app, it&#;s similar&#;if not almost identical&#;to making a standard call.

  • Fax: You can connect fax machines to PBX systems or use them to take orders or send documents to your departments. A DID allows you to assign unique numbers to your fax machines, instead of using a central number and a fax extension.

The use cases for DID numbers are endless and using DIDs can be the best solution for routing calls to different phones.

Where to purchase DID SIP numbers

The simple answer is you get DID numbers from VoIP DID providers. The more complex part is figuring out which providers will help you meet your goals. Here are a few questions you should consider when choosing a VoIP DID provider.

  • Does the DID provider offer a SIP trunk connection? This is usually more affordable, simplifies your infrastructure, and reduces how many invoices you manage each month.
  • Does the provider own and operate their IP (Internet Protocol) network? When a provider owns and operates their IP, they can easily troubleshoot connection problems on their network. A private network is also more secure and bypasses congestion on the public internet, resulting in lower latency, higher quality calls.

Telnyx: Your all-in-one DID and SIP trunk provider

Looking for a VoIP DID provider that passes both of these tests with flying colors? Connect with a Telnyx expert and find out how easy it is to get DID numbers through the Telnyx Mission Control Portal (hint: it only takes a few clicks). You can also get started with SIP trunking with our self-service guide.

Contact our team of experts to start setting up your voice communications with carrier-grade quality and global reach.

If you want to learn more, please visit our website Itniotech - Verification SMS.