Built motion from commit 39adb707.|2.6.14
[motion2.git] / server / components / realtime / queues.js
index 38522cb..21d5f76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8109=['startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','inbound','outbound','concat','map','get','merge','pick','initializeQueues','lodash','jayson/promise','util','client','http','available','loggedIn','paused','waiting','busy','invalid','loggedInDb','notInUse','onHold','ringing','ringInUse','unavailable','unknown','pTalking','originated','message','statusMessage','dialMethod','Trunk','startPredictive'];(function(_0x3ac173,_0x208130){var _0x30e23a=function(_0x4dbcda){while(--_0x4dbcda){_0x3ac173['push'](_0x3ac173['shift']());}};_0x30e23a(++_0x208130);}(_0x8109,0xf5));var _0x9810=function(_0x321e25,_0x3d3186){_0x321e25=_0x321e25-0x0;var _0x5112ef=_0x8109[_0x321e25];return _0x5112ef;};'use strict';var _=require(_0x9810('0x0'));var jayson=require(_0x9810('0x1'));var util=require(_0x9810('0x2'));var amiClient=jayson[_0x9810('0x3')][_0x9810('0x4')]({'port':0x232a});var routingClient=jayson[_0x9810('0x3')][_0x9810('0x4')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x9810('0x5'),_0x9810('0x6'),_0x9810('0x7'),_0x9810('0x8')];var VOICE_QUEUE_ATTRIBUTES=[_0x9810('0x9'),'inUse',_0x9810('0xa'),_0x9810('0xb'),_0x9810('0xc'),_0x9810('0xd'),_0x9810('0xe'),_0x9810('0xf'),'talking',_0x9810('0x10'),_0x9810('0x11')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x9810('0x12'),_0x9810('0x13'),_0x9810('0x14'),_0x9810('0x15'),'dialActive',_0x9810('0x16'),_0x9810('0x17'),_0x9810('0x18'),_0x9810('0x19'),_0x9810('0x1a'),_0x9810('0x1b'),_0x9810('0x1c'),_0x9810('0x1d'),_0x9810('0x1e'),_0x9810('0x1f'),_0x9810('0x20'),'predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls',_0x9810('0x21'),'predictiveIntervalDroppedCallsCallersExit',_0x9810('0x22'),_0x9810('0x23')];function getRealtimeQueues(_0xeee2ad,_0x50dff0){var _0x390705=_0x50dff0===_0x9810('0x24')?amiClient:routingClient;return _0x390705[_0x9810('0x25')](_[_0x9810('0x26')](_0x50dff0)+_0x9810('0x27'),_0xeee2ad)[_0x9810('0x28')](function(_0x23c2a8){if(_0x23c2a8[_0x9810('0x29')])throw new Error(util[_0x9810('0x2a')](_0x9810('0x2b'),_0x50dff0));return _0x23c2a8[_0x9810('0x2c')];})[_0x9810('0x2d')](function(_0x3f3194){throw _0x3f3194;});}exports['getRealtimeQueues']=getRealtimeQueues;function initializeQueues(_0x500494,_0x41303c,_0x1c213e,_0x3aee3f){var _0x4f526b=DEFAULT_QUEUE_ATTRIBUTES;if(_0x1c213e==='voice'){if(_0x3aee3f===_0x9810('0x2e')){_0x4f526b=_0x4f526b['concat'](VOICE_QUEUE_ATTRIBUTES);}else if(_0x3aee3f===_0x9810('0x2f')){_0x4f526b=_0x4f526b[_0x9810('0x30')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x500494[_0x9810('0x31')](function(_0x1b1d4e){var _0x458ebc=_0x1b1d4e[_0x9810('0x32')]({'plain':!![]});_0x458ebc['paused']=0x0;_0x458ebc[_0x9810('0xb')]=0x0;_0x458ebc['loggedIn']=0x0;_0x458ebc[_0x9810('0x5')]=0x0;_0x458ebc[_0x9810('0x8')]=0x0;if(_0x1c213e==='voice'){_0x458ebc['talking']=0x0;_0x458ebc[_0x9810('0x9')]=0x0;if(_0x3aee3f===_0x9810('0x2f')){_0x458ebc[_0x9810('0x12')]=0x0;_0x458ebc[_0x9810('0x13')]=0x0;}}var _0x428969=_['find'](_0x41303c,['id',_0x458ebc['id']]);if(_0x428969){_[_0x9810('0x33')](_0x458ebc,_[_0x9810('0x34')](_0x428969,_0x4f526b));}return _0x458ebc;});}exports[_0x9810('0x35')]=initializeQueues;
\ No newline at end of file
+var _0xf24c=['loggedInDb','outbound','pTalking','find','pick','initializeQueues','lodash','jayson/promise','util','available','loggedIn','paused','waiting','busy','notInUse','onHold','ringing','ringInUse','talking','unavailable','unknown','originated','message','statusMessage','dialActive','dialMethod','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','inbound','concat','map','get'];(function(_0x49d514,_0x367136){var _0x5525b6=function(_0x469635){while(--_0x469635){_0x49d514['push'](_0x49d514['shift']());}};_0x5525b6(++_0x367136);}(_0xf24c,0x144));var _0xcf24=function(_0x3964e4,_0x1f18b2){_0x3964e4=_0x3964e4-0x0;var _0x487af7=_0xf24c[_0x3964e4];return _0x487af7;};'use strict';var _=require(_0xcf24('0x0'));var jayson=require(_0xcf24('0x1'));var util=require(_0xcf24('0x2'));var amiClient=jayson['client']['http']({'port':0x232a});var routingClient=jayson['client']['http']({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0xcf24('0x3'),_0xcf24('0x4'),_0xcf24('0x5'),_0xcf24('0x6')];var VOICE_QUEUE_ATTRIBUTES=[_0xcf24('0x7'),'inUse','invalid','loggedInDb',_0xcf24('0x8'),_0xcf24('0x9'),_0xcf24('0xa'),_0xcf24('0xb'),_0xcf24('0xc'),_0xcf24('0xd'),_0xcf24('0xe')];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking',_0xcf24('0xf'),_0xcf24('0x10'),_0xcf24('0x11'),_0xcf24('0x12'),_0xcf24('0x13'),'Trunk',_0xcf24('0x14'),_0xcf24('0x15'),_0xcf24('0x16'),_0xcf24('0x17'),'erlangAbandonmentRate',_0xcf24('0x18'),_0xcf24('0x19'),_0xcf24('0x1a'),_0xcf24('0x1b'),'predictiveIntervalAvailable','predictiveIntervalTotalCalls',_0xcf24('0x1c'),_0xcf24('0x1d'),_0xcf24('0x1e'),_0xcf24('0x1f'),_0xcf24('0x20')];function getRealtimeQueues(_0x468c53,_0xbf92b3){var _0x3c9671=_0xbf92b3===_0xcf24('0x21')?amiClient:routingClient;return _0x3c9671[_0xcf24('0x22')](_[_0xcf24('0x23')](_0xbf92b3)+_0xcf24('0x24'),_0x468c53)[_0xcf24('0x25')](function(_0x21bc3c){if(_0x21bc3c['error'])throw new Error(util[_0xcf24('0x26')](_0xcf24('0x27'),_0xbf92b3));return _0x21bc3c[_0xcf24('0x28')];})[_0xcf24('0x29')](function(_0x32bf03){throw _0x32bf03;});}exports[_0xcf24('0x2a')]=getRealtimeQueues;function initializeQueues(_0x2c0cc9,_0x564b26,_0xc49fa8,_0x5e1930){var _0x24b00f=DEFAULT_QUEUE_ATTRIBUTES;if(_0xc49fa8===_0xcf24('0x21')){if(_0x5e1930===_0xcf24('0x2b')){_0x24b00f=_0x24b00f['concat'](VOICE_QUEUE_ATTRIBUTES);}else if(_0x5e1930==='outbound'){_0x24b00f=_0x24b00f[_0xcf24('0x2c')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x2c0cc9[_0xcf24('0x2d')](function(_0x459d32){var _0x3738aa=_0x459d32[_0xcf24('0x2e')]({'plain':!![]});_0x3738aa[_0xcf24('0x5')]=0x0;_0x3738aa[_0xcf24('0x2f')]=0x0;_0x3738aa[_0xcf24('0x4')]=0x0;_0x3738aa[_0xcf24('0x3')]=0x0;_0x3738aa[_0xcf24('0x6')]=0x0;if(_0xc49fa8===_0xcf24('0x21')){_0x3738aa[_0xcf24('0xc')]=0x0;_0x3738aa['busy']=0x0;if(_0x5e1930===_0xcf24('0x30')){_0x3738aa[_0xcf24('0x31')]=0x0;_0x3738aa[_0xcf24('0xf')]=0x0;}}var _0x171803=_[_0xcf24('0x32')](_0x564b26,['id',_0x3738aa['id']]);if(_0x171803){_['merge'](_0x3738aa,_[_0xcf24('0x33')](_0x171803,_0x24b00f));}return _0x3738aa;});}exports[_0xcf24('0x34')]=initializeQueues;
\ No newline at end of file