From 02c5932c86881b44a94347caa875ca79cdddde2f Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 25 Dec 2020 21:55:51 -0500 Subject: [PATCH] attempt #1 fix pbx issue --- src/pbx/handlers/PageDTMF.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pbx/handlers/PageDTMF.ts b/src/pbx/handlers/PageDTMF.ts index c373eba..74ea7d2 100644 --- a/src/pbx/handlers/PageDTMF.ts +++ b/src/pbx/handlers/PageDTMF.ts @@ -24,14 +24,15 @@ export default class PageDTMF extends Handler { const pagerNumber: string[] = []; const pagerCode: string[] = []; channel.answer(); - const pnPlayback = await channel.play({ + const pnPlaybackC = this.pbx.ari.Playback(); + channel.play({ media: 'sound:please-enter-the-pn', - }, undefined); + }, pnPlaybackC); channel.on('ChannelDtmfReceived', async (ev) => { if (!channel.connected) return; if (status === 0) { if (ev.digit === '#') { - await pnPlayback.stop(); + await pnPlaybackC.stop(); await channel.play({ media: 'sound:please-enter-the-pc', }, undefined);