Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / components / realtime / queues.js
index a867c55..2f9b98a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x78a6=['paused','waiting','busy','inUse','invalid','loggedInDb','notInUse','onHold','ringing','ringInUse','talking','unavailable','unknown','message','dialMethod','Trunk','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','request','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','voice','concat','outbound','map','get','loggedIn','originated','find','merge','pick','initializeQueues','lodash','util','client','http'];(function(_0x480d8b,_0x5a5722){var _0x2861ae=function(_0x4cee76){while(--_0x4cee76){_0x480d8b['push'](_0x480d8b['shift']());}};_0x2861ae(++_0x5a5722);}(_0x78a6,0x140));var _0x678a=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0x78a6[_0x12d033];return _0x3b4e80;};'use strict';var _=require(_0x678a('0x0'));var jayson=require('jayson/promise');var util=require(_0x678a('0x1'));var amiClient=jayson[_0x678a('0x2')][_0x678a('0x3')]({'port':0x232a});var routingClient=jayson[_0x678a('0x2')][_0x678a('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available','loggedIn',_0x678a('0x4'),_0x678a('0x5')];var VOICE_QUEUE_ATTRIBUTES=[_0x678a('0x6'),_0x678a('0x7'),_0x678a('0x8'),_0x678a('0x9'),_0x678a('0xa'),_0x678a('0xb'),_0x678a('0xc'),_0x678a('0xd'),_0x678a('0xe'),_0x678a('0xf'),_0x678a('0x10')];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking','originated',_0x678a('0x11'),'statusMessage','dialActive',_0x678a('0x12'),_0x678a('0x13'),'startPredictive',_0x678a('0x14'),_0x678a('0x15'),_0x678a('0x16'),_0x678a('0x17'),_0x678a('0x18'),_0x678a('0x19'),_0x678a('0x1a'),_0x678a('0x1b'),_0x678a('0x1c'),'predictiveIntervalTotalCalls',_0x678a('0x1d'),_0x678a('0x1e'),_0x678a('0x1f'),_0x678a('0x20'),_0x678a('0x21')];function getRealtimeQueues(_0x5e2c65,_0x42363c){var _0x3279bd=_0x42363c==='voice'?amiClient:routingClient;return _0x3279bd[_0x678a('0x22')](_['startCase'](_0x42363c)+_0x678a('0x23'),_0x5e2c65)[_0x678a('0x24')](function(_0x1956f7){if(_0x1956f7[_0x678a('0x25')])throw new Error(util[_0x678a('0x26')](_0x678a('0x27'),_0x42363c));return _0x1956f7[_0x678a('0x28')];})[_0x678a('0x29')](function(_0x3188a0){throw _0x3188a0;});}exports[_0x678a('0x2a')]=getRealtimeQueues;function initializeQueues(_0xf1995,_0x3f1ebe,_0x16a056,_0x1c577b){var _0x467ebb=DEFAULT_QUEUE_ATTRIBUTES;if(_0x16a056===_0x678a('0x2b')){if(_0x1c577b==='inbound'){_0x467ebb=_0x467ebb[_0x678a('0x2c')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x1c577b===_0x678a('0x2d')){_0x467ebb=_0x467ebb[_0x678a('0x2c')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0xf1995[_0x678a('0x2e')](function(_0x415bef){var _0x45f6a8=_0x415bef[_0x678a('0x2f')]({'plain':!![]});_0x45f6a8['paused']=0x0;_0x45f6a8[_0x678a('0x9')]=0x0;_0x45f6a8[_0x678a('0x30')]=0x0;_0x45f6a8['available']=0x0;_0x45f6a8[_0x678a('0x5')]=0x0;if(_0x16a056===_0x678a('0x2b')){_0x45f6a8['talking']=0x0;_0x45f6a8[_0x678a('0x6')]=0x0;if(_0x1c577b===_0x678a('0x2d')){_0x45f6a8['pTalking']=0x0;_0x45f6a8[_0x678a('0x31')]=0x0;}}var _0x574b0b=_[_0x678a('0x32')](_0x3f1ebe,['id',_0x45f6a8['id']]);if(_0x574b0b){_[_0x678a('0x33')](_0x45f6a8,_[_0x678a('0x34')](_0x574b0b,_0x467ebb));}return _0x45f6a8;});}exports[_0x678a('0x35')]=initializeQueues;
\ No newline at end of file
+var _0x8508=['erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','catch','inbound','concat','outbound','get','loggedIn','talking','find','merge','pick','lodash','jayson/promise','util','http','available','paused','waiting','busy','invalid','loggedInDb','notInUse','onHold','ringing','unavailable','unknown','pTalking','originated','message','statusMessage','dialActive','dialMethod','startPredictive','startProgressive','erlangAbandonmentRate'];(function(_0x1d1994,_0x502d95){var _0x1a8597=function(_0xf07a0e){while(--_0xf07a0e){_0x1d1994['push'](_0x1d1994['shift']());}};_0x1a8597(++_0x502d95);}(_0x8508,0x81));var _0x8850=function(_0x15142f,_0x567b64){_0x15142f=_0x15142f-0x0;var _0x274859=_0x8508[_0x15142f];return _0x274859;};'use strict';var _=require(_0x8850('0x0'));var jayson=require(_0x8850('0x1'));var util=require(_0x8850('0x2'));var amiClient=jayson['client'][_0x8850('0x3')]({'port':0x232a});var routingClient=jayson['client'][_0x8850('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x8850('0x4'),'loggedIn',_0x8850('0x5'),_0x8850('0x6')];var VOICE_QUEUE_ATTRIBUTES=[_0x8850('0x7'),'inUse',_0x8850('0x8'),_0x8850('0x9'),_0x8850('0xa'),_0x8850('0xb'),_0x8850('0xc'),'ringInUse','talking',_0x8850('0xd'),_0x8850('0xe')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x8850('0xf'),_0x8850('0x10'),_0x8850('0x11'),_0x8850('0x12'),_0x8850('0x13'),_0x8850('0x14'),'Trunk',_0x8850('0x15'),_0x8850('0x16'),'erlangCalls','erlangCallToSecond',_0x8850('0x17'),_0x8850('0x18'),_0x8850('0x19'),_0x8850('0x1a'),_0x8850('0x1b'),_0x8850('0x1c'),_0x8850('0x1d'),'predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout',_0x8850('0x1e'),_0x8850('0x1f'),_0x8850('0x20')];function getRealtimeQueues(_0x43f268,_0x261477){var _0x6609f0=_0x261477===_0x8850('0x21')?amiClient:routingClient;return _0x6609f0[_0x8850('0x22')](_[_0x8850('0x23')](_0x261477)+_0x8850('0x24'),_0x43f268)[_0x8850('0x25')](function(_0x328e4c){if(_0x328e4c[_0x8850('0x26')])throw new Error(util[_0x8850('0x27')](_0x8850('0x28'),_0x261477));return _0x328e4c['result'];})[_0x8850('0x29')](function(_0x5b3e94){throw _0x5b3e94;});}exports['getRealtimeQueues']=getRealtimeQueues;function initializeQueues(_0x1b9186,_0x556f2d,_0x4195b2,_0x654469){var _0x5aa62d=DEFAULT_QUEUE_ATTRIBUTES;if(_0x4195b2==='voice'){if(_0x654469===_0x8850('0x2a')){_0x5aa62d=_0x5aa62d[_0x8850('0x2b')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x654469===_0x8850('0x2c')){_0x5aa62d=_0x5aa62d['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x1b9186['map'](function(_0x2a4f74){var _0x94d7bf=_0x2a4f74[_0x8850('0x2d')]({'plain':!![]});_0x94d7bf[_0x8850('0x5')]=0x0;_0x94d7bf[_0x8850('0x9')]=0x0;_0x94d7bf[_0x8850('0x2e')]=0x0;_0x94d7bf['available']=0x0;_0x94d7bf[_0x8850('0x6')]=0x0;if(_0x4195b2===_0x8850('0x21')){_0x94d7bf[_0x8850('0x2f')]=0x0;_0x94d7bf[_0x8850('0x7')]=0x0;if(_0x654469===_0x8850('0x2c')){_0x94d7bf[_0x8850('0xf')]=0x0;_0x94d7bf[_0x8850('0x10')]=0x0;}}var _0x2ca8af=_[_0x8850('0x30')](_0x556f2d,['id',_0x94d7bf['id']]);if(_0x2ca8af){_[_0x8850('0x31')](_0x94d7bf,_[_0x8850('0x32')](_0x2ca8af,_0x5aa62d));}return _0x94d7bf;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file