Browser Telephony to PSTN using AWS Voice Connector

The WebRTC standards makes linking web applications with telephony incredibly easy. See our previous cases, Click-to-dial and Web Conferencing However there are still one billion more mobile phones than people worldwide. To connect to them, the Frafos WebRTC-enabled SBC can easily link to the AWS Voice Connector service. 

The call-flow works as follows: a user opens up a Javascript application that initiates a WebRTC call towards the ABC SBC Gateway. The gateway translates a WebRTC browser call into SIP call and authenticates against a PSTN termination service, AWS Voice Connector in this case.

In this demo you will start a WebRTC service, configure it to make phone calls through Voice Connector during cloud formation launch, and eventually make a browser-to-PSTN phone call from a password-protected webpage.

How to Use It

Before starting your service, you must have an AWS account and set up the “Voice Connector” service. AWS  provides a quick guide in Working with Amazon Chime Voice Connectors. Make sure that you permit the destination country you wish to reach under “Voice Connectors > Termination“.

To start the cloud formation process visit the following link:

Launch Cloud Formation Stack

Include parameters describing your AWS trunk: authentication username and password (set up under “Voice Connectors > Termination > Credentials”), the trunk FQDN (to be found under “Voice Connectors > Termination > Outbound host name”and your caller Id (can be found under“Voice Connectors > Termination > Phone Numbers”)


The cloud formation process completes will take several minutes. Once finished, the Outputs will show IP address of the WebRTC SBC, a link to personalized click-to-dial button and a link to monitor. As the first thing, take the IP address and permit it in your Voice Connector Settings under “Termination > Allowed Host Lists“. Don’t forget to Save the Voice Connector Settings. Without whitelisting the SBC, the Voice Connector service will decline calls from it using SIP 403 error code.

Now it is time to check the browser telephony application. Use the click-to-dial link and accept self-signed certificates. Include a valid E.164 number beginning with the “+” sign under “Call to” to form a SIP address like ‘’.  After you press the dialling button, you will be prompted for permission to use your audio/video equipment. After you approve, your browser will  connect to the PSTN  destination.

You can also visit the Monitor link and see in detail how your call was set up.

What is Orchestrated


Amazon Voice Connect Scenario

Amazon Voice Connect Scenario

The cloud Formation starts an EC2 instance acting as  ABC WebRTC Gateway. Additionally it launches an instance with  Monitor to provide for VoIP troubleshooting. It is configured to use a third-party AWS Voice Connector Service during the Cloud Formation launching phase.

What Else You Should Know

This basic configuration permits anyone with proper password to make phone calls to any destination through the Twilio PSTN termination service. Click-to-dial is typically used to reach a single well-known telephone number. In such cases it makes sense to configure the ABC SBC Routing policy to always forward to this specific number. This way, even if a user modifies the HTML click-to-dial code in his browser to call a different number, the call will still be forwarded by the SBC to the intended number. See the ABC-SBC Documentation for details on devising SIP routing policies.