fixes
parent
d976dca60e
commit
e978289165
|
@ -33,7 +33,7 @@ export default class PBX {
|
||||||
await channel.play({
|
await channel.play({
|
||||||
media: 'sound:please-enter-the-pn',
|
media: 'sound:please-enter-the-pn',
|
||||||
}, undefined);
|
}, undefined);
|
||||||
channel.on('ChannelDtmfReceived', async (ev, chan) => {
|
channel.on('ChannelDtmfReceived', async (ev) => {
|
||||||
if (status === 0) {
|
if (status === 0) {
|
||||||
if (ev.digit === '#') {
|
if (ev.digit === '#') {
|
||||||
await channel.play({
|
await channel.play({
|
||||||
|
@ -60,13 +60,13 @@ export default class PBX {
|
||||||
try {
|
try {
|
||||||
const ch = await this.client.getDMChannel(member.userID);
|
const ch = await this.client.getDMChannel(member.userID);
|
||||||
if (ch) {
|
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 {
|
} catch {
|
||||||
this.client.util.handleError(new Error(page.message));
|
this.client.util.handleError(new Error(page.message));
|
||||||
}
|
}
|
||||||
const playback = await channel.play({
|
const playback = await channel.play({
|
||||||
media: 'sound:an-error-has-occurred',
|
media: 'sound:request-error',
|
||||||
}, undefined);
|
}, undefined);
|
||||||
playback.on('PlaybackFinished', () => channel.hangup());
|
playback.on('PlaybackFinished', () => channel.hangup());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue