Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / services / ami / dialer / utils / hopper.js
index 968e639..492b94e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0xa46e=['getContactDialerIvr','countReScheduled','[countReScheduled]','[rescheduleContact]','rescheduleContact','unlockContact','[unlockContact]','moveContactManagedDialer','[moveContactManagedDialer]','checkIsBlackList','checkIsBlackListIvr','verifyAdditionalPhones','swapAdditionalPhones','[swapAdditionalPhone]','[avgHandleTime]','avgHandleTime','createHistory','[createHistory]','util','../../../../config/logger','../../rpc/cmHopper','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','dialOrderByScheduledAt','catch','temp','error','[getContactDialer]','getContactDialer','[getContactDialerIvr]'];(function(_0x2142ea,_0x5a8f39){var _0x53e2a9=function(_0xd6a441){while(--_0xd6a441){_0x2142ea['push'](_0x2142ea['shift']());}};_0x53e2a9(++_0x5a8f39);}(_0xa46e,0x8a));var _0xea46=function(_0x1ae31c,_0x8dcd2d){_0x1ae31c=_0x1ae31c-0x0;var _0x19519d=_0xa46e[_0x1ae31c];return _0x19519d;};'use strict';var util=require(_0xea46('0x0'));var logger=require(_0xea46('0x1'))('dialer');var cmHopper=require(_0xea46('0x2'));var cmHopperAdditionalPhone=require(_0xea46('0x3'));var cmHopperBlack=require(_0xea46('0x4'));var cmHopperHistory=require('../../rpc/cmHopperHistory');function inspectError(_0x19f135){return util['inspect'](_0x19f135,{'showHidden':![],'depth':null});}function getContactDialer(_0x3a2209,_0x47d633,_0x3599fc){return cmHopper['getContactDialer'](_0x3a2209['id'],_0x47d633,_0x3599fc,_0x3a2209[_0xea46('0x5')])[_0xea46('0x6')](function(_0x5f1cd1){_0x3a2209[_0xea46('0x7')]=0x0;logger[_0xea46('0x8')](_0xea46('0x9'),inspectError(_0x5f1cd1));});}exports[_0xea46('0xa')]=getContactDialer;function getContactDialerIvr(_0x468322,_0x4cf206){return cmHopper['getContactDialerIvr'](_0x468322['id'],_0x4cf206,_0x468322['dialOrderByScheduledAt'])[_0xea46('0x6')](function(_0x45550a){_0x468322['temp']=0x0;logger[_0xea46('0x8')](_0xea46('0xb'),inspectError(_0x45550a));});}exports[_0xea46('0xc')]=getContactDialerIvr;function countReScheduled(_0x594694){return cmHopper[_0xea46('0xd')](_0x594694)[_0xea46('0x6')](function(_0x4e10f3){logger[_0xea46('0x8')](_0xea46('0xe'),inspectError(_0x4e10f3));});}exports['countReScheduled']=countReScheduled;function rescheduleContact(_0x20955e){return cmHopper['rescheduleContact'](_0x20955e)[_0xea46('0x6')](function(_0x42c328){logger[_0xea46('0x8')](_0xea46('0xf'),inspectError(_0x42c328));});}exports[_0xea46('0x10')]=rescheduleContact;function unlockContact(_0x2ef436,_0x81ee45,_0x20a79c){return cmHopper[_0xea46('0x11')](_0x2ef436,_0x81ee45,_0x20a79c)['catch'](function(_0x2fa2f9){logger[_0xea46('0x8')](_0xea46('0x12'),inspectError(_0x2fa2f9));});}exports['unlockContact']=unlockContact;function moveContactManagedDialer(_0x58b4da){return cmHopper[_0xea46('0x13')](_0x58b4da)[_0xea46('0x6')](function(_0x5cf5dd){logger['error'](_0xea46('0x14'),inspectError(_0x5cf5dd));});}exports[_0xea46('0x13')]=moveContactManagedDialer;function checkIsBlackList(_0x4ff93d){return cmHopperBlack[_0xea46('0x15')](_0x4ff93d)[_0xea46('0x6')](function(_0x1adba1){logger[_0xea46('0x8')]('[checkIsBlackList]',inspectError(_0x1adba1));});}exports[_0xea46('0x15')]=checkIsBlackList;function checkIsBlackListIvr(_0x4e220f){return cmHopperBlack['checkIsBlackListIvr'](_0x4e220f)[_0xea46('0x6')](function(_0x59e431){logger['error']('[checkIsBlackListIvr]',inspectError(_0x59e431));});}exports[_0xea46('0x16')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x36f982,_0x3d1850,_0x5beb44){return cmHopperAdditionalPhone[_0xea46('0x17')](_0x36f982,_0x3d1850,_0x5beb44)['catch'](function(_0x12e688){logger[_0xea46('0x8')]('[verifyAdditionalPhone]',inspectError(_0x12e688));});}exports[_0xea46('0x17')]=verifyAdditionalPhones;function swapAdditionalPhones(_0x5480eb,_0x2b3a8f,_0x114bf9){return cmHopperAdditionalPhone[_0xea46('0x18')](_0x5480eb,_0x2b3a8f,_0x114bf9)['catch'](function(_0x5d2de1){logger[_0xea46('0x8')](_0xea46('0x19'),inspectError(_0x5d2de1));});}exports['swapAdditionalPhones']=swapAdditionalPhones;function avgHandleTime(_0x3b3928){return cmHopperHistory['avgHandleTime'](_0x3b3928)[_0xea46('0x6')](function(_0x51ca27){logger[_0xea46('0x8')](_0xea46('0x1a'),inspectError(_0x51ca27));});}exports[_0xea46('0x1b')]=avgHandleTime;function createHistory(_0x44517d){return cmHopperHistory[_0xea46('0x1c')](_0x44517d)[_0xea46('0x6')](function(_0x4a5149){logger[_0xea46('0x8')](_0xea46('0x1d'),inspectError(_0x4a5149));});}exports[_0xea46('0x1c')]=createHistory;
\ No newline at end of file