fixes
parent
d976dca60e
commit
e978289165
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue