Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / components / realtime / queues.js
index 658dd9c..7980ac2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x598e=['erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','error','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','inbound','concat','map','get','talking','outbound','find','merge','pick','initializeQueues','lodash','jayson/promise','util','client','http','available','loggedIn','paused','waiting','busy','inUse','loggedInDb','onHold','ringing','ringInUse','unknown','pTalking','originated','message','statusMessage','dialActive','dialMethod','startPredictive','erlangCalls','erlangCallToSecond'];(function(_0x5d6324,_0x4990e6){var _0x54fae4=function(_0x34cb5c){while(--_0x34cb5c){_0x5d6324['push'](_0x5d6324['shift']());}};_0x54fae4(++_0x4990e6);}(_0x598e,0x12b));var _0xe598=function(_0x19e6e5,_0x13352d){_0x19e6e5=_0x19e6e5-0x0;var _0x149c2f=_0x598e[_0x19e6e5];return _0x149c2f;};'use strict';var _=require(_0xe598('0x0'));var jayson=require(_0xe598('0x1'));var util=require(_0xe598('0x2'));var amiClient=jayson[_0xe598('0x3')][_0xe598('0x4')]({'port':0x232a});var routingClient=jayson[_0xe598('0x3')][_0xe598('0x4')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0xe598('0x5'),_0xe598('0x6'),_0xe598('0x7'),_0xe598('0x8')];var VOICE_QUEUE_ATTRIBUTES=[_0xe598('0x9'),_0xe598('0xa'),'invalid',_0xe598('0xb'),'notInUse',_0xe598('0xc'),_0xe598('0xd'),_0xe598('0xe'),'talking','unavailable',_0xe598('0xf')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0xe598('0x10'),_0xe598('0x11'),_0xe598('0x12'),_0xe598('0x13'),_0xe598('0x14'),_0xe598('0x15'),'Trunk',_0xe598('0x16'),'startProgressive',_0xe598('0x17'),_0xe598('0x18'),'erlangAbandonmentRate',_0xe598('0x19'),_0xe598('0x1a'),'dialPredictiveIntervalMaxThreshold',_0xe598('0x1b'),'predictiveIntervalAvailable',_0xe598('0x1c'),_0xe598('0x1d'),_0xe598('0x1e'),_0xe598('0x1f'),_0xe598('0x20'),_0xe598('0x21')];function getRealtimeQueues(_0x42bb95,_0xbc1dd){var _0x671397=_0xbc1dd===_0xe598('0x22')?amiClient:routingClient;return _0x671397[_0xe598('0x23')](_[_0xe598('0x24')](_0xbc1dd)+_0xe598('0x25'),_0x42bb95)[_0xe598('0x26')](function(_0x32aefc){if(_0x32aefc[_0xe598('0x27')])throw new Error(util['format'](_0xe598('0x28'),_0xbc1dd));return _0x32aefc[_0xe598('0x29')];})[_0xe598('0x2a')](function(_0xdc504d){throw _0xdc504d;});}exports[_0xe598('0x2b')]=getRealtimeQueues;function initializeQueues(_0x4f40ea,_0x2a0037,_0x3913a8,_0xc97a47){var _0x3a540f=DEFAULT_QUEUE_ATTRIBUTES;if(_0x3913a8===_0xe598('0x22')){if(_0xc97a47===_0xe598('0x2c')){_0x3a540f=_0x3a540f[_0xe598('0x2d')](VOICE_QUEUE_ATTRIBUTES);}else if(_0xc97a47==='outbound'){_0x3a540f=_0x3a540f[_0xe598('0x2d')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x4f40ea[_0xe598('0x2e')](function(_0x2dbcbe){var _0x5cc683=_0x2dbcbe[_0xe598('0x2f')]({'plain':!![]});_0x5cc683['paused']=0x0;_0x5cc683[_0xe598('0xb')]=0x0;_0x5cc683[_0xe598('0x6')]=0x0;_0x5cc683[_0xe598('0x5')]=0x0;_0x5cc683[_0xe598('0x8')]=0x0;if(_0x3913a8===_0xe598('0x22')){_0x5cc683[_0xe598('0x30')]=0x0;_0x5cc683[_0xe598('0x9')]=0x0;if(_0xc97a47===_0xe598('0x31')){_0x5cc683[_0xe598('0x10')]=0x0;_0x5cc683['originated']=0x0;}}var _0x4863c6=_[_0xe598('0x32')](_0x2a0037,['id',_0x5cc683['id']]);if(_0x4863c6){_[_0xe598('0x33')](_0x5cc683,_[_0xe598('0x34')](_0x4863c6,_0x3a540f));}return _0x5cc683;});}exports[_0xe598('0x35')]=initializeQueues;
\ No newline at end of file
+var _0xa6d1=['loggedInDb','notInUse','unavailable','unknown','pTalking','originated','statusMessage','dialActive','dialMethod','Trunk','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','concat','map','get','talking','outbound','find','merge','pick','initializeQueues','lodash','jayson/promise','client','http','available','loggedIn','paused','waiting','inUse'];(function(_0x2a2117,_0x2b02b6){var _0x1daf90=function(_0x34385a){while(--_0x34385a){_0x2a2117['push'](_0x2a2117['shift']());}};_0x1daf90(++_0x2b02b6);}(_0xa6d1,0x1a7));var _0x1a6d=function(_0x52ff0a,_0x44590f){_0x52ff0a=_0x52ff0a-0x0;var _0x3f5b6a=_0xa6d1[_0x52ff0a];return _0x3f5b6a;};'use strict';var _=require(_0x1a6d('0x0'));var jayson=require(_0x1a6d('0x1'));var util=require('util');var amiClient=jayson[_0x1a6d('0x2')][_0x1a6d('0x3')]({'port':0x232a});var routingClient=jayson[_0x1a6d('0x2')][_0x1a6d('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x1a6d('0x4'),_0x1a6d('0x5'),_0x1a6d('0x6'),_0x1a6d('0x7')];var VOICE_QUEUE_ATTRIBUTES=['busy',_0x1a6d('0x8'),'invalid',_0x1a6d('0x9'),_0x1a6d('0xa'),'onHold','ringing','ringInUse','talking',_0x1a6d('0xb'),_0x1a6d('0xc')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x1a6d('0xd'),_0x1a6d('0xe'),'message',_0x1a6d('0xf'),_0x1a6d('0x10'),_0x1a6d('0x11'),_0x1a6d('0x12'),_0x1a6d('0x13'),_0x1a6d('0x14'),_0x1a6d('0x15'),_0x1a6d('0x16'),_0x1a6d('0x17'),_0x1a6d('0x18'),_0x1a6d('0x19'),_0x1a6d('0x1a'),_0x1a6d('0x1b'),'predictiveIntervalAvailable',_0x1a6d('0x1c'),_0x1a6d('0x1d'),_0x1a6d('0x1e'),_0x1a6d('0x1f'),_0x1a6d('0x20'),_0x1a6d('0x21')];function getRealtimeQueues(_0x38c738,_0x266062){var _0x565728=_0x266062===_0x1a6d('0x22')?amiClient:routingClient;return _0x565728[_0x1a6d('0x23')](_[_0x1a6d('0x24')](_0x266062)+_0x1a6d('0x25'),_0x38c738)[_0x1a6d('0x26')](function(_0x4ae0f2){if(_0x4ae0f2[_0x1a6d('0x27')])throw new Error(util[_0x1a6d('0x28')](_0x1a6d('0x29'),_0x266062));return _0x4ae0f2[_0x1a6d('0x2a')];})[_0x1a6d('0x2b')](function(_0x4835b7){throw _0x4835b7;});}exports[_0x1a6d('0x2c')]=getRealtimeQueues;function initializeQueues(_0x4cad87,_0x31ecf6,_0x4b0688,_0x25514b){var _0x35c847=DEFAULT_QUEUE_ATTRIBUTES;if(_0x4b0688===_0x1a6d('0x22')){if(_0x25514b==='inbound'){_0x35c847=_0x35c847[_0x1a6d('0x2d')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x25514b==='outbound'){_0x35c847=_0x35c847[_0x1a6d('0x2d')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x4cad87[_0x1a6d('0x2e')](function(_0x29a291){var _0x1fc5f6=_0x29a291[_0x1a6d('0x2f')]({'plain':!![]});_0x1fc5f6[_0x1a6d('0x6')]=0x0;_0x1fc5f6[_0x1a6d('0x9')]=0x0;_0x1fc5f6[_0x1a6d('0x5')]=0x0;_0x1fc5f6['available']=0x0;_0x1fc5f6[_0x1a6d('0x7')]=0x0;if(_0x4b0688==='voice'){_0x1fc5f6[_0x1a6d('0x30')]=0x0;_0x1fc5f6['busy']=0x0;if(_0x25514b===_0x1a6d('0x31')){_0x1fc5f6[_0x1a6d('0xd')]=0x0;_0x1fc5f6[_0x1a6d('0xe')]=0x0;}}var _0x36e4ee=_[_0x1a6d('0x32')](_0x31ecf6,['id',_0x1fc5f6['id']]);if(_0x36e4ee){_[_0x1a6d('0x33')](_0x1fc5f6,_[_0x1a6d('0x34')](_0x36e4ee,_0x35c847));}return _0x1fc5f6;});}exports[_0x1a6d('0x35')]=initializeQueues;
\ No newline at end of file