https://github.com/nexmo/node-call-tracker
A Call Tracking example using the Nexmo Voice API written in Node
https://github.com/nexmo/node-call-tracker
Last synced: 12 months ago
JSON representation
A Call Tracking example using the Nexmo Voice API written in Node
- Host: GitHub
- URL: https://github.com/nexmo/node-call-tracker
- Owner: Nexmo
- License: mit
- Created: 2016-09-03T14:30:30.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2025-01-22T21:39:51.000Z (over 1 year ago)
- Last Synced: 2025-05-22T22:06:19.089Z (about 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 34
- Watchers: 24
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Calling Tracking Demo using Node and the Nexmo Voice API
This app used the Nexmo Voice API to demonstrate how a call tracking application could be built.
* The call is tracked
* Incoming calls are proxied to a destination number
You can read the [detailed tutorial on Nexmo's Developer Portal](https://developer.nexmo.com/tutorials/call-tracking) about call tracking; this repo is the sample code to accompany that tutorial.
## Prerequisites
You will need:
* At least one Nexmo Virtual Number (Phone Number)
* The [Nexmo CLI](https://github.com/Nexmo/nexmo-cli/) installed
* Somewhere to host this web app, Heroku or Your Local Machine with ngrok both work well
## Installation
```sh
git clone https://github.com/nexmo/node-call-tracker.git
cd node-call-tracker
npm install
```
## Setup
Rename the config file:
```sh
cp example.env .env
```
Fill in the values in `.env` as appropriate.
Edit the following command to use the URL of where your application is hosted. Then run the [Nexmo CLI](https://github.com/nexmo/nexmo-cli) command below and take note of the application universally unique identifier (UUID) it returns:
```sh
nexmo app:create demo-app --keyfile private.key http://your-url-here/track-call http://your-url-here/event
```
Buy numbers for calls that you would like to track. The following example buys the first available number in a given country by country code.
```sh
nexmo number:buy --country_code [YOUR_COUNTRY_CODE]
```
Link each number to the application by running a command like this with the application UUID and the number to link.
```sh
nexmo link:app [NUMBER] [app-id]
```
### Running the App
```sh
npm start
```
The application should be available on .
### Using the App
Call one of the virtual numbers that you rented. The call will be tracked and forwarded to the desired destination number.
You can see a list of tracked calls by accessing .