npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

connly-voice-feed

v1.4.2

Published

Connly live call feed JavaScript SDK for browser and Node.js

Readme

Connly Voice Feed

Connly Voice Feed is a JavaScript SDK that provides real-time call feed data from the Connly platform. It is compatible with both Browser and Node.js environments, enabling seamless integration of live call events, agent status updates, and callback functionalities into your applications.

📦 Installation

You can install Connly Voice Feed using npm or yarn.

npm

npm install connly-voice-feed

yarn

yarn add connly-voice-feed

Browser (UMD)

To use Connly Voice Feed directly in the browser without a bundler, include the UMD build along with socket.io-client:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/socket.io.js"></script>
<script src="path/to/dist/connly-voice-feed.umd.js"></script>

🔧 Importing the SDK

In Node.js (ES Modules)

import Connly from 'connly-voice-feed';

In Browser (Using ES6 Modules)

If you are using a framework like ReactJS or VueJS:

import Connly from 'connly-voice-feed';

🛠 API Reference with Examples

Class: Connly

The Connly class is the core of the SDK, providing methods to connect to the Connly platform, subscribe to various events, and handle real-time call data.

Constructor

new Connly()

Creates a new instance of the Connly SDK.

Methods

start(token)

Connects to the Connly platform using the provided access token.

const connly = new Connly();
connly.start('your-access-token');

barge(uuid, to)

Barges into an ongoing call using the call's UUID and the supervisor's ID.

const CALL_UUID = 'example-uuid';
const SUPERVISOR_ID = 'supervisor-id';
connly.barge(CALL_UUID, SUPERVISOR_ID);

subscribeCalls()

Subscribes to live call feed events.

connly.subscribeCalls();

monitorCalls()

Subscribes to ongoing call events.

connly.monitorCalls();

subscribeAgents()

Subscribes to agent status and list updates.

connly.subscribeAgents();

removeAllListeners()

Removes all socket event listeners.

connly.removeAllListeners();

🔥 Event Handlers (With Examples)

These are callback functions that can be overridden to handle specific events emitted by the SDK.

onConnect(data)

Triggered when the socket connection is successfully established.

connly.onConnect = (data) => {
    console.log('Connected to Connly platform:', data);
    connly.subscribeCalls(); // Example: Subscribe to live calls once connected
};

onDisconnect(data)

Triggered when the socket connection is disconnected.

connly.onDisconnect = (data) => {
    console.log('Disconnected from Connly platform:', data);
};

onCalls(data)

Triggered when a new call event occurs.

connly.onCalls = (data) => {
    console.log('New Call Event:', data);
    console.log(`Caller: ${data.from}, Agent: ${data.agent}, UUID: ${data.uuid}`);
};

onAgents(data)

Triggered when agent statuses or the agent list is updated.

connly.onAgents = (data) => {
    console.log('Agent Updates:', data);
};

onStatus(data)

Triggered on status updates or errors (e.g., invalid token).

connly.onStatus = (data) => {
    console.log('Status Update:', data);
};

onCount(data)

Triggered on incoming call count updates.

connly.onCount = (data) => {
    console.log('Incoming Call Count:', data);
};

onagentAnswer(data)

Triggered when an agent answers a call.

connly.onagentAnswer = (data) => {
    console.log('Agent Answered Call:', data);
};

onAnswer(data)

Triggered when a customer answers a call.

connly.onAnswer = (data) => {
    console.log('Customer Answered Call:', data);
};

onCallback(data)

Triggered when a callback event occurs.

connly.onCallback = (data) => {
    console.log('Callback Event:', data);
};

📄 Response Fields

| Field | Description | |---------|------------------------------------------------------------------------------------------------------------------------| | action | Defines channel property: "ch-c" = channel created, "ch-s" = channel state change (e.g., early, answer), "ch-d" = deleted | | agent | Agent ID receiving the call | | group | Team/Group ID handling the call | | from | Customer's phone number | | id | Record ID | | inetno | Your App ID | | leguid | Customer channel UUID | | name | Customer name if previously saved | | uuid | Agent call UUID for call barging | | state | Current call state: 'early' = ringing, 'answer' = answered, 'bridged' = call established, 'hangup' = call disconnected |


🔗 Repository

🐛 Issues

If you encounter any issues or have suggestions, please open an issue on our GitHub Issues.