Stories linking everyone in Telecom
Routing Engine CPaaS Routing Cover

PortaOne Routing Engine: Your Secret CPaaS Call Routing Hack

Table of Contents

Let’s start with something (even) more important than proper CPaaS call routing. We are happy to report that all of our PortaOne Ukrainian team members are safe, including those fighting the aggressors on the battlefield. Most team members wanted to stay in the country, despite our offer to help relocate anyone who wanted to go. And despite the month-long shelling of our Chernihiv and Sumy offices by Russian artillery and rockets, our team reported zero downtime for PortaOne support services. PortaOne is growing, and our sales team just finalized new deals in South Africa and Singapore.

Your continued support of our business is so important. It pays wages in Ukraine and allows us to export a high-quality, Ukraine-made telecommunications product—namely, PortaSwitch. Warmongers come, and warmongers go. Companies that help people communicate and that provide excellent CPaaS call routing are here to stay and grow.

Many friends, clients, and colleagues have been asking us: “How does it feel?” This standup performance by Anton Tymoshenko answers that question with a decent sense of (black) humor. 

Soon, we’ll post a detailed story on how our offices in Chernihiv and Sumy survived the first months of the war. For now, let’s return to what this story is really about: flexible CPaaS call routing. This is something that’s essential in speeding up the CPaaS transformation in telecom. And we’ve discovered that our own approach to call routing is something that makes PortaSwitch a unique and powerful solution for any business targeting customers outside of the “established” telecom markets (meaning: Europe and North America). These “untapped El Dorados” are the most exciting markets when measured by product growth amplitude.

Why Does Flexible CPaaS Call Routing Matter?

Imagine you have a client launching an e-commerce platform. Or even (let’s make it more interesting) a dating website. Your client wants each user to be able to call via mobile or landline. But here’s the catch: they can’t ever see each other’s real phone number.

Now imagine your client’s launch market is an emerging economy with 100M+ potential clients. In such a region, you’ll likely have a hard time finding a reliable telco partner. (Namely, one that can both provide enough “temporary” numbers and deliver good-quality calls at a decent cost.) What you will likely find is several competing telco operators with varying commercial conditions and network quality.

A Rapid Change of Circumstances (on the Carrier’s Behalf)

In the 2020s, very few businesses are going to implement their own telecom stack. That would be like launching a telco when you are a hospital or an insurance company. On the other hand, developments like VoIP, the messengers’ zoo, customers spoiled with total customization, and the conversion miracles of CRM now require businesses to align with modern communication APIs. Communication platform as a service (CPaaS) provides this flexibility. It also spares the CPaaS customer from the toils of server and software maintenance.

Today’s world is one of international calling, with rapidly changing pricing and availability and a wide range of carriers offering calls to the same destination (e.g., +38046 is Chernihiv, Ukraine). That has made it pretty easy to make pricing mistakes that lead to big business losses.

Here’s an example. Say you rely on Carrier ABC to deliver calls to Chernihiv, Ukraine, and the price set by the carrier is $0.10. So, you’re selling to customers at a rate of $0.11 per minute, generating a 10% gross margin. Sounds good? Now imagine the carrier increases the price to $0.12. If your sales team does not notice and adjust the customer rates accordingly, you’ll lose one cent on every minute of your customers’ calls. If you carry 1M minutes per month, that’s a $10,000 loss.

The Profit Guarantee

Our flexible CPaaS call routing will let you select the optimal path for your business and do the correct math by applying routing plans with a profit guarantee. In our example, that would mean using only carriers with a per-minute price less than $0.11, your selling rate. In short, your business avoids losses even if, say, someone forgets to adjust the rating table. Plus, our adaptive routing helps you monitor network quality and deliver your best expected performance. If your termination partner fails to perform, it will recognize this and automatically adjust your routing algorithm.

The Robin Hood 🏹 of Modern CPaaS Call Routing

The business idea behind our PortaOne Routing Engine is to provide you with flexible CPaaS call routing by enabling multiple carriers to serve a particular call direction. Mostly, this relates to calls originating from IP phones, dialer apps on smartphones, CRM systems, and other VoIP end-points, and going to traditional telecom networks such as landlines or mobiles. So far, WhatsApp, Messenger, Skype, and other VoIP/OTT nouveau riches don’t allow interconnection via their proprietary voice protocols. Why? In one word: greed. Google, Meta, and Microsoft are still hoping to score a “decisive victory” and become the king of VoIP.

Microsoft did recently take a more modest approach with Teams. And it’s already paying them back. So, the Routing Engine allows you to provide the best connection quality to your clients for the best price.

We invite those of you eager to dive deeper into PortaSwitch carrier management to watch our video tutorial by our wonderful Tanya Zablotski. This tutorial lays out all the details of our CPaaS call routing.

The system owner (hello, that’s you) interacts with our Routing Engine via the PortaSwitch customer interface. There, you can tweak the routing criteria according to your business needs. If you don’t set any criteria, we have defaults in place. Here’s the gist: as soon as a caller initiates a call to CPaaS that’s served by a PortaOne installation, our SIP proxy starts handling it. First, the proxy requests the list of available routes for the caller-asked direction. Then, the PortaOne Routing Engine pulls the routing criteria and the list of carriers (or “vendors” in accounting terms) available for the requested direction.

How Does the PortaOne CPaaS Call Routing Engine Work?

PortaOne Routing Engine. Overall Call Routing Process

Phase 1: Configuration

  1. System Owner analyses her commercial arrangements and defines the routing criteria via PortaSwitch Customer Interface.
  2. PortaSwitch Customer interface stores routing criteria created by the System Owner to the database alongside with other info about carriers.

Phase 2: Call processing

  1. The Caller places a call to a CSP served by PortaSwitch.
  2. SIP Proxy requests billing authorization from the Routing Engine for a call to proceed. 
  3. The Routing Engine retrieves routing criteria and a list of the carriers available for this direction from the database.
  4. Routing Engine generates a list of the carriers it selected to serve this call direction. 
  5. SIP Proxy directs the call to the relevant carrier(s).
  6. Selected Carrier sends the call to the Callee.

In a perfect scenario, the Routing Engine provides a list of carriers for the desired destination to the SIP proxy. This proxy then directs the call to the first carrier on the list. If the selected carrier places the call successfully, then the call goes through and PortaSwitch records a billing event. The transaction is complete, the carrier that successfully assisted in the transaction gets its termination fee, and you (the system owner) make a profit for your service.

Carrier Policies

In our rosy, perfect 🍭 world, all calls are equal, and all equipment fully complies with international VoIP standards (such as RFC for SIP). As you know, though, we live in a world that’s far from perfect. Some carriers have exotic or outdated equipment, so calls only go through if you tweak the call metadata, adding or removing parameters. So, PortaSwitch enables flexible CPaaS call routing, in which carrier policies allow you to “patch” carrier settings and start delivering calls (and earning money) on calls going from not-100%-RFC-compliant customer equipment. This way, the carrier’s equipment has its share of RFC compliance issues instead of participating in a holy war of “who is more RFC righteous.”

The Carrier Selection Flow

What happens when the first carrier from the list fails to place the call? First, PortaSwitch engages fail-over routing and attempts to use the second carrier in the list. If that one fails too, it moves to the third one. And so on and so on. It also engages the adaptive CPaaS call routing algorithm via the Routing Engine – that makes sure each failed call attempt contributes to the carrier’s negative scoring.

PortaOne Routing Engine. The Carrier Selection Flow

  1. The Caller places a call.
  2. SIP Proxy requests a current list of carriers available for this direction from the Routing Engine. 
  3. The Routing Engine retrieves a current list of carriers from the Database.
  4. SIP Proxy routes a call as specified by the Routing Engine to Carrier A, which fails to place this call. Failed call record is inserted into database for carrier A.
  5. SIP Proxy then routes a call to the next carrier specified by the Routing Engine. Carrier B successfully delivers a call. 
  6. SIP Proxy reports data on call placement via carrier B to the Routing Engine.
  7. The Routing Engine stores the call placement data to the database.
  8. Adaptive Routing Component 
    • calculates aggregated call processing data, compares thresholds; 
    • if some carrier falls below on a criteria — they are penalized by storing updated carrier ratings to the database. 
  9. Alert is sent to the administrator

What does that penalty look like? PortaSwitch will penalize carriers that do not meet the quality criteria by moving them to the very last positions in the routing list for that direction. So if Carrier A fails to deliver calls during the 15-minute “sampling” interval, the adaptive routing will place Carrier B in the first position. This “penalty box“ lasts for the next 4 hours.

How Is CPaaS Call Routing Different from Twilio and the Gang?

Having a choice is always great. Who knows this better than those of us who survived the Soviet Union? 😂 Twilio and other prominent CPaaS vendors are indeed powerful. They offer world-class API and documentation. But if you read the small font, you will soon discover that they don’t give you much freedom with CPaaS call routing. There are also carrier aggregators built around Twilio, Nexmo, and other giants of the CPaaS ecosystem.

Does BYOC Allow “Your Own” Carrier?

Twilio also has a new initiative called BYOC (Bring Your Own Carrier), and others may soon follow. The problem with BYOC (like with BYOB) is that it only allows you to define carriers to be potentially used. The application’s developer is responsible for deciding which carrier will be used for a particular call and its direction. This approach means she has to write a code that deals with least-cost carrier selection, fail-over routing, profit guarantee, and all the other things we’ve mentioned. PortaSwitch already supports dozens more; we just don’t shout about it.

As you can guess, this is a huge waste of developer time and a drastic “time-to-market” lag for any viable service. So why would you re-write tens of thousands of lines of code of routing algorithm and carrier management when it has already written by PortaOne staff and battle-tested over many years?

The PortaOne Routing Engine is a unique thing. The benefits of advanced carrier management are modest if you plan to launch only in the US or Western Europe. But they can still stack up as your volume increases. And, as you now know, emerging telecom markets are different – and riskier. But the reward for that risk is a new El Dorado of untapped market potential.

So if you are a solution provider looking for a sound and well-supported technology stack for your telecom venture, then PortaOne and our innovative CPaaS call routing might be the right place to go. Please book a demo with our sales team at your earliest convenience.

Share this story

Related posts