Built motion from commit 97f2f211.|2.6.31
[motion2.git] / server / components / realtime / queues.js
index 9fc57c5..a89a978 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0911=['predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','error','result','catch','getRealtimeQueues','inbound','concat','map','get','paused','waiting','busy','outbound','find','merge','pick','initializeQueues','lodash','jayson/promise','util','http','client','loggedIn','inUse','invalid','loggedInDb','notInUse','talking','unknown','pTalking','originated','message','dialMethod','Trunk','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls'];(function(_0x49412a,_0x19c919){var _0x289131=function(_0x5f3585){while(--_0x5f3585){_0x49412a['push'](_0x49412a['shift']());}};_0x289131(++_0x19c919);}(_0x0911,0x151));var _0x1091=function(_0x207d2f,_0x44400f){_0x207d2f=_0x207d2f-0x0;var _0x3c3498=_0x0911[_0x207d2f];return _0x3c3498;};'use strict';var _=require(_0x1091('0x0'));var jayson=require(_0x1091('0x1'));var util=require(_0x1091('0x2'));var amiClient=jayson['client'][_0x1091('0x3')]({'port':0x232a});var routingClient=jayson[_0x1091('0x4')]['http']({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available',_0x1091('0x5'),'paused','waiting'];var VOICE_QUEUE_ATTRIBUTES=['busy',_0x1091('0x6'),_0x1091('0x7'),_0x1091('0x8'),_0x1091('0x9'),'onHold','ringing','ringInUse',_0x1091('0xa'),'unavailable',_0x1091('0xb')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x1091('0xc'),_0x1091('0xd'),_0x1091('0xe'),'statusMessage','dialActive',_0x1091('0xf'),_0x1091('0x10'),_0x1091('0x11'),_0x1091('0x12'),_0x1091('0x13'),_0x1091('0x14'),'erlangAbandonmentRate',_0x1091('0x15'),_0x1091('0x16'),_0x1091('0x17'),_0x1091('0x18'),_0x1091('0x19'),_0x1091('0x1a'),_0x1091('0x1b'),_0x1091('0x1c'),_0x1091('0x1d'),_0x1091('0x1e'),_0x1091('0x1f')];function getRealtimeQueues(_0x20b43e,_0x344c6f){var _0x2bd56b=_0x344c6f===_0x1091('0x20')?amiClient:routingClient;return _0x2bd56b[_0x1091('0x21')](_[_0x1091('0x22')](_0x344c6f)+_0x1091('0x23'),_0x20b43e)['then'](function(_0x27fcc7){if(_0x27fcc7[_0x1091('0x24')])throw new Error(util['format']('Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues',_0x344c6f));return _0x27fcc7[_0x1091('0x25')];})[_0x1091('0x26')](function(_0xe05d1d){throw _0xe05d1d;});}exports[_0x1091('0x27')]=getRealtimeQueues;function initializeQueues(_0x48cfe7,_0x36b62e,_0x57eb00,_0x46e61e){var _0x478be9=DEFAULT_QUEUE_ATTRIBUTES;if(_0x57eb00==='voice'){if(_0x46e61e===_0x1091('0x28')){_0x478be9=_0x478be9['concat'](VOICE_QUEUE_ATTRIBUTES);}else if(_0x46e61e==='outbound'){_0x478be9=_0x478be9[_0x1091('0x29')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x48cfe7[_0x1091('0x2a')](function(_0xf2060c){var _0x206028=_0xf2060c[_0x1091('0x2b')]({'plain':!![]});_0x206028[_0x1091('0x2c')]=0x0;_0x206028[_0x1091('0x8')]=0x0;_0x206028[_0x1091('0x5')]=0x0;_0x206028['available']=0x0;_0x206028[_0x1091('0x2d')]=0x0;if(_0x57eb00===_0x1091('0x20')){_0x206028[_0x1091('0xa')]=0x0;_0x206028[_0x1091('0x2e')]=0x0;if(_0x46e61e===_0x1091('0x2f')){_0x206028[_0x1091('0xc')]=0x0;_0x206028[_0x1091('0xd')]=0x0;}}var _0x3cd4c6=_[_0x1091('0x30')](_0x36b62e,['id',_0x206028['id']]);if(_0x3cd4c6){_[_0x1091('0x31')](_0x206028,_[_0x1091('0x32')](_0x3cd4c6,_0x478be9));}return _0x206028;});}exports[_0x1091('0x33')]=initializeQueues;
\ No newline at end of file
+var _0x961f=['dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','inbound','outbound','concat','map','get','paused','loggedInDb','available','find','pick','initializeQueues','lodash','util','http','client','loggedIn','waiting','busy','notInUse','onHold','ringing','ringInUse','talking','unavailable','unknown','pTalking','originated','statusMessage','Trunk','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval'];(function(_0xb5036f,_0x3f0cb8){var _0x4f967d=function(_0x1bd41c){while(--_0x1bd41c){_0xb5036f['push'](_0xb5036f['shift']());}};_0x4f967d(++_0x3f0cb8);}(_0x961f,0x1bb));var _0xf961=function(_0x13fc2a,_0x505a7d){_0x13fc2a=_0x13fc2a-0x0;var _0x3fb4d6=_0x961f[_0x13fc2a];return _0x3fb4d6;};'use strict';var _=require(_0xf961('0x0'));var jayson=require('jayson/promise');var util=require(_0xf961('0x1'));var amiClient=jayson['client'][_0xf961('0x2')]({'port':0x232a});var routingClient=jayson[_0xf961('0x3')][_0xf961('0x2')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available',_0xf961('0x4'),'paused',_0xf961('0x5')];var VOICE_QUEUE_ATTRIBUTES=[_0xf961('0x6'),'inUse','invalid','loggedInDb',_0xf961('0x7'),_0xf961('0x8'),_0xf961('0x9'),_0xf961('0xa'),_0xf961('0xb'),_0xf961('0xc'),_0xf961('0xd')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0xf961('0xe'),_0xf961('0xf'),'message',_0xf961('0x10'),'dialActive','dialMethod',_0xf961('0x11'),_0xf961('0x12'),_0xf961('0x13'),_0xf961('0x14'),_0xf961('0x15'),_0xf961('0x16'),_0xf961('0x17'),_0xf961('0x18'),'dialPredictiveIntervalMaxThreshold',_0xf961('0x19'),_0xf961('0x1a'),_0xf961('0x1b'),_0xf961('0x1c'),_0xf961('0x1d'),'predictiveIntervalDroppedCallsCallersExit',_0xf961('0x1e'),_0xf961('0x1f')];function getRealtimeQueues(_0x5ef2b4,_0x1c8494){var _0x381ace=_0x1c8494===_0xf961('0x20')?amiClient:routingClient;return _0x381ace[_0xf961('0x21')](_[_0xf961('0x22')](_0x1c8494)+_0xf961('0x23'),_0x5ef2b4)['then'](function(_0x2ef26d){if(_0x2ef26d['error'])throw new Error(util[_0xf961('0x24')](_0xf961('0x25'),_0x1c8494));return _0x2ef26d[_0xf961('0x26')];})[_0xf961('0x27')](function(_0x34589f){throw _0x34589f;});}exports[_0xf961('0x28')]=getRealtimeQueues;function initializeQueues(_0xabefbd,_0x7fb3bb,_0x4269f4,_0x283ee3){var _0x2d0add=DEFAULT_QUEUE_ATTRIBUTES;if(_0x4269f4===_0xf961('0x20')){if(_0x283ee3===_0xf961('0x29')){_0x2d0add=_0x2d0add['concat'](VOICE_QUEUE_ATTRIBUTES);}else if(_0x283ee3===_0xf961('0x2a')){_0x2d0add=_0x2d0add[_0xf961('0x2b')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0xabefbd[_0xf961('0x2c')](function(_0x2464ab){var _0x3c191a=_0x2464ab[_0xf961('0x2d')]({'plain':!![]});_0x3c191a[_0xf961('0x2e')]=0x0;_0x3c191a[_0xf961('0x2f')]=0x0;_0x3c191a[_0xf961('0x4')]=0x0;_0x3c191a[_0xf961('0x30')]=0x0;_0x3c191a[_0xf961('0x5')]=0x0;if(_0x4269f4===_0xf961('0x20')){_0x3c191a['talking']=0x0;_0x3c191a[_0xf961('0x6')]=0x0;if(_0x283ee3==='outbound'){_0x3c191a['pTalking']=0x0;_0x3c191a['originated']=0x0;}}var _0x1f9789=_[_0xf961('0x31')](_0x7fb3bb,['id',_0x3c191a['id']]);if(_0x1f9789){_['merge'](_0x3c191a,_[_0xf961('0x32')](_0x1f9789,_0x2d0add));}return _0x3c191a;});}exports[_0xf961('0x33')]=initializeQueues;
\ No newline at end of file