Built motion from commit ae138b72.|2.6.28
[motion2.git] / server / components / realtime / queues.js
index 69561e2..e7424c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc3d=['predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','voice','inbound','concat','map','get','talking','outbound','pTalking','find','pick','lodash','jayson/promise','util','client','http','available','loggedIn','paused','waiting','busy','invalid','loggedInDb','onHold','ringing','ringInUse','unavailable','message','statusMessage','dialActive','dialMethod','Trunk','startPredictive','erlangBusyFactor','dialPredictiveInterval','predictiveIntervalAvailable'];(function(_0x543084,_0x4337f5){var _0x306a57=function(_0x2769ed){while(--_0x2769ed){_0x543084['push'](_0x543084['shift']());}};_0x306a57(++_0x4337f5);}(_0xcc3d,0x1b2));var _0xdcc3=function(_0x494dfa,_0x34171b){_0x494dfa=_0x494dfa-0x0;var _0x4be2a6=_0xcc3d[_0x494dfa];return _0x4be2a6;};'use strict';var _=require(_0xdcc3('0x0'));var jayson=require(_0xdcc3('0x1'));var util=require(_0xdcc3('0x2'));var amiClient=jayson[_0xdcc3('0x3')][_0xdcc3('0x4')]({'port':0x232a});var routingClient=jayson[_0xdcc3('0x3')][_0xdcc3('0x4')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0xdcc3('0x5'),_0xdcc3('0x6'),_0xdcc3('0x7'),_0xdcc3('0x8')];var VOICE_QUEUE_ATTRIBUTES=[_0xdcc3('0x9'),'inUse',_0xdcc3('0xa'),_0xdcc3('0xb'),'notInUse',_0xdcc3('0xc'),_0xdcc3('0xd'),_0xdcc3('0xe'),'talking',_0xdcc3('0xf'),'unknown'];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking','originated',_0xdcc3('0x10'),_0xdcc3('0x11'),_0xdcc3('0x12'),_0xdcc3('0x13'),_0xdcc3('0x14'),_0xdcc3('0x15'),'startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate',_0xdcc3('0x16'),_0xdcc3('0x17'),'dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold',_0xdcc3('0x18'),_0xdcc3('0x19'),_0xdcc3('0x1a'),_0xdcc3('0x1b'),_0xdcc3('0x1c'),_0xdcc3('0x1d'),_0xdcc3('0x1e')];function getRealtimeQueues(_0x24160a,_0x14155d){var _0x17ba62=_0x14155d==='voice'?amiClient:routingClient;return _0x17ba62[_0xdcc3('0x1f')](_[_0xdcc3('0x20')](_0x14155d)+_0xdcc3('0x21'),_0x24160a)[_0xdcc3('0x22')](function(_0x286645){if(_0x286645[_0xdcc3('0x23')])throw new Error(util[_0xdcc3('0x24')](_0xdcc3('0x25'),_0x14155d));return _0x286645[_0xdcc3('0x26')];})[_0xdcc3('0x27')](function(_0x1600ea){throw _0x1600ea;});}exports[_0xdcc3('0x28')]=getRealtimeQueues;function initializeQueues(_0x5f8691,_0x4a494c,_0x32fcd9,_0x3984e0){var _0x532c14=DEFAULT_QUEUE_ATTRIBUTES;if(_0x32fcd9===_0xdcc3('0x29')){if(_0x3984e0===_0xdcc3('0x2a')){_0x532c14=_0x532c14[_0xdcc3('0x2b')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x3984e0==='outbound'){_0x532c14=_0x532c14['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x5f8691[_0xdcc3('0x2c')](function(_0x4ee0dd){var _0x360f83=_0x4ee0dd[_0xdcc3('0x2d')]({'plain':!![]});_0x360f83[_0xdcc3('0x7')]=0x0;_0x360f83[_0xdcc3('0xb')]=0x0;_0x360f83[_0xdcc3('0x6')]=0x0;_0x360f83[_0xdcc3('0x5')]=0x0;_0x360f83[_0xdcc3('0x8')]=0x0;if(_0x32fcd9===_0xdcc3('0x29')){_0x360f83[_0xdcc3('0x2e')]=0x0;_0x360f83[_0xdcc3('0x9')]=0x0;if(_0x3984e0===_0xdcc3('0x2f')){_0x360f83[_0xdcc3('0x30')]=0x0;_0x360f83['originated']=0x0;}}var _0x415f39=_[_0xdcc3('0x31')](_0x4a494c,['id',_0x360f83['id']]);if(_0x415f39){_['merge'](_0x360f83,_[_0xdcc3('0x32')](_0x415f39,_0x532c14));}return _0x360f83;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file
+var _0x807b=['voice','request','startCase','Queues','then','error','result','catch','getRealtimeQueues','concat','outbound','available','find','merge','pick','initializeQueues','lodash','jayson/promise','util','client','http','paused','waiting','busy','inUse','loggedInDb','notInUse','onHold','ringing','ringInUse','talking','unavailable','pTalking','originated','message','statusMessage','dialActive','dialMethod','Trunk','startPredictive','startProgressive','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime'];(function(_0x6866e3,_0x3ddb25){var _0x394cfe=function(_0x893aa8){while(--_0x893aa8){_0x6866e3['push'](_0x6866e3['shift']());}};_0x394cfe(++_0x3ddb25);}(_0x807b,0x14e));var _0xb807=function(_0x5adb83,_0xdbf39e){_0x5adb83=_0x5adb83-0x0;var _0x17e533=_0x807b[_0x5adb83];return _0x17e533;};'use strict';var _=require(_0xb807('0x0'));var jayson=require(_0xb807('0x1'));var util=require(_0xb807('0x2'));var amiClient=jayson[_0xb807('0x3')][_0xb807('0x4')]({'port':0x232a});var routingClient=jayson['client'][_0xb807('0x4')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available','loggedIn',_0xb807('0x5'),_0xb807('0x6')];var VOICE_QUEUE_ATTRIBUTES=[_0xb807('0x7'),_0xb807('0x8'),'invalid',_0xb807('0x9'),_0xb807('0xa'),_0xb807('0xb'),_0xb807('0xc'),_0xb807('0xd'),_0xb807('0xe'),_0xb807('0xf'),'unknown'];var OUTBOUND_QUEUE_ATTRIBUTES=[_0xb807('0x10'),_0xb807('0x11'),_0xb807('0x12'),_0xb807('0x13'),_0xb807('0x14'),_0xb807('0x15'),_0xb807('0x16'),_0xb807('0x17'),_0xb807('0x18'),'erlangCalls',_0xb807('0x19'),_0xb807('0x1a'),_0xb807('0x1b'),_0xb807('0x1c'),_0xb807('0x1d'),'dialPredictiveIntervalMinThreshold',_0xb807('0x1e'),_0xb807('0x1f'),_0xb807('0x20'),_0xb807('0x21'),_0xb807('0x22'),_0xb807('0x23'),_0xb807('0x24')];function getRealtimeQueues(_0x252ef3,_0x1a56ec){var _0xb35ebc=_0x1a56ec===_0xb807('0x25')?amiClient:routingClient;return _0xb35ebc[_0xb807('0x26')](_[_0xb807('0x27')](_0x1a56ec)+_0xb807('0x28'),_0x252ef3)[_0xb807('0x29')](function(_0x149216){if(_0x149216[_0xb807('0x2a')])throw new Error(util['format']('Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues',_0x1a56ec));return _0x149216[_0xb807('0x2b')];})[_0xb807('0x2c')](function(_0x399fcc){throw _0x399fcc;});}exports[_0xb807('0x2d')]=getRealtimeQueues;function initializeQueues(_0xbc811e,_0x5f3290,_0x33a230,_0x4f4d12){var _0x8d79f2=DEFAULT_QUEUE_ATTRIBUTES;if(_0x33a230===_0xb807('0x25')){if(_0x4f4d12==='inbound'){_0x8d79f2=_0x8d79f2[_0xb807('0x2e')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x4f4d12===_0xb807('0x2f')){_0x8d79f2=_0x8d79f2[_0xb807('0x2e')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0xbc811e['map'](function(_0x1e3cdc){var _0x5cade1=_0x1e3cdc['get']({'plain':!![]});_0x5cade1[_0xb807('0x5')]=0x0;_0x5cade1[_0xb807('0x9')]=0x0;_0x5cade1['loggedIn']=0x0;_0x5cade1[_0xb807('0x30')]=0x0;_0x5cade1[_0xb807('0x6')]=0x0;if(_0x33a230==='voice'){_0x5cade1[_0xb807('0xe')]=0x0;_0x5cade1[_0xb807('0x7')]=0x0;if(_0x4f4d12===_0xb807('0x2f')){_0x5cade1[_0xb807('0x10')]=0x0;_0x5cade1[_0xb807('0x11')]=0x0;}}var _0x12dd45=_[_0xb807('0x31')](_0x5f3290,['id',_0x5cade1['id']]);if(_0x12dd45){_[_0xb807('0x32')](_0x5cade1,_[_0xb807('0x33')](_0x12dd45,_0x8d79f2));}return _0x5cade1;});}exports[_0xb807('0x34')]=initializeQueues;
\ No newline at end of file