Built motion from commit ff78e754.|2.6.29
[motion2.git] / server / components / realtime / queues.js
index 9261419..b5db9e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c38=['voice','inbound','concat','outbound','map','get','loggedInDb','pick','initializeQueues','client','http','available','loggedIn','paused','waiting','busy','invalid','onHold','ringing','ringInUse','talking','unavailable','unknown','pTalking','originated','dialActive','dialMethod','Trunk','startPredictive','erlangCalls','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','request','startCase','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','catch','getRealtimeQueues'];(function(_0x1b8050,_0x4d12c6){var _0x1ec2b1=function(_0x4c150a){while(--_0x4c150a){_0x1b8050['push'](_0x1b8050['shift']());}};_0x1ec2b1(++_0x4d12c6);}(_0x6c38,0x1c1));var _0x86c3=function(_0x4ff82e,_0x43cc73){_0x4ff82e=_0x4ff82e-0x0;var _0x2017c6=_0x6c38[_0x4ff82e];return _0x2017c6;};'use strict';var _=require('lodash');var jayson=require('jayson/promise');var util=require('util');var amiClient=jayson[_0x86c3('0x0')][_0x86c3('0x1')]({'port':0x232a});var routingClient=jayson[_0x86c3('0x0')][_0x86c3('0x1')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x86c3('0x2'),_0x86c3('0x3'),_0x86c3('0x4'),_0x86c3('0x5')];var VOICE_QUEUE_ATTRIBUTES=[_0x86c3('0x6'),'inUse',_0x86c3('0x7'),'loggedInDb','notInUse',_0x86c3('0x8'),_0x86c3('0x9'),_0x86c3('0xa'),_0x86c3('0xb'),_0x86c3('0xc'),_0x86c3('0xd')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x86c3('0xe'),_0x86c3('0xf'),'message','statusMessage',_0x86c3('0x10'),_0x86c3('0x11'),_0x86c3('0x12'),_0x86c3('0x13'),'startProgressive',_0x86c3('0x14'),'erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval',_0x86c3('0x15'),_0x86c3('0x16'),_0x86c3('0x17'),'predictiveIntervalTotalCalls',_0x86c3('0x18'),'predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit',_0x86c3('0x19'),_0x86c3('0x1a')];function getRealtimeQueues(_0x3bb766,_0xc0cebc){var _0x3b1efd=_0xc0cebc==='voice'?amiClient:routingClient;return _0x3b1efd[_0x86c3('0x1b')](_[_0x86c3('0x1c')](_0xc0cebc)+'Queues',_0x3bb766)[_0x86c3('0x1d')](function(_0x4eeaeb){if(_0x4eeaeb[_0x86c3('0x1e')])throw new Error(util[_0x86c3('0x1f')](_0x86c3('0x20'),_0xc0cebc));return _0x4eeaeb['result'];})[_0x86c3('0x21')](function(_0x45a387){throw _0x45a387;});}exports[_0x86c3('0x22')]=getRealtimeQueues;function initializeQueues(_0x57093b,_0x5d31be,_0x524ebc,_0x4f77cf){var _0x551427=DEFAULT_QUEUE_ATTRIBUTES;if(_0x524ebc===_0x86c3('0x23')){if(_0x4f77cf===_0x86c3('0x24')){_0x551427=_0x551427[_0x86c3('0x25')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x4f77cf===_0x86c3('0x26')){_0x551427=_0x551427[_0x86c3('0x25')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x57093b[_0x86c3('0x27')](function(_0x5cd1ac){var _0x1e1b4b=_0x5cd1ac[_0x86c3('0x28')]({'plain':!![]});_0x1e1b4b[_0x86c3('0x4')]=0x0;_0x1e1b4b[_0x86c3('0x29')]=0x0;_0x1e1b4b[_0x86c3('0x3')]=0x0;_0x1e1b4b[_0x86c3('0x2')]=0x0;_0x1e1b4b[_0x86c3('0x5')]=0x0;if(_0x524ebc===_0x86c3('0x23')){_0x1e1b4b[_0x86c3('0xb')]=0x0;_0x1e1b4b[_0x86c3('0x6')]=0x0;if(_0x4f77cf===_0x86c3('0x26')){_0x1e1b4b['pTalking']=0x0;_0x1e1b4b['originated']=0x0;}}var _0x28b399=_['find'](_0x5d31be,['id',_0x1e1b4b['id']]);if(_0x28b399){_['merge'](_0x1e1b4b,_[_0x86c3('0x2a')](_0x28b399,_0x551427));}return _0x1e1b4b;});}exports[_0x86c3('0x2b')]=initializeQueues;
\ No newline at end of file
+var _0x1de3=['talking','unavailable','unknown','message','statusMessage','dialActive','dialMethod','Trunk','startProgressive','erlangCalls','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','voice','request','startCase','Queues','then','error','format','catch','getRealtimeQueues','concat','outbound','map','get','pTalking','originated','merge','pick','lodash','client','http','available','loggedIn','paused','waiting','busy','inUse','invalid','loggedInDb','notInUse','ringInUse'];(function(_0x20d9f0,_0x453415){var _0x195dda=function(_0x58d8e8){while(--_0x58d8e8){_0x20d9f0['push'](_0x20d9f0['shift']());}};_0x195dda(++_0x453415);}(_0x1de3,0x151));var _0x31de=function(_0x236d24,_0x29e80a){_0x236d24=_0x236d24-0x0;var _0x1574cf=_0x1de3[_0x236d24];return _0x1574cf;};'use strict';var _=require(_0x31de('0x0'));var jayson=require('jayson/promise');var util=require('util');var amiClient=jayson[_0x31de('0x1')]['http']({'port':0x232a});var routingClient=jayson[_0x31de('0x1')][_0x31de('0x2')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x31de('0x3'),_0x31de('0x4'),_0x31de('0x5'),_0x31de('0x6')];var VOICE_QUEUE_ATTRIBUTES=[_0x31de('0x7'),_0x31de('0x8'),_0x31de('0x9'),_0x31de('0xa'),_0x31de('0xb'),'onHold','ringing',_0x31de('0xc'),_0x31de('0xd'),_0x31de('0xe'),_0x31de('0xf')];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking','originated',_0x31de('0x10'),_0x31de('0x11'),_0x31de('0x12'),_0x31de('0x13'),_0x31de('0x14'),'startPredictive',_0x31de('0x15'),_0x31de('0x16'),'erlangCallToSecond',_0x31de('0x17'),_0x31de('0x18'),_0x31de('0x19'),_0x31de('0x1a'),_0x31de('0x1b'),_0x31de('0x1c'),_0x31de('0x1d'),_0x31de('0x1e'),'predictiveIntervalDroppedCallsTimeout',_0x31de('0x1f'),_0x31de('0x20'),'predictiveIntervalAvgTalktime'];function getRealtimeQueues(_0x2d2fd6,_0x5e3ec0){var _0x27f283=_0x5e3ec0===_0x31de('0x21')?amiClient:routingClient;return _0x27f283[_0x31de('0x22')](_[_0x31de('0x23')](_0x5e3ec0)+_0x31de('0x24'),_0x2d2fd6)[_0x31de('0x25')](function(_0x136ee7){if(_0x136ee7[_0x31de('0x26')])throw new Error(util[_0x31de('0x27')]('Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues',_0x5e3ec0));return _0x136ee7['result'];})[_0x31de('0x28')](function(_0x1bb470){throw _0x1bb470;});}exports[_0x31de('0x29')]=getRealtimeQueues;function initializeQueues(_0xfee671,_0x4c469f,_0xa0a324,_0x850201){var _0x3413af=DEFAULT_QUEUE_ATTRIBUTES;if(_0xa0a324===_0x31de('0x21')){if(_0x850201==='inbound'){_0x3413af=_0x3413af[_0x31de('0x2a')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x850201===_0x31de('0x2b')){_0x3413af=_0x3413af['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0xfee671[_0x31de('0x2c')](function(_0x296dde){var _0x245c45=_0x296dde[_0x31de('0x2d')]({'plain':!![]});_0x245c45[_0x31de('0x5')]=0x0;_0x245c45[_0x31de('0xa')]=0x0;_0x245c45['loggedIn']=0x0;_0x245c45['available']=0x0;_0x245c45[_0x31de('0x6')]=0x0;if(_0xa0a324==='voice'){_0x245c45[_0x31de('0xd')]=0x0;_0x245c45[_0x31de('0x7')]=0x0;if(_0x850201==='outbound'){_0x245c45[_0x31de('0x2e')]=0x0;_0x245c45[_0x31de('0x2f')]=0x0;}}var _0x46791e=_['find'](_0x4c469f,['id',_0x245c45['id']]);if(_0x46791e){_[_0x31de('0x30')](_0x245c45,_[_0x31de('0x31')](_0x46791e,_0x3413af));}return _0x245c45;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file