Amazon Web Services

Amazon Connect Streams API Changelog #3: June 2018

Security Policy and Development

Amazon Connect Streams API (Streams) allows developers to create custom agent experiences for Amazon Connect. The code for Streams is hosted in Github and open for community contributions in the form of pull requests. This is the third installment of my running series covering changes to the Streams API. Prior installments can be found here:

Newly Approved Pull Requests

Since my last installment, there have been 2 approved pull requests (PRs) to Streams.

Code Clean-Up: Fixing a Null Pointer Exception (PR #74)

PR #74 is a code change to the softphone.js file that adds some initialization logic and null checks for some audio metadata (the audio “stats”) for the current call. When a call connects, these stats are populated by the startStatsCollectionJob in the onRefreshContact handler. When a call failed to connect, these stats were never populated and a subsequent call to send these stats via sendSoftphoneReport failed with a null pointer exception. With the changes, sendSoftphoneReport succeeds even when the call fails to connect.

This kind of fix is nice to see as it reduces the noise of extra error logs when troubleshooting issues with the Streams API and the Contact Control Panel.

TypeScript Tooling Support (PR #41)

I highlighted this PR back in my last post and am happy to see it get approved. A TypeScript declaration file for Streams API helps developers write better code faster, by lighting up type checking and code completion in editors like Visual Studio Code.


New & Open Pull Requests

Amazon Web Services - Avoid Contact Center Outages: Plan Your Upgrade to Amazon Connect
Avoid Contact Center Outages: Plan Your Upgrade to Amazon Connect

Learn the six most common pitfalls when upgrading your contact center, and how Amazon Connect can help you avoid them.

Get the Guide

There are no new PRs since last time and only 2 open PRs at this point:


Closed Pull Requests


Active Issues

For this installment, I’m adding this section to take a quick look at some recently updated Issues. Issues in Github are used to track problems, ask for help or suggest new features. An issue sometimes will end up spawning a PR for a code fix. Looking through the issues list on Github I saw three I wanted to highlight:

Transfer to Quick Connect via Streams (Issue #54 and #27)

The always helpful jagadeeshaby responded to both of these requests for help on how to do transfers to Quick Connects using Streams API with a short code snippet:

var agent = new lily.Agent();
agent.getEndpoints(agent.getAllQueueARNs(), {
success: function(data){
console.log("valid_queue_phone_agent_endpoints", data.endpoints, "You can transfer the call to any of these endpoints");
agent.getContacts(lily.ContactType.VOICE)[0].addConnection(any_valid_queue_or_phone_or_agent_endpoint, {
success: function(data) {
alert("transfer success");
failure: function(data) {
alert("transfer failed");

view raw
hosted with ❤ by GitHub

This code path is not immediately obvious from the documentation. Thanks for the tip jagadeeshaby!

Audio Device Selector & Speaker Ring (Issue #67)

extmchristensen and mschersten bring up a user experience issue we see across customers. Between the browser and Windows sound settings, agents can have a hard time selecting the right audio device to use for Amazon Connect calls. This issue is requesting some changes to Streams API to let partners implement their own audio device selection user experience. mschersten brings up that it would be nice to have simultaneous ring across multiple audio devices, so a low utilization agent can hear a ring over their PC speakers.


I’d love to see changes along these lines, and I’ll be sure to keep an eye out on this issue for any further activity.

Thanks for reading. Any questions, comments or corrections are greatly appreciated. To learn more about what we can do with Amazon Connect, check out Helping You Get the Most Out of Amazon Connect

About the Author

Peter Miller is a Solutions Architect at Perficient focused on call center solutions including Amazon Connect

More from this Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up