This commit is contained in:
Christopher Cookman 2026-06-21 06:00:49 -06:00
parent b6d1c75dd1
commit f52e98fc8e

View file

@ -2,6 +2,7 @@ const agi = require("asteriskagi")
const x = new agi({port: 4578})
x.on('call', async (call) => {
const { remoteServer, uniqueid, context, extension, priority, calleridname, callerid, channel } = call;
call.on("hangup", () => {
console.log(`Hangup ${remoteServer}/${channel}`);
});
@ -20,6 +21,8 @@ x.on('call', async (call) => {
console.log("said digits")
await call.Playback('beep')
console.log("played")
const test = await call.Read("beep", 1)
console.log("read", test)
await call.Hangup()
console.log("hung up")
})