This guide will show you how to use Coaching and Recording features. Easily learn how to implement conference controls that are the foundation of many call center implementations with the SignalWire Node.js SDK.
- Copy from example.env and fill in your values
- Save new file called .env
Your file should look something like this
# This is the full name of your SignalWire Space. e.g.: example.signalwire.com SIGNALWIRE_SPACE= # Your Project ID - you can find it on the `API` page in your Dashboard. SIGNALWIRE_PROJECT= # Your API token - you can generate one on the `API` page in your Dashboard SIGNALWIRE_TOKEN= # The phone number you'll be using for this guide. Must include the `+1`, INBOUND_NUMBER= # The phone number you'll be using for this guide. Must include the `+1`, AGENT_NUMBER= # The phone number you'll be using for this guide. Must include the `+1`, SUPERVISOR_NUMBER= # Hostname, the IP address, or Fully Qualified Domain Name of your host and port, for routing action URLs HOSTNAME=
When your Signalwire number receives an incoming voice call to the
/inbound endpoint, Signalwire will dial the predefined agent phone number as specified in the environment file, and then once the agent is connected, will connect the supervisor to the call.
Let's set up your Node.js environment with Express to handle web requests.
On the command line in your current directory, run the following command:
To install Signalwire SDK via NPM (Node Package Manager)
npm install @signalwire/node
To install express via NPM (Node Package Manager)
npm install express
To build your react components run
npm run build
To run the example, and start the express server run the following command.
The server will run on port 5000, you can change the port in the code if you wish.
You can now load the dashboard by visiting your hostname on port 5000, and as you make calls they will appear on the dashboard.
- Use our pre-built image from Docker Hub
docker pull signalwire/snippets-coaching:node
(or build your own image)
- Build your image
docker build -t snippets-coaching .
- Run your image
docker run --publish 5000:5000 --env-file .env snippets-coaching
- The application will run on port 5000
- Replace environment variables
- From command line run, node server.js
If you would like to test this example out, you can create a SignalWire account and space here.
Please feel free to reach out to us on our Community Slack or create a Support ticket if you need guidance!
Updated 3 days ago
Check out the full code on our SignalWire Github Repo!