pull/29/head
Matthew 2020-12-01 19:23:45 -05:00
parent d976dca60e
commit e978289165
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ export default class PBX {
await channel.play({
media: 'sound:please-enter-the-pn',
}, undefined);
channel.on('ChannelDtmfReceived', async (ev, chan) => {
channel.on('ChannelDtmfReceived', async (ev) => {
if (status === 0) {
if (ev.digit === '#') {
await channel.play({
@ -60,13 +60,13 @@ export default class PBX {
try {
const ch = await this.client.getDMChannel(member.userID);
if (ch) {
ch.createMessage(`***Error Occurred over PBX Paging:*** ${page.message}`);
ch.createMessage(`***An error has occurred while trying to process your page request over the PBX.***\n*${page.message}*\n\nPlease check your parameters and try again.`);
}
} catch {
this.client.util.handleError(new Error(page.message));
}
const playback = await channel.play({
media: 'sound:an-error-has-occurred',
media: 'sound:request-error',
}, undefined);
playback.on('PlaybackFinished', () => channel.hangup());
}