GithubHelp home page GithubHelp logo

akshatnitd / node-call-tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nexmo/node-call-tracker

0.0 2.0 0.0 7 KB

A Call Tracking example using the Nexmo Voice API written in Node

License: MIT License

JavaScript 100.00%

node-call-tracker's Introduction

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

Prerequisites

You will need:

  • At least one Nexmo Virtual Number (Phone Number)
  • The Nexmo CLI installed
  • Somewhere to host this web app, Heroku or Your Local Machine with ngrok both work well

Installation

git clone https://github.com/nexmo/node-call-tracking.git
cd node-call-tracking
npm install

Setup

Create the nexmo application, using the Nexmo CLI and take note of the application universally unique identifier (UUID):

nexmo app:create demo-app --keyfile private.key http://example.com http://example.com

Rename the config file:

mv example.env .env

Fill in the values in .env as appropriate.

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.

nexmo number:buy --country_code [YOUR_COUNTRY_CODE]

Link the virtual numbers to the app id with the Nexmo CLI:

nexmo link:app [NUMBER] [app-id]

Update the app to set the webhook urls to be your server instead of the example.com placeholders used at creation.

nexmo app:update [app-id] demo-app [your url]/answer [your url]/event

We recommend using ngrok to tunnel through to your locally running application. In which case the command above is likely to be something similar to:

nexmo app:update [app-id] demo-app https://___.ngrok.io/answer https://___.ngrok.io/event

Where ___ should be replaced with the ngrok.io subdomain you are assigned.

Running the App

npm start

The application should be available on http://localhost:5000.

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 http://localhost:5000/tracked-calls.

node-call-tracker's People

Contributors

leggetter avatar gasp avatar

Watchers

James Cloos avatar Akshat Garg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.