Built motion from commit 1ea47bf4.|2.6.34
[motion2.git] / server / components / realtime / queues.js
index de70dbf..ec2481d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc6d0=['concat','outbound','map','get','paused','available','find','merge','pick','jayson/promise','util','client','http','loggedIn','busy','inUse','invalid','loggedInDb','notInUse','onHold','ringing','unavailable','pTalking','originated','statusMessage','dialActive','Trunk','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','inbound'];(function(_0x18b32d,_0x5b5432){var _0x11a467=function(_0x54aea4){while(--_0x54aea4){_0x18b32d['push'](_0x18b32d['shift']());}};_0x11a467(++_0x5b5432);}(_0xc6d0,0xa2));var _0x0c6d=function(_0x4a6262,_0x4bfb8c){_0x4a6262=_0x4a6262-0x0;var _0x10385a=_0xc6d0[_0x4a6262];return _0x10385a;};'use strict';var _=require('lodash');var jayson=require(_0x0c6d('0x0'));var util=require(_0x0c6d('0x1'));var amiClient=jayson[_0x0c6d('0x2')][_0x0c6d('0x3')]({'port':0x232a});var routingClient=jayson['client'][_0x0c6d('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available',_0x0c6d('0x4'),'paused','waiting'];var VOICE_QUEUE_ATTRIBUTES=[_0x0c6d('0x5'),_0x0c6d('0x6'),_0x0c6d('0x7'),_0x0c6d('0x8'),_0x0c6d('0x9'),_0x0c6d('0xa'),_0x0c6d('0xb'),'ringInUse','talking',_0x0c6d('0xc'),'unknown'];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x0c6d('0xd'),_0x0c6d('0xe'),'message',_0x0c6d('0xf'),_0x0c6d('0x10'),'dialMethod',_0x0c6d('0x11'),_0x0c6d('0x12'),_0x0c6d('0x13'),_0x0c6d('0x14'),_0x0c6d('0x15'),'erlangAbandonmentRate',_0x0c6d('0x16'),_0x0c6d('0x17'),'dialPredictiveIntervalMaxThreshold',_0x0c6d('0x18'),_0x0c6d('0x19'),_0x0c6d('0x1a'),_0x0c6d('0x1b'),_0x0c6d('0x1c'),_0x0c6d('0x1d'),_0x0c6d('0x1e'),_0x0c6d('0x1f')];function getRealtimeQueues(_0x83acb0,_0x539821){var _0x203e25=_0x539821===_0x0c6d('0x20')?amiClient:routingClient;return _0x203e25[_0x0c6d('0x21')](_[_0x0c6d('0x22')](_0x539821)+'Queues',_0x83acb0)[_0x0c6d('0x23')](function(_0xec92ce){if(_0xec92ce[_0x0c6d('0x24')])throw new Error(util[_0x0c6d('0x25')](_0x0c6d('0x26'),_0x539821));return _0xec92ce[_0x0c6d('0x27')];})[_0x0c6d('0x28')](function(_0x2ec5e2){throw _0x2ec5e2;});}exports['getRealtimeQueues']=getRealtimeQueues;function initializeQueues(_0x1eb4aa,_0x1ccb75,_0x446b6c,_0x57d35c){var _0x2dd3f8=DEFAULT_QUEUE_ATTRIBUTES;if(_0x446b6c===_0x0c6d('0x20')){if(_0x57d35c===_0x0c6d('0x29')){_0x2dd3f8=_0x2dd3f8[_0x0c6d('0x2a')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x57d35c===_0x0c6d('0x2b')){_0x2dd3f8=_0x2dd3f8['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x1eb4aa[_0x0c6d('0x2c')](function(_0x87417c){var _0x2563de=_0x87417c[_0x0c6d('0x2d')]({'plain':!![]});_0x2563de[_0x0c6d('0x2e')]=0x0;_0x2563de[_0x0c6d('0x8')]=0x0;_0x2563de['loggedIn']=0x0;_0x2563de[_0x0c6d('0x2f')]=0x0;_0x2563de['waiting']=0x0;if(_0x446b6c===_0x0c6d('0x20')){_0x2563de['talking']=0x0;_0x2563de[_0x0c6d('0x5')]=0x0;if(_0x57d35c===_0x0c6d('0x2b')){_0x2563de['pTalking']=0x0;_0x2563de[_0x0c6d('0xe')]=0x0;}}var _0x460608=_[_0x0c6d('0x30')](_0x1ccb75,['id',_0x2563de['id']]);if(_0x460608){_[_0x0c6d('0x31')](_0x2563de,_[_0x0c6d('0x32')](_0x460608,_0x2dd3f8));}return _0x2563de;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file
+var _0xf39d=['catch','getRealtimeQueues','voice','concat','outbound','map','loggedIn','waiting','pTalking','find','merge','lodash','jayson/promise','client','http','busy','invalid','loggedInDb','notInUse','onHold','ringing','ringInUse','talking','originated','statusMessage','dialActive','startPredictive','startProgressive','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','request','startCase','Queues','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xf39d,0x183));var _0xdf39=function(_0xe0b81f,_0x1fb734){_0xe0b81f=_0xe0b81f-0x0;var _0x290e5e=_0xf39d[_0xe0b81f];return _0x290e5e;};'use strict';var _=require(_0xdf39('0x0'));var jayson=require(_0xdf39('0x1'));var util=require('util');var amiClient=jayson[_0xdf39('0x2')]['http']({'port':0x232a});var routingClient=jayson['client'][_0xdf39('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available','loggedIn','paused','waiting'];var VOICE_QUEUE_ATTRIBUTES=[_0xdf39('0x4'),'inUse',_0xdf39('0x5'),_0xdf39('0x6'),_0xdf39('0x7'),_0xdf39('0x8'),_0xdf39('0x9'),_0xdf39('0xa'),_0xdf39('0xb'),'unavailable','unknown'];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking',_0xdf39('0xc'),'message',_0xdf39('0xd'),_0xdf39('0xe'),'dialMethod','Trunk',_0xdf39('0xf'),_0xdf39('0x10'),'erlangCalls',_0xdf39('0x11'),_0xdf39('0x12'),_0xdf39('0x13'),_0xdf39('0x14'),_0xdf39('0x15'),_0xdf39('0x16'),_0xdf39('0x17'),_0xdf39('0x18'),_0xdf39('0x19'),_0xdf39('0x1a'),'predictiveIntervalDroppedCallsCallersExit',_0xdf39('0x1b'),_0xdf39('0x1c')];function getRealtimeQueues(_0x3e1ec6,_0x2f5d25){var _0x4bf033=_0x2f5d25==='voice'?amiClient:routingClient;return _0x4bf033[_0xdf39('0x1d')](_[_0xdf39('0x1e')](_0x2f5d25)+_0xdf39('0x1f'),_0x3e1ec6)['then'](function(_0xd0b472){if(_0xd0b472[_0xdf39('0x20')])throw new Error(util[_0xdf39('0x21')](_0xdf39('0x22'),_0x2f5d25));return _0xd0b472[_0xdf39('0x23')];})[_0xdf39('0x24')](function(_0x367998){throw _0x367998;});}exports[_0xdf39('0x25')]=getRealtimeQueues;function initializeQueues(_0x227761,_0x1da8ff,_0x2f7390,_0x216e4b){var _0x5d695e=DEFAULT_QUEUE_ATTRIBUTES;if(_0x2f7390===_0xdf39('0x26')){if(_0x216e4b==='inbound'){_0x5d695e=_0x5d695e[_0xdf39('0x27')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x216e4b===_0xdf39('0x28')){_0x5d695e=_0x5d695e['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x227761[_0xdf39('0x29')](function(_0x16615e){var _0x52478d=_0x16615e['get']({'plain':!![]});_0x52478d['paused']=0x0;_0x52478d['loggedInDb']=0x0;_0x52478d[_0xdf39('0x2a')]=0x0;_0x52478d['available']=0x0;_0x52478d[_0xdf39('0x2b')]=0x0;if(_0x2f7390===_0xdf39('0x26')){_0x52478d[_0xdf39('0xb')]=0x0;_0x52478d[_0xdf39('0x4')]=0x0;if(_0x216e4b===_0xdf39('0x28')){_0x52478d[_0xdf39('0x2c')]=0x0;_0x52478d[_0xdf39('0xc')]=0x0;}}var _0x3225a5=_[_0xdf39('0x2d')](_0x1da8ff,['id',_0x52478d['id']]);if(_0x3225a5){_[_0xdf39('0x2e')](_0x52478d,_['pick'](_0x3225a5,_0x5d695e));}return _0x52478d;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file