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
| 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" |
| const { VoiceServer } = require("@fonos/voice"); | |
| const voiceServer = new VoiceServer(); | |
| voiceServer.listen((req, res) => { | |
| console.log(req); | |
| res.play("sound:hello-world"); | |
| }); |
| // 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", |