Skip to content

Instantly share code, notes, and snippets.

View psanders's full-sized avatar

Pedro Sanders psanders

View GitHub Profile
@psanders
psanders / function.js
Created July 3, 2021 13:32
Cloud Function Example
const Fonos = require("@fonos/sdk");
const callManager = new Fonos.CallManager();
// 🚀 Let's get started
// Use fonos funcs:deploy to send to the cloud functions
module.exports = async(request, response) => {
await callManager.call({
from: "9842753589",
to: "17853178070",
webhook: "https://5a2d2ea5d84d.ngrok.io"
@psanders
psanders / voice_server.js
Created July 3, 2021 13:33
Example of Voice Server
const { VoiceServer } = require("@fonos/voice");
const voiceServer = new VoiceServer();
voiceServer.listen((req, res) => {
console.log(req);
res.play("sound:hello-world");
});
@psanders
psanders / calls_with_notes.js
Created July 3, 2021 13:41
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",
@psanders
psanders / record-api-draft.md
Last active May 8, 2023 14:25
API Draft for record and dial

Recording feature

This option works well for channel recording only.

See next section for recording of entire conversation

Use cases:

  • Get user input
  • Better control for privacy purposes
@psanders
psanders / FONOSTER_SDK.md
Last active February 23, 2026 13:48
Fonoster SDK + Autopilot

Fonoster SDK: Calling Tutorial

Minimal steps to place an outbound call with the Fonoster SDK (@fonoster/sdk): workspace ID, API key, metadata, and createCall.


Prerequisites

npm install @fonoster/sdk