This project demonstrates how to set up a system using the Vonage Voice API to receive a "ghost call" by sending an SMS to a virtual number. Extract yourself from an awkward situation discreetly.
- Receive SMS: Listens for incoming SMS messages to a Vonage virtual number.
- Trigger Call: Automatically triggers an outbound call in response to the SMS.
- Customizable Call Flow: Supports both simple and dynamic call flows using NCCO (Nexmo Call Control Objects).
Before you begin, ensure you have:
- A Vonage API account. Sign up here if you haven't already.
- Node.js and npm installed. Download here.
- Ngrok for creating a secure tunnel to your localhost. Download and set up instructions.
- Basic knowledge of JavaScript and Node.js.
-
Clone the Repository:
-
Install Dependencies:
npm install
-
Configure Environment Variables:
Rename
.env.example
to.env
and fill in your Vonage API credentials and other necessary details.
-
Start the Local Server:
node index.js
-
Expose the Server using Ngrok:
In a new terminal, run:
ngrok http 3000
-
Update Webhook URLs:
Use the HTTPS URL provided by Ngrok to update your SMS webhook URL in the Vonage Dashboard.
-
Send an SMS:
Send an SMS to your Vonage virtual number to trigger the ghost call.
The application is designed to be straightforward:
- Send an SMS to your Vonage number: The content of the SMS can be anything.
- Receive a Call: The number you used to send the SMS will receive a call with either a predefined message or a dynamic response based on NCCO.
You can customize the call response by editing the NCCO in the index.js
file or by modifying the JSON file at the ANSWER_URL
.
For any queries or issues, please open an issue on this repository, or reach out on the Vonage Developer Community Slack.