Blegh 3
This commit is contained in:
parent
b6d1c75dd1
commit
f52e98fc8e
3
index.js
3
index.js
|
|
@ -2,6 +2,7 @@ const agi = require("asteriskagi")
|
||||||
const x = new agi({port: 4578})
|
const x = new agi({port: 4578})
|
||||||
|
|
||||||
x.on('call', async (call) => {
|
x.on('call', async (call) => {
|
||||||
|
const { remoteServer, uniqueid, context, extension, priority, calleridname, callerid, channel } = call;
|
||||||
call.on("hangup", () => {
|
call.on("hangup", () => {
|
||||||
console.log(`Hangup ${remoteServer}/${channel}`);
|
console.log(`Hangup ${remoteServer}/${channel}`);
|
||||||
});
|
});
|
||||||
|
|
@ -20,6 +21,8 @@ x.on('call', async (call) => {
|
||||||
console.log("said digits")
|
console.log("said digits")
|
||||||
await call.Playback('beep')
|
await call.Playback('beep')
|
||||||
console.log("played")
|
console.log("played")
|
||||||
|
const test = await call.Read("beep", 1)
|
||||||
|
console.log("read", test)
|
||||||
await call.Hangup()
|
await call.Hangup()
|
||||||
console.log("hung up")
|
console.log("hung up")
|
||||||
})
|
})
|
||||||
Loading…
Reference in a new issue