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
Proposed API change example:
const { VoiceServer } = require("@fonos/voice");
const voiceServer = new VoiceServer();
voiceServer.listen(async(req, res) => {
await res.answer();
const recordControl = await res.record({...});
recordControl.pause() // Or stop, unpause, mute...
...
});I'm proposing changing the name of the verb, from transfer to dial.
Transfer gives the impression that you are passing the call from one Agent to another which is no true
Proposed API change example:
const { VoiceServer } = require("@fonos/voice");
const voiceServer = new VoiceServer();
voiceServer.listen(async(req, res) => {
await res.answer();
await res.say("transfering")
const statusStream = await res.dial("17853178070")
statusStream.on("progress", console.log)
statusStream.on("answer", console.log)
...
});
Note for future me
Check this link for an alternative way of recording audio similar to mixmonitor:
https://community.asterisk.org/t/record-separated-channel-in-ari/73966