Skip to content

Make and Receive Calls with JavaScript and the Vonage Voice API

License

Notifications You must be signed in to change notification settings

sudiptog81/calls-with-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Make and Receive Calls with JS and Vonage APIs

Quick Start

Clone and Install Dependencies

git clone https://github.com/sudiptog81/calls-with-js.git
cd calls-with-js
yarn

Override Environment Variables

Create a file named .env as per the template given in .env.example. Get the values for Vonage specific variables from the Vonage Dashboard.

Start an HTTP Tunnel with ngrok

Assuming PORT has a value of 5000 in .env.

ngrok http 5000

Override WebHook URLs in Vonage Dashboard

  • Answer URL: <ngrok-tunnel-url>/answer
  • Event URL: <ngrok-tunnel-url>/event

Run the Application

yarn dev

Call a Friend

Replace <number> with your friend's number and <message> with a custom message.

curl http://localhost:5000/call?to=<number>&msg=<message>

Ask Them to Call Back

Note: They will be rick-rolled!

License

The MIT Open-Source License.

About

Make and Receive Calls with JavaScript and the Vonage Voice API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published