Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / components / realtime / queues.js
index 7badd96..6f41b88 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d24=['find','merge','pick','initializeQueues','lodash','jayson/promise','util','client','http','loggedIn','waiting','invalid','loggedInDb','notInUse','ringing','ringInUse','talking','unavailable','unknown','pTalking','originated','message','statusMessage','dialActive','dialMethod','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgTalktime','voice','startCase','then','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','concat','outbound','map','paused','busy'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x7d24,0x184));var _0x47d2=function(_0xe944b7,_0x515d61){_0xe944b7=_0xe944b7-0x0;var _0x390063=_0x7d24[_0xe944b7];return _0x390063;};'use strict';var _=require(_0x47d2('0x0'));var jayson=require(_0x47d2('0x1'));var util=require(_0x47d2('0x2'));var amiClient=jayson[_0x47d2('0x3')][_0x47d2('0x4')]({'port':0x232a});var routingClient=jayson[_0x47d2('0x3')]['http']({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available',_0x47d2('0x5'),'paused',_0x47d2('0x6')];var VOICE_QUEUE_ATTRIBUTES=['busy','inUse',_0x47d2('0x7'),_0x47d2('0x8'),_0x47d2('0x9'),'onHold',_0x47d2('0xa'),_0x47d2('0xb'),_0x47d2('0xc'),_0x47d2('0xd'),_0x47d2('0xe')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x47d2('0xf'),_0x47d2('0x10'),_0x47d2('0x11'),_0x47d2('0x12'),_0x47d2('0x13'),_0x47d2('0x14'),'Trunk',_0x47d2('0x15'),_0x47d2('0x16'),_0x47d2('0x17'),_0x47d2('0x18'),'erlangAbandonmentRate',_0x47d2('0x19'),_0x47d2('0x1a'),_0x47d2('0x1b'),_0x47d2('0x1c'),'predictiveIntervalAvailable',_0x47d2('0x1d'),'predictiveIntervalAnsweredCalls',_0x47d2('0x1e'),'predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime',_0x47d2('0x1f')];function getRealtimeQueues(_0x150543,_0x10726b){var _0x5eb90=_0x10726b===_0x47d2('0x20')?amiClient:routingClient;return _0x5eb90['request'](_[_0x47d2('0x21')](_0x10726b)+'Queues',_0x150543)[_0x47d2('0x22')](function(_0x493934){if(_0x493934['error'])throw new Error(util['format'](_0x47d2('0x23'),_0x10726b));return _0x493934[_0x47d2('0x24')];})[_0x47d2('0x25')](function(_0x11a33c){throw _0x11a33c;});}exports[_0x47d2('0x26')]=getRealtimeQueues;function initializeQueues(_0x56cade,_0x197324,_0x517add,_0x483e54){var _0x2e6bf=DEFAULT_QUEUE_ATTRIBUTES;if(_0x517add==='voice'){if(_0x483e54==='inbound'){_0x2e6bf=_0x2e6bf[_0x47d2('0x27')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x483e54===_0x47d2('0x28')){_0x2e6bf=_0x2e6bf[_0x47d2('0x27')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x56cade[_0x47d2('0x29')](function(_0x243d53){var _0x290ac2=_0x243d53['get']({'plain':!![]});_0x290ac2[_0x47d2('0x2a')]=0x0;_0x290ac2['loggedInDb']=0x0;_0x290ac2['loggedIn']=0x0;_0x290ac2['available']=0x0;_0x290ac2['waiting']=0x0;if(_0x517add===_0x47d2('0x20')){_0x290ac2[_0x47d2('0xc')]=0x0;_0x290ac2[_0x47d2('0x2b')]=0x0;if(_0x483e54==='outbound'){_0x290ac2[_0x47d2('0xf')]=0x0;_0x290ac2[_0x47d2('0x10')]=0x0;}}var _0x1fb2d3=_[_0x47d2('0x2c')](_0x197324,['id',_0x290ac2['id']]);if(_0x1fb2d3){_[_0x47d2('0x2d')](_0x290ac2,_[_0x47d2('0x2e')](_0x1fb2d3,_0x2e6bf));}return _0x290ac2;});}exports[_0x47d2('0x2f')]=initializeQueues;
\ No newline at end of file
+var _0x92d4=['startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalDroppedCallsCallersExit','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','getRealtimeQueues','inbound','concat','outbound','map','get','waiting','voice','find','merge','pick','lodash','jayson/promise','http','client','available','loggedIn','paused','inUse','invalid','loggedInDb','onHold','ringing','ringInUse','talking','unavailable','unknown','originated','message','statusMessage','dialActive','Trunk'];(function(_0x410be8,_0x1b4d64){var _0x39a7af=function(_0x5d0153){while(--_0x5d0153){_0x410be8['push'](_0x410be8['shift']());}};_0x39a7af(++_0x1b4d64);}(_0x92d4,0x1d5));var _0x492d=function(_0x41fddf,_0x515090){_0x41fddf=_0x41fddf-0x0;var _0x362dad=_0x92d4[_0x41fddf];return _0x362dad;};'use strict';var _=require(_0x492d('0x0'));var jayson=require(_0x492d('0x1'));var util=require('util');var amiClient=jayson['client'][_0x492d('0x2')]({'port':0x232a});var routingClient=jayson[_0x492d('0x3')][_0x492d('0x2')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x492d('0x4'),_0x492d('0x5'),_0x492d('0x6'),'waiting'];var VOICE_QUEUE_ATTRIBUTES=['busy',_0x492d('0x7'),_0x492d('0x8'),_0x492d('0x9'),'notInUse',_0x492d('0xa'),_0x492d('0xb'),_0x492d('0xc'),_0x492d('0xd'),_0x492d('0xe'),_0x492d('0xf')];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking',_0x492d('0x10'),_0x492d('0x11'),_0x492d('0x12'),_0x492d('0x13'),'dialMethod',_0x492d('0x14'),_0x492d('0x15'),_0x492d('0x16'),_0x492d('0x17'),_0x492d('0x18'),_0x492d('0x19'),_0x492d('0x1a'),_0x492d('0x1b'),_0x492d('0x1c'),_0x492d('0x1d'),'predictiveIntervalAvailable',_0x492d('0x1e'),'predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout',_0x492d('0x1f'),'predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime'];function getRealtimeQueues(_0xdf1c72,_0x552926){var _0x52860d=_0x552926==='voice'?amiClient:routingClient;return _0x52860d['request'](_[_0x492d('0x20')](_0x552926)+_0x492d('0x21'),_0xdf1c72)[_0x492d('0x22')](function(_0x32f2e5){if(_0x32f2e5[_0x492d('0x23')])throw new Error(util[_0x492d('0x24')](_0x492d('0x25'),_0x552926));return _0x32f2e5['result'];})['catch'](function(_0x13dc7e){throw _0x13dc7e;});}exports[_0x492d('0x26')]=getRealtimeQueues;function initializeQueues(_0x451f56,_0x20872f,_0x4f035c,_0x5eb9fe){var _0x39f5e2=DEFAULT_QUEUE_ATTRIBUTES;if(_0x4f035c==='voice'){if(_0x5eb9fe===_0x492d('0x27')){_0x39f5e2=_0x39f5e2[_0x492d('0x28')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x5eb9fe===_0x492d('0x29')){_0x39f5e2=_0x39f5e2[_0x492d('0x28')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x451f56[_0x492d('0x2a')](function(_0x3305c9){var _0x589dbc=_0x3305c9[_0x492d('0x2b')]({'plain':!![]});_0x589dbc['paused']=0x0;_0x589dbc[_0x492d('0x9')]=0x0;_0x589dbc['loggedIn']=0x0;_0x589dbc[_0x492d('0x4')]=0x0;_0x589dbc[_0x492d('0x2c')]=0x0;if(_0x4f035c===_0x492d('0x2d')){_0x589dbc[_0x492d('0xd')]=0x0;_0x589dbc['busy']=0x0;if(_0x5eb9fe===_0x492d('0x29')){_0x589dbc['pTalking']=0x0;_0x589dbc[_0x492d('0x10')]=0x0;}}var _0x133aec=_[_0x492d('0x2e')](_0x20872f,['id',_0x589dbc['id']]);if(_0x133aec){_[_0x492d('0x2f')](_0x589dbc,_[_0x492d('0x30')](_0x133aec,_0x39f5e2));}return _0x589dbc;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file