Running a Startup on AWS? Get Funding With AWS JumpStart. Click Here to Learn More

2021 Fillmore Street #1128

}

24/7 solutions

WebRTC logo

WebRTC for Call Center Proposal

Joel Garcia Joel Garcia has been building AllCode since 2015. He’s an innovative, hands-on executive with a proven record of designing, developing, and operating Software-as-a-Service (SaaS), mobile, and desktop solutions. Joel has expertise in HealthTech, VoIP, and cloud-based solutions. Joel has experience scaling multiple start-ups for successful exits to IMS Health and Golden Gate Capital, […]
We put this WebRTC Proposal together for a call center client that was looking for an alternative to Twilio.

2. Application Flow

2.1  Agent navigates to Company Web Server to bring up the WebRTC page

The WebRTC page contains SIP.js or sipML5. Both are open source. We have leveraged SIP.js before.

2.2 Company delivers HTML5 SIP Client to Agent.

When the HTML loads, the Company HTML5 SIP Client makes an AJAX request to a new component, the Company Media Server Manager, asking which media server to use for the call. We’ve gone back and forth on whether we should front the media servers with a Proxy, OpenSIPS, or use an App Server. We’re opting for the App Server because the App Server enables us to capture utilization statistics on the media servers to determine which machine has the least amount of load.

2.3 HTML5 SIP client sends request to Company Media Manager Server

The Company Media Server Manager is written in Java running on Tomcat.  We could also write it in C#. The Company Media Server Manager manages agents and media server boxes. It utilizes a little MySQL instance to keep track of the media servers, their statistics, and conceivably to manage agents. There would also need to be a little CRUD user interface to manage the media server and agent entities.

2.4. Company Media Manager Server returns the media server

The Company Media Server Manager returns the IP address of the media server, which has the least amount of utilization. Initially, utilization is defined as the number of agents in call.

2.5. Agent initiates call to media server

We’ve changed the media server from FreeSWITCH to Asterisk. The Asterisk has a couple of advantages. The biggest advantage is we are much more familiar with the Asterisk Manager Interface which can provide utilizations statistics on the Asterisk machines back to the Company Media Manager Server. When the agent initiates the call to the Asterisk IP Address, we start to send WebRTC and SIP over WebSocket to the Asterisk server.

2.6.  Agent is placed in conference to wait for client leg

The Asterisk is capable of communicating via SIP over WebSocket. The Asterisk WebRTC module will handle the WebRTC. When we put the agent into conference, the conference module will transcode the OPUS codec to G.711. The conference takes place on the Asterisk Media server. We also have a resource that has implemented this exact solution.

2.7. Asterisk sends call events to Company Media Manager Server

When a new media server is provisioned, the media server is provisioned with the IP address of the Company Media Server Manager or a pool of these machines. When the call starts to take place, we’d send call state back to the Company Media Server Manager via the Asterisk Management Interface enabling us to load balance.

2.8 Either the Acision Sip Proxy sends the client leg to Asterisk or we could initiate the call through the Asterisk.

For the client leg, the agent is sitting in conference, how does the client leg get into the conference? One option is to have the Acision SIP Proxy route the call to the appropriate Asterisk server. Another option is for the Asterisk media server to initiate the client leg. The call would run through the Acision SIP Proxy out to the PSTN. This would effectively enable us to “nail up” the agent if needed.

3. Questions

3.1. Will the Asterisk media server IP addresses have to be publicly exposed?

In this solution, yes, the Asterisk media server IP addresses would be publicly exposed. We could front the media servers with an OpenSIPS, but it would probably be easier to just open a range of 255 IP addresses. If we exceed 255 media servers, then we could either look into fronting it with an OpenSIPs or splitting up the WebSocket and transcoding work.

3.2 How does the NAT Traversal work?

We need to learn more about what Company does today.

3.3 How do we scale? How do we deal with the transcoding?

We scale by adding Asterisk media servers to the pool. The Company Media Manager Server then routes the load.      
Joel Garcia
Joel Garcia

Joel Garcia has been building AllCode since 2015. He’s an innovative, hands-on executive with a proven record of designing, developing, and operating Software-as-a-Service (SaaS), mobile, and desktop solutions. Joel has expertise in HealthTech, VoIP, and cloud-based solutions. Joel has experience scaling multiple start-ups for successful exits to IMS Health and Golden Gate Capital, as well as working at mature, industry-leading software companies. He’s held executive engineering positions in San Francisco at TidalWave, LittleCast, Self Health Network, LiveVox acquired by Golden Gate Capital, and Med-Vantage acquired by IMS Health.

Related Articles

Here’s Why You Should Work with an AWS Partner

Here’s Why You Should Work with an AWS Partner

Amazon Web Services is understandably a difficult platform to adapt to and utilize fully upon first getting started. Some organizations can be selected to become certified partners to indirectly extend services to help build on the Amazon Cloud. Finding a certified company to help build out is undoubtedly the best way to significantly simplify, streamline, and reduce the cost of utilizing AWS.

Amazon Web Services – CodeCatalyst

Amazon Web Services – CodeCatalyst

When a development team is building out an application, it helps to have access to the same resources, have the tools for planning and testing, and to have access to the application all in one place. CodeCatalyst comes with a slew of continuous integration/continuous development (CI/CD) tools and can leverage other AWS services and be connected to other AWS projects on an account. As a collaborative tool, it is easy to introduce new members into the project and to log all activity or all tests from a single dashboard. It’s a complete package of all the tools needed to securely work on every step of an application’s lifecycle.

The Definitive Guide to AWS Pricing

The Definitive Guide to AWS Pricing

Perhaps the biggest issue with AWS that its competitors edge out on is the confusing pricing model. It does promise the capacity to help users save significantly on funds that otherwise by avoiding spending on unnecessary resources, but getting to that point isn’t always clear. We will be covering in greater detail how this works.

Download our 10-Step Cloud Migration ChecklistYou'll get direct access to our full-length guide on Google Docs. From here, you will be able to make a copy, download the content, and share it with your team.