attempt #1 fix pbx issue
parent
e0d7feb183
commit
02c5932c86
|
@ -24,14 +24,15 @@ export default class PageDTMF extends Handler {
|
||||||
const pagerNumber: string[] = [];
|
const pagerNumber: string[] = [];
|
||||||
const pagerCode: string[] = [];
|
const pagerCode: string[] = [];
|
||||||
channel.answer();
|
channel.answer();
|
||||||
const pnPlayback = await channel.play({
|
const pnPlaybackC = this.pbx.ari.Playback();
|
||||||
|
channel.play({
|
||||||
media: 'sound:please-enter-the-pn',
|
media: 'sound:please-enter-the-pn',
|
||||||
}, undefined);
|
}, pnPlaybackC);
|
||||||
channel.on('ChannelDtmfReceived', async (ev) => {
|
channel.on('ChannelDtmfReceived', async (ev) => {
|
||||||
if (!channel.connected) return;
|
if (!channel.connected) return;
|
||||||
if (status === 0) {
|
if (status === 0) {
|
||||||
if (ev.digit === '#') {
|
if (ev.digit === '#') {
|
||||||
await pnPlayback.stop();
|
await pnPlaybackC.stop();
|
||||||
await channel.play({
|
await channel.play({
|
||||||
media: 'sound:please-enter-the-pc',
|
media: 'sound:please-enter-the-pc',
|
||||||
}, undefined);
|
}, undefined);
|
||||||
|
|
Loading…
Reference in New Issue