https://github.com/freeclimbapi/node-make-outgoing-calls-app
Node sample application for making outgoing calls
https://github.com/freeclimbapi/node-make-outgoing-calls-app
sample-app
Last synced: 11 months ago
JSON representation
Node sample application for making outgoing calls
- Host: GitHub
- URL: https://github.com/freeclimbapi/node-make-outgoing-calls-app
- Owner: FreeClimbAPI
- Created: 2019-11-21T15:51:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-06T16:02:20.000Z (over 2 years ago)
- Last Synced: 2025-01-02T05:27:27.435Z (about 1 year ago)
- Topics: sample-app
- Language: JavaScript
- Size: 717 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Making Outgoing Calls Application
This project serves as a guide to help you build an application with FreeClimb. Specifically, the project will:
- Create an outgoing call to the user's phone number from the FreeClimb phone number
- Play a message for the user.
## Setting up your new app within your FreeClimb account
To get started using a FreeClimb account, follow the instructions [here](https://docs.freeclimb.com/docs/getting-started-with-freeclimb).
## Setting up the Making Outgoing Calls Application locally
1. Download and install [Node.js](https://nodejs.org)
2. Install yarn globally [Mac OS](https://yarnpkg.com/lang/en/docs/install/#mac-stable) | [Windows](https://yarnpkg.com/lang/en/docs/install/#windows-stable)
3. Clone or download this repo locally.
4. Install the node packages necessary using command:
```bash
yarn install
```
5. Configure environment variables (this tutorial uses the [dotenv package](https://www.npmjs.com/package/dotenv)).
| ENV VARIABLE | DESCRIPTION |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ACCOUNT_ID | Account ID which can be found under [API credentials](https://www.freeclimb.com/dashboard/portal/account/authentication) in Dashboard |
| API_KEY | API key which can be found under [API credentials](https://www.freeclimb.com/dashboard/portal/account/authentication) in Dashboard |
| FREECLIMB_PHONE_NUMBER | FreeClimb Phone Number associated with Making Outgoing Calls Application found under [My Numbers](https://www.freeclimb.com/dashboard/portal/numbers) in Dashboard (**E.164 format**) |
| APPLICATION_ID | Application ID associated with FreeClimb Making Outgoing Calls Application found under [Apps](https://www.freeclimb.com/dashboard/portal/applications) in Dashboard |
## Using the Making Outgoing Calls Application to Make Calls
1. Run the application using command:
```bash
$ node index
```
2. Hit the `/sendCall` endpoint with the E.164 formatted phone number that should receive the call (`destination_phone_number`) in the body of the request.
```bash
curl -XPOST http://YourHostedApp.com/sendCall -d '{"destination_phone_number":"+1XXXXXXXXXX"}' -H "Content-Type: application/json"
```
3. Expect a call from your FreeClimb phone number to be made to the phone number provided in the request, then the message created in the `/callConnect` should be played within the phone call.
## Getting Help
If you are experiencing difficulties, [contact support](https://freeclimb.com/support).