{"id":21406732,"url":"https://github.com/ringcentral/ringcentral-softphone-js","last_synced_at":"2025-07-14T00:32:48.185Z","repository":{"id":39383028,"uuid":"208121300","full_name":"ringcentral/ringcentral-softphone-js","owner":"ringcentral","description":"RingCentral Softphone SDK for JavaScript","archived":false,"fork":false,"pushed_at":"2023-12-03T19:18:38.000Z","size":1286,"stargazers_count":22,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T20:42:49.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ringcentral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-12T18:41:30.000Z","updated_at":"2025-01-13T19:33:03.000Z","dependencies_parsed_at":"2024-11-22T16:42:18.379Z","dependency_job_id":"89600851-fcf8-444a-b868-1cef092d34db","html_url":"https://github.com/ringcentral/ringcentral-softphone-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ringcentral/ringcentral-softphone-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-softphone-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-softphone-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-softphone-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-softphone-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ringcentral","download_url":"https://codeload.github.com/ringcentral/ringcentral-softphone-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ringcentral%2Fringcentral-softphone-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265227898,"owners_count":23731059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T16:42:09.611Z","updated_at":"2025-07-14T00:32:48.163Z","avatar_url":"https://github.com/ringcentral.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project moved\n\nPlease check [RingCentral Softphone SDK for TypeScript](https://github.com/ringcentral/ringcentral-softphone-ts) instead.\n\n## This repo has been abandoned\n\n## Please use [RingCentral Softphone SDK for TypeScript](https://github.com/ringcentral/ringcentral-softphone-ts) instead\n\n## What are the differences between ringcentral-web-phone and this project?\n\n[ringcentral-web-phone](https://github.com/ringcentral/ringcentral-web-phone) is designed for client side and only works with browsers.\n\nThis project was originally designed for server and desktop. It doesn't require a browser to run. It could run in browser too.\n\n\n## Supported features:\n\n- Answer inbound call\n- Make outbound call\n- Speak and listen, two way communication\n- Call control features\n    - Redirect inbound call to voicemail\n    - Ignore inbound call\n\n\n## Demos\n\n- [browser demo](./demos/browser)\n- node.js\n    - [answer inbound call](./demos/node/answer-and-talk.js)\n    - [make outbound call](./demos/node/outbound-call.js)\n    - [redirect inbound call to voicemail](./demos/node/to-voicemail.js)\n    - [ignore inbound call](./demos/node/ignore.js)\n- [call supervise](https://github.com/tylerlong/ringcentral-call-supervise-demo)\n    - supervise an existing phone call and get real time audio stream\n\n\n## Install\n\n```\nyarn add ringcentral-softphone @rc-ex/core\n```\n\nFor node.js you also need to:\n\n```\nyarn add ws wrtc\n```\n\n\n## Usage\n\n- for node.js, check [here](./demos/node)\n- for browser, check [here](./demos/browser)\n\n\n## Get realtime inbound audio\n\n```js\nimport { nonstandard } from 'wrtc'\n\nsoftphone.once('track', e =\u003e {\n  const audioSink = new nonstandard.RTCAudioSink(e.track)\n  audioSink.ondata = data =\u003e {\n    // here you have the `data`\n  }\n  softphone.once('BYE', () =\u003e {\n    audioSink.stop()\n  })\n})\n```\n\nThe data you got via `audioSink.ondata` is of the following structure:\n\n```js\n{\n  samples: Int16Array [ ... ],\n  bitsPerSample: 16,\n  sampleRate: 48000,\n  channelCount: 1,\n  numberOfFrames: 480,\n  type: 'data'\n}\n```\n\nPlease note that, you may get different numbers, for example, `sampleRate` you get might be 16000 instead of 48000.\n\n\n## Official demos\n\n### Setup\n\n```\nyarn install\ncp .env.sample .env\n```\n\nEdit `.env` file to specify credentials.\n\n- `CALLEE_FOR_TESTING` is a phone number to receive testing phone calls. You don't need to specify it if you do not make outbound calls.\n- If you have `WEB_SOCKET_DEBUGGING=true`, then all WebSocket traffic will be printed to console.\n\n\n### Run\n\n- for node.js `yarn server`\n- for browser `yarn browser`\n\n\n### Test\n\nMake a phone call to the phone number you configured in `.env` file. The demo app will answer the call and you can speak and listen.\n\n\n## Interesting Use cases\n\n### Call supervision\n\nLet's say there is a phone call ongoing between a customer and the call agent.\nYou can use this library to supervise this phone call to get live audio stream.\nYou can analyze the audio stream using some AI algorithm and provide tips to the call agent in real time.\n\n\n### Live transcription\n\nUse this library to supervise an existing phone call to get live audio stream.\nTranslate the audio stream into text by invoking some speech-to-text service.\nShow the text to the caller and/or callee so they can see live transcription.\n\n\n### Play recorded audio\n\nYou can create a program to make a phone call or answer a phone call and play recorded audio.\nThis is good for announcement purpose. This is also good for quick voicemail drop.\nOr you can use text-to-speech service to read text to the callee.\n\n\n## Todo\n\n- How to create a publish message\n- How to forward a call\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fringcentral-softphone-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fringcentral%2Fringcentral-softphone-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fringcentral%2Fringcentral-softphone-js/lists"}