diff --git a/index.js b/index.js index 5475ff6..9395c74 100644 --- a/index.js +++ b/index.js @@ -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") }) \ No newline at end of file