Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
navrotskyj committed Jul 11, 2017
1 parent 62062a7 commit 02d0d6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/acr.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Acr extends EventEmitter2 {
destinationNumber = conn.channelData.getHeader('Channel-Destination-Number') ||
conn.channelData.getHeader('Caller-Destination-Number') || conn.channelData.getHeader('variable_destination_number');

log.debug('Call %s -> %s', id, destinationNumber);
log.debug('Call %s -> %s ->', id, destinationNumber, context);

globalCollection.getGlobalVariables(conn, conn.channelData.getHeader('Core-UUID'), function (err, globalVariable) {
if (err) {
Expand All @@ -97,7 +97,7 @@ class Acr extends EventEmitter2 {

conn.execute('set', 'sound_prefix=' + soundPref);

if (context == PUBLIC_CONTEXT) {
if (context === PUBLIC_CONTEXT) {
publicContext(conn, destinationNumber, globalVariable, !conn.channelData.getHeader('variable_webitel_direction'));
} else if (dialerId) {
dialerContext(conn, dialerId, globalVariable, !conn.channelData.getHeader('variable_webitel_direction'));
Expand Down
5 changes: 1 addition & 4 deletions src/middleware/dialplan/internalExtansion.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ module.exports = function (conn, userId, domainName) {
conn.api('user_exists id ' + userId + ' ' + domainName, function (res) {
try {
if (res && res['body'] === "false") {
execSyncApp(conn, "answer");
execSyncApp(conn, "sleep", "1500");
execSyncApp(conn, "playback", "ivr/ivr-you_have_dialed_an_invalid_extension.wav");
execSyncApp(conn, "hangup", "UNALLOCATED_NUMBER");
execSyncApp(conn, "hangup", "NO_ROUTE_DESTINATION");
} else {
execSyncApp(conn, "set", "continue_on_fail=true");
execSyncApp(conn, "set", "hangup_after_bridge=true");
Expand Down

0 comments on commit 02d0d6f

Please sign in to comment.