Skip to content

Instantly share code, notes, and snippets.

@psanders
Created July 3, 2021 13:41
Show Gist options
  • Save psanders/8ede4d92951ee9e350ddc265db7d910c to your computer and use it in GitHub Desktop.
Save psanders/8ede4d92951ee9e350ddc265db7d910c to your computer and use it in GitHub Desktop.
Call example with notes
// This will load the SDK and reuse your Fonos credentials
const Fonos = require("@fonos/sdk");
const callManager = new Fonos.CallManager();
// Few notes:
// 1. Update the from to look exactly as the Number you added
// 2. Use an active phone or mobile
// 3. Replace the webhook with the one from your Ngrok
callManager.call({
from: "9842753574",
to: "17853178070",
webhook: "https://5a2d2ea5d84d.ngrok.io",
ignoreE164Validation: true
})
.then(console.log)
.catch(console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment