Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / services / ami / dialer / utils / hopper.js
index 18b55b3..968e639 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['moveContactManagedDialer','[moveContactManagedDialer]','checkIsBlackList','[checkIsBlackListIvr]','checkIsBlackListIvr','verifyAdditionalPhones','[verifyAdditionalPhone]','swapAdditionalPhones','[swapAdditionalPhone]','avgHandleTime','[avgHandleTime]','[createHistory]','createHistory','util','../../../../config/logger','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','dialOrderByScheduledAt','catch','temp','error','[getContactDialer]','getContactDialerIvr','[getContactDialerIvr]','countReScheduled','[countReScheduled]','rescheduleContact','[rescheduleContact]','unlockContact','[unlockContact]'];(function(_0x4500af,_0x1f6997){var _0x335517=function(_0x27b76b){while(--_0x27b76b){_0x4500af['push'](_0x4500af['shift']());}};_0x335517(++_0x1f6997);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var util=require(_0x0d8b('0x0'));var logger=require(_0x0d8b('0x1'))('dialer');var cmHopper=require('../../rpc/cmHopper');var cmHopperAdditionalPhone=require('../../rpc/cmHopperAdditionalPhone');var cmHopperBlack=require(_0x0d8b('0x2'));var cmHopperHistory=require(_0x0d8b('0x3'));function inspectError(_0x43bca1){return util[_0x0d8b('0x4')](_0x43bca1,{'showHidden':![],'depth':null});}function getContactDialer(_0x8196ed,_0x577834,_0x5e15e6){return cmHopper[_0x0d8b('0x5')](_0x8196ed['id'],_0x577834,_0x5e15e6,_0x8196ed[_0x0d8b('0x6')])[_0x0d8b('0x7')](function(_0x4a4470){_0x8196ed[_0x0d8b('0x8')]-=_0x5e15e6;if(_0x8196ed[_0x0d8b('0x8')]<0x0){_0x8196ed['temp']=0x0;}logger[_0x0d8b('0x9')](_0x0d8b('0xa'),inspectError(_0x4a4470));});}exports[_0x0d8b('0x5')]=getContactDialer;function getContactDialerIvr(_0x1f4800,_0x28ff7f){return cmHopper[_0x0d8b('0xb')](_0x1f4800['id'],_0x28ff7f,_0x1f4800[_0x0d8b('0x6')])[_0x0d8b('0x7')](function(_0x48fa16){_0x1f4800[_0x0d8b('0x8')]-=_0x28ff7f;if(_0x1f4800['temp']<0x0){_0x1f4800[_0x0d8b('0x8')]=0x0;}logger[_0x0d8b('0x9')](_0x0d8b('0xc'),inspectError(_0x48fa16));});}exports[_0x0d8b('0xb')]=getContactDialerIvr;function countReScheduled(_0x35a07b){return cmHopper[_0x0d8b('0xd')](_0x35a07b)[_0x0d8b('0x7')](function(_0x31a8cc){logger[_0x0d8b('0x9')](_0x0d8b('0xe'),inspectError(_0x31a8cc));});}exports[_0x0d8b('0xd')]=countReScheduled;function rescheduleContact(_0xe65334){return cmHopper[_0x0d8b('0xf')](_0xe65334)[_0x0d8b('0x7')](function(_0x4f6f21){logger[_0x0d8b('0x9')](_0x0d8b('0x10'),inspectError(_0x4f6f21));});}exports[_0x0d8b('0xf')]=rescheduleContact;function unlockContact(_0xe2e167,_0x2cb03c,_0x5cd485){return cmHopper[_0x0d8b('0x11')](_0xe2e167,_0x2cb03c,_0x5cd485)[_0x0d8b('0x7')](function(_0x2fd0fc){logger[_0x0d8b('0x9')](_0x0d8b('0x12'),inspectError(_0x2fd0fc));});}exports[_0x0d8b('0x11')]=unlockContact;function moveContactManagedDialer(_0x264b39){return cmHopper[_0x0d8b('0x13')](_0x264b39)['catch'](function(_0x27512e){logger[_0x0d8b('0x9')](_0x0d8b('0x14'),inspectError(_0x27512e));});}exports[_0x0d8b('0x13')]=moveContactManagedDialer;function checkIsBlackList(_0x24e8ed){return cmHopperBlack[_0x0d8b('0x15')](_0x24e8ed)[_0x0d8b('0x7')](function(_0x352c17){logger['error']('[checkIsBlackList]',inspectError(_0x352c17));});}exports[_0x0d8b('0x15')]=checkIsBlackList;function checkIsBlackListIvr(_0x54a9a7){return cmHopperBlack['checkIsBlackListIvr'](_0x54a9a7)['catch'](function(_0x238728){logger[_0x0d8b('0x9')](_0x0d8b('0x16'),inspectError(_0x238728));});}exports[_0x0d8b('0x17')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x221071,_0x2c64e2,_0x30980c){return cmHopperAdditionalPhone[_0x0d8b('0x18')](_0x221071,_0x2c64e2,_0x30980c)[_0x0d8b('0x7')](function(_0x5e5bc3){logger[_0x0d8b('0x9')](_0x0d8b('0x19'),inspectError(_0x5e5bc3));});}exports['verifyAdditionalPhones']=verifyAdditionalPhones;function swapAdditionalPhones(_0xe1ef20,_0x4a0ae4,_0x3dd149){return cmHopperAdditionalPhone[_0x0d8b('0x1a')](_0xe1ef20,_0x4a0ae4,_0x3dd149)[_0x0d8b('0x7')](function(_0x4fe6f9){logger['error'](_0x0d8b('0x1b'),inspectError(_0x4fe6f9));});}exports[_0x0d8b('0x1a')]=swapAdditionalPhones;function avgHandleTime(_0x4c05ee){return cmHopperHistory[_0x0d8b('0x1c')](_0x4c05ee)['catch'](function(_0x1b2b59){logger['error'](_0x0d8b('0x1d'),inspectError(_0x1b2b59));});}exports['avgHandleTime']=avgHandleTime;function createHistory(_0x2ab00d){return cmHopperHistory['createHistory'](_0x2ab00d)[_0x0d8b('0x7')](function(_0x544735){logger[_0x0d8b('0x9')](_0x0d8b('0x1e'),inspectError(_0x544735));});}exports[_0x0d8b('0x1f')]=createHistory;
\ No newline at end of file
+var _0xfcf0=['[avgHandleTime]','createHistory','util','../../../../config/logger','../../rpc/cmHopper','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','dialOrderByScheduledAt','catch','error','[getContactDialer]','getContactDialerIvr','[getContactDialerIvr]','[countReScheduled]','countReScheduled','rescheduleContact','[rescheduleContact]','unlockContact','[unlockContact]','moveContactManagedDialer','[checkIsBlackList]','checkIsBlackListIvr','[checkIsBlackListIvr]','[verifyAdditionalPhone]','verifyAdditionalPhones','swapAdditionalPhones','[swapAdditionalPhone]','avgHandleTime'];(function(_0xe7d6cc,_0x47ca49){var _0xb8a74d=function(_0x42b6c6){while(--_0x42b6c6){_0xe7d6cc['push'](_0xe7d6cc['shift']());}};_0xb8a74d(++_0x47ca49);}(_0xfcf0,0x138));var _0x0fcf=function(_0xdaab62,_0x2728ab){_0xdaab62=_0xdaab62-0x0;var _0x13d767=_0xfcf0[_0xdaab62];return _0x13d767;};'use strict';var util=require(_0x0fcf('0x0'));var logger=require(_0x0fcf('0x1'))('dialer');var cmHopper=require(_0x0fcf('0x2'));var cmHopperAdditionalPhone=require(_0x0fcf('0x3'));var cmHopperBlack=require(_0x0fcf('0x4'));var cmHopperHistory=require(_0x0fcf('0x5'));function inspectError(_0x5c865e){return util[_0x0fcf('0x6')](_0x5c865e,{'showHidden':![],'depth':null});}function getContactDialer(_0x265968,_0x3bd34d,_0x3af316){return cmHopper[_0x0fcf('0x7')](_0x265968['id'],_0x3bd34d,_0x3af316,_0x265968[_0x0fcf('0x8')])[_0x0fcf('0x9')](function(_0x2dfdf8){_0x265968['temp']=0x0;logger[_0x0fcf('0xa')](_0x0fcf('0xb'),inspectError(_0x2dfdf8));});}exports[_0x0fcf('0x7')]=getContactDialer;function getContactDialerIvr(_0x4de593,_0x69a840){return cmHopper[_0x0fcf('0xc')](_0x4de593['id'],_0x69a840,_0x4de593[_0x0fcf('0x8')])['catch'](function(_0x369959){_0x4de593['temp']=0x0;logger[_0x0fcf('0xa')](_0x0fcf('0xd'),inspectError(_0x369959));});}exports[_0x0fcf('0xc')]=getContactDialerIvr;function countReScheduled(_0x48619c){return cmHopper['countReScheduled'](_0x48619c)[_0x0fcf('0x9')](function(_0x3c999e){logger['error'](_0x0fcf('0xe'),inspectError(_0x3c999e));});}exports[_0x0fcf('0xf')]=countReScheduled;function rescheduleContact(_0x160d2c){return cmHopper[_0x0fcf('0x10')](_0x160d2c)[_0x0fcf('0x9')](function(_0x48bba6){logger[_0x0fcf('0xa')](_0x0fcf('0x11'),inspectError(_0x48bba6));});}exports[_0x0fcf('0x10')]=rescheduleContact;function unlockContact(_0x5e867f,_0x3c09c4,_0x610106){return cmHopper[_0x0fcf('0x12')](_0x5e867f,_0x3c09c4,_0x610106)[_0x0fcf('0x9')](function(_0x48dd53){logger[_0x0fcf('0xa')](_0x0fcf('0x13'),inspectError(_0x48dd53));});}exports[_0x0fcf('0x12')]=unlockContact;function moveContactManagedDialer(_0x8581bd){return cmHopper[_0x0fcf('0x14')](_0x8581bd)['catch'](function(_0x18ea32){logger[_0x0fcf('0xa')]('[moveContactManagedDialer]',inspectError(_0x18ea32));});}exports[_0x0fcf('0x14')]=moveContactManagedDialer;function checkIsBlackList(_0x1b9a90){return cmHopperBlack['checkIsBlackList'](_0x1b9a90)[_0x0fcf('0x9')](function(_0x50ac4a){logger[_0x0fcf('0xa')](_0x0fcf('0x15'),inspectError(_0x50ac4a));});}exports['checkIsBlackList']=checkIsBlackList;function checkIsBlackListIvr(_0x457880){return cmHopperBlack[_0x0fcf('0x16')](_0x457880)[_0x0fcf('0x9')](function(_0x5c459c){logger[_0x0fcf('0xa')](_0x0fcf('0x17'),inspectError(_0x5c459c));});}exports[_0x0fcf('0x16')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x41b20b,_0x18af5c,_0x30e1b0){return cmHopperAdditionalPhone['verifyAdditionalPhones'](_0x41b20b,_0x18af5c,_0x30e1b0)[_0x0fcf('0x9')](function(_0x253641){logger[_0x0fcf('0xa')](_0x0fcf('0x18'),inspectError(_0x253641));});}exports[_0x0fcf('0x19')]=verifyAdditionalPhones;function swapAdditionalPhones(_0x3cf074,_0x2ce990,_0x18f269){return cmHopperAdditionalPhone[_0x0fcf('0x1a')](_0x3cf074,_0x2ce990,_0x18f269)['catch'](function(_0x18965e){logger[_0x0fcf('0xa')](_0x0fcf('0x1b'),inspectError(_0x18965e));});}exports[_0x0fcf('0x1a')]=swapAdditionalPhones;function avgHandleTime(_0x3876ed){return cmHopperHistory[_0x0fcf('0x1c')](_0x3876ed)[_0x0fcf('0x9')](function(_0x527d43){logger[_0x0fcf('0xa')](_0x0fcf('0x1d'),inspectError(_0x527d43));});}exports[_0x0fcf('0x1c')]=avgHandleTime;function createHistory(_0x35180d){return cmHopperHistory['createHistory'](_0x35180d)['catch'](function(_0x4af80d){logger[_0x0fcf('0xa')]('[createHistory]',inspectError(_0x4af80d));});}exports[_0x0fcf('0x1e')]=createHistory;
\ No newline at end of file