Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / components / realtime / queues.js
index 32cc163..658dd9c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xefe4=['inbound','concat','map','outbound','originated','pick','initializeQueues','lodash','client','http','available','loggedIn','paused','busy','inUse','invalid','loggedInDb','notInUse','ringInUse','talking','unavailable','unknown','pTalking','message','statusMessage','dialActive','dialMethod','Trunk','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','voice','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','catch','getRealtimeQueues'];(function(_0x1cfca7,_0x462449){var _0x2f6329=function(_0x51543c){while(--_0x51543c){_0x1cfca7['push'](_0x1cfca7['shift']());}};_0x2f6329(++_0x462449);}(_0xefe4,0xa0));var _0x4efe=function(_0x12093c,_0x5919af){_0x12093c=_0x12093c-0x0;var _0x514cbb=_0xefe4[_0x12093c];return _0x514cbb;};'use strict';var _=require(_0x4efe('0x0'));var jayson=require('jayson/promise');var util=require('util');var amiClient=jayson[_0x4efe('0x1')][_0x4efe('0x2')]({'port':0x232a});var routingClient=jayson['client']['http']({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x4efe('0x3'),_0x4efe('0x4'),_0x4efe('0x5'),'waiting'];var VOICE_QUEUE_ATTRIBUTES=[_0x4efe('0x6'),_0x4efe('0x7'),_0x4efe('0x8'),_0x4efe('0x9'),_0x4efe('0xa'),'onHold','ringing',_0x4efe('0xb'),_0x4efe('0xc'),_0x4efe('0xd'),_0x4efe('0xe')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x4efe('0xf'),'originated',_0x4efe('0x10'),_0x4efe('0x11'),_0x4efe('0x12'),_0x4efe('0x13'),_0x4efe('0x14'),_0x4efe('0x15'),_0x4efe('0x16'),_0x4efe('0x17'),_0x4efe('0x18'),_0x4efe('0x19'),_0x4efe('0x1a'),_0x4efe('0x1b'),_0x4efe('0x1c'),_0x4efe('0x1d'),_0x4efe('0x1e'),'predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls',_0x4efe('0x1f'),_0x4efe('0x20'),_0x4efe('0x21'),'predictiveIntervalAvgTalktime'];function getRealtimeQueues(_0x3c5597,_0x1ef2f5){var _0x13eb68=_0x1ef2f5===_0x4efe('0x22')?amiClient:routingClient;return _0x13eb68[_0x4efe('0x23')](_[_0x4efe('0x24')](_0x1ef2f5)+_0x4efe('0x25'),_0x3c5597)[_0x4efe('0x26')](function(_0x25bd9f){if(_0x25bd9f[_0x4efe('0x27')])throw new Error(util[_0x4efe('0x28')](_0x4efe('0x29'),_0x1ef2f5));return _0x25bd9f['result'];})[_0x4efe('0x2a')](function(_0x40e19c){throw _0x40e19c;});}exports[_0x4efe('0x2b')]=getRealtimeQueues;function initializeQueues(_0x563cfc,_0x31d5cd,_0x51999d,_0x432cb8){var _0x55dbc1=DEFAULT_QUEUE_ATTRIBUTES;if(_0x51999d==='voice'){if(_0x432cb8===_0x4efe('0x2c')){_0x55dbc1=_0x55dbc1[_0x4efe('0x2d')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x432cb8==='outbound'){_0x55dbc1=_0x55dbc1[_0x4efe('0x2d')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x563cfc[_0x4efe('0x2e')](function(_0x2b768d){var _0xce899d=_0x2b768d['get']({'plain':!![]});_0xce899d[_0x4efe('0x5')]=0x0;_0xce899d[_0x4efe('0x9')]=0x0;_0xce899d[_0x4efe('0x4')]=0x0;_0xce899d[_0x4efe('0x3')]=0x0;_0xce899d['waiting']=0x0;if(_0x51999d===_0x4efe('0x22')){_0xce899d[_0x4efe('0xc')]=0x0;_0xce899d[_0x4efe('0x6')]=0x0;if(_0x432cb8===_0x4efe('0x2f')){_0xce899d[_0x4efe('0xf')]=0x0;_0xce899d[_0x4efe('0x30')]=0x0;}}var _0x42fe15=_['find'](_0x31d5cd,['id',_0xce899d['id']]);if(_0x42fe15){_['merge'](_0xce899d,_[_0x4efe('0x31')](_0x42fe15,_0x55dbc1));}return _0xce899d;});}exports[_0x4efe('0x32')]=initializeQueues;
\ No newline at end of file
+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