Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / services / xdr / queues.controller.js
index 1dee859..1368c92 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcaaf=['lodash','./utils','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','calleridnum','accountcode','queuecallerexitreason','queue','getVoiceQueueByName','then','type','request','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','uniqueid','info','position','now','error','hangup','isNil','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][hangup]','[%s][queues][varset]','variable','value','toUpperCase','queuecallerabandonAt','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','holdtime','diffTime','queuecallerjoinAt','count','connectedlinename','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','assigned','destaccountcode','lastAssignedTo','[%s][queues][agentcomplete]','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','transfereeuniqueid','[%s][queues][blindtransfer]','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','transfertype','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','queuecallerenterreason','clone','transfertargetuniqueid','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','[%s][queues][musiconholdstart]','musiconholdstartAt','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s'];(function(_0x2c826b,_0xadaf9e){var _0x22603f=function(_0x5c3782){while(--_0x5c3782){_0x2c826b['push'](_0x2c826b['shift']());}};_0x22603f(++_0xadaf9e);}(_0xcaaf,0x66));var _0xfcaa=function(_0x5307dc,_0x1546e3){_0x5307dc=_0x5307dc-0x0;var _0x68fce=_0xcaaf[_0x5307dc];return _0x68fce;};'use strict';var _=require(_0xfcaa('0x0'));var util=require('util');var utils=require(_0xfcaa('0x1'));var queues={};function writeDB(_0x514aaf){utils['info'](util[_0xfcaa('0x2')](_0xfcaa('0x3'),_0x514aaf['uniqueid'],_0x514aaf[_0xfcaa('0x4')],_0x514aaf['queue'],_0x514aaf['lastAssignedTo'],_0x514aaf[_0xfcaa('0x5')],_0x514aaf[_0xfcaa('0x6')],_0x514aaf[_0xfcaa('0x7')]));if(_0x514aaf[_0xfcaa('0x8')]){utils[_0xfcaa('0x9')](_0x514aaf[_0xfcaa('0x8')])[_0xfcaa('0xa')](function(_0x4ee7d3){if(_0x4ee7d3){_0x514aaf[_0xfcaa('0xb')]=_0x4ee7d3['type'];}utils[_0xfcaa('0xc')]('CreateVoiceQueueReport',_0x514aaf);});}else{utils[_0xfcaa('0xc')]('CreateVoiceQueueReport',_0x514aaf);}if(_0x514aaf['transfereduniqueid']){delete queues[_0x514aaf[_0xfcaa('0xd')]];}else{delete queues[_0x514aaf['uniqueid']];}}exports[_0xfcaa('0xe')]=function(_0x2e83f8){try{utils[_0xfcaa('0xf')](util[_0xfcaa('0x2')](_0xfcaa('0x10'),_0x2e83f8[_0xfcaa('0x11')]),_0x2e83f8);utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')]('[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s',_0x2e83f8[_0xfcaa('0x11')],_0x2e83f8[_0xfcaa('0x8')],_0x2e83f8[_0xfcaa('0x13')]));queues[_0x2e83f8[_0xfcaa('0x11')]]=_['assign'](_0x2e83f8,{'originalposition':_0x2e83f8[_0xfcaa('0x13')],'queuecallerjoinAt':utils[_0xfcaa('0x14')](),'mohtime':0x0});}catch(_0x27ab5c){utils[_0xfcaa('0x15')](util['format'](_0xfcaa('0x10'),_0x2e83f8[_0xfcaa('0x11')]),_0x27ab5c);}};exports[_0xfcaa('0x16')]=function(_0x580335){try{if(!_[_0xfcaa('0x17')](queues[_0x580335[_0xfcaa('0x11')]])){utils['debug'](util[_0xfcaa('0x2')]('[%s][queues][hangup]',_0x580335['uniqueid']),_0x580335);if(queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x18')]){if(!queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x19')]&&!queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x1a')]){queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x1b')]=!![];queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x1c')]=utils['now']();queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x7')]=_0xfcaa('0x1d');}utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x1e'),_0x580335[_0xfcaa('0x11')],queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x1f')],queues[_0x580335['uniqueid']][_0xfcaa('0x7')]));writeDB(queues[_0x580335[_0xfcaa('0x11')]]);}else if(queues[_0x580335[_0xfcaa('0x11')]]['transfereduniqueid']){utils[_0xfcaa('0x12')](util['format'](_0xfcaa('0x20'),_0x580335[_0xfcaa('0x11')],queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0x1f')],queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0xd')]));queues[queues[_0x580335[_0xfcaa('0x11')]][_0xfcaa('0xd')]]=queues[_0x580335[_0xfcaa('0x11')]];queues[queues[_0x580335['uniqueid']]['transfereduniqueid']]['queuecallerenterreason']=0x2;delete queues[_0x580335['uniqueid']];}}}catch(_0x51171d){utils[_0xfcaa('0x15')](util['format'](_0xfcaa('0x21'),_0x580335[_0xfcaa('0x11')]),_0x51171d);}};exports['varset']=function(_0x1ff221){try{utils['debug'](util['format'](_0xfcaa('0x22'),_0x1ff221[_0xfcaa('0x11')]),_0x1ff221);if(!_[_0xfcaa('0x17')](_0x1ff221[_0xfcaa('0x23')]['queuestatus'])&&_0x1ff221[_0xfcaa('0x24')][_0xfcaa('0x25')]()!=='CONTINUE'){if(!_[_0xfcaa('0x17')](queues[_0x1ff221[_0xfcaa('0x11')]])){queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x19')]=![];queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x26')]=null;queues[_0x1ff221['uniqueid']][_0xfcaa('0x1a')]=!![];queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x27')]=utils[_0xfcaa('0x14')]();queues[_0x1ff221['uniqueid']][_0xfcaa('0x7')]=_0x1ff221['value'][_0xfcaa('0x25')]();utils['info'](util[_0xfcaa('0x2')](_0xfcaa('0x28'),_0x1ff221[_0xfcaa('0x11')],queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x1f')],_0x1ff221[_0xfcaa('0x24')],queues[_0x1ff221['uniqueid']][_0xfcaa('0x7')]));writeDB(queues[_0x1ff221[_0xfcaa('0x11')]]);}}else if(!_[_0xfcaa('0x17')](_0x1ff221[_0xfcaa('0x23')][_0xfcaa('0x29')])){if(!_[_0xfcaa('0x17')](queues[_0x1ff221[_0xfcaa('0x11')]])&&!queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x19')]){queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x19')]=![];queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x26')]=null;queues[_0x1ff221[_0xfcaa('0x11')]]['queuecallerexit']=!![];queues[_0x1ff221['uniqueid']][_0xfcaa('0x27')]=utils['now']();queues[_0x1ff221[_0xfcaa('0x11')]]['queuecallerexitreason']=_0xfcaa('0x2a');utils['info'](util[_0xfcaa('0x2')](_0xfcaa('0x2b'),_0x1ff221[_0xfcaa('0x11')],queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x1f')],_0x1ff221[_0xfcaa('0x24')],queues[_0x1ff221[_0xfcaa('0x11')]][_0xfcaa('0x7')]));}}}catch(_0x572ae3){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')](_0xfcaa('0x22'),_0x1ff221['uniqueid']),_0x572ae3);}};exports[_0xfcaa('0x19')]=function(_0x16eb68){try{if(!_[_0xfcaa('0x17')](queues[_0x16eb68[_0xfcaa('0x11')]])){utils[_0xfcaa('0xf')](util['format'](_0xfcaa('0x2c'),_0x16eb68[_0xfcaa('0x11')]),_0x16eb68);queues[_0x16eb68[_0xfcaa('0x11')]][_0xfcaa('0x1a')]=![];queues[_0x16eb68[_0xfcaa('0x11')]]['queuecallerexitAt']=null;queues[_0x16eb68['uniqueid']][_0xfcaa('0x19')]=!![];queues[_0x16eb68[_0xfcaa('0x11')]]['queuecallerabandonAt']=utils[_0xfcaa('0x14')]();queues[_0x16eb68[_0xfcaa('0x11')]]['queuecallerexitreason']=_0xfcaa('0x2d');utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x2e'),_0x16eb68['uniqueid'],queues[_0x16eb68[_0xfcaa('0x11')]][_0xfcaa('0x1f')],queues[_0x16eb68['uniqueid']][_0xfcaa('0x7')]));}}catch(_0xc999e7){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')](_0xfcaa('0x2c'),_0x16eb68['uniqueid']),_0xc999e7);}};exports[_0xfcaa('0x2f')]=function(_0x22c37a){try{if(!_[_0xfcaa('0x17')](queues[_0x22c37a[_0xfcaa('0x11')]])){utils[_0xfcaa('0xf')](util[_0xfcaa('0x2')](_0xfcaa('0x30'),_0x22c37a['uniqueid']),_0x22c37a);utils[_0xfcaa('0x12')](util['format'](_0xfcaa('0x31'),_0x22c37a['uniqueid'],queues[_0x22c37a[_0xfcaa('0x11')]]['name'],_0x22c37a[_0xfcaa('0x32')],_0x22c37a['connectedlinename']));queues[_0x22c37a[_0xfcaa('0x11')]][_0xfcaa('0x2f')]=!![];queues[_0x22c37a['uniqueid']][_0xfcaa('0x18')]=utils[_0xfcaa('0x14')]();queues[_0x22c37a[_0xfcaa('0x11')]][_0xfcaa('0x33')]=utils[_0xfcaa('0x34')](queues[_0x22c37a['uniqueid']][_0xfcaa('0x18')],queues[_0x22c37a[_0xfcaa('0x11')]][_0xfcaa('0x35')]);queues[_0x22c37a[_0xfcaa('0x11')]][_0xfcaa('0x13')]=_0x22c37a[_0xfcaa('0x13')];queues[_0x22c37a[_0xfcaa('0x11')]][_0xfcaa('0x36')]=_0x22c37a['count'];queues[_0x22c37a['uniqueid']]['connectedlinenum']=_0x22c37a[_0xfcaa('0x32')];queues[_0x22c37a['uniqueid']][_0xfcaa('0x37')]=_0x22c37a[_0xfcaa('0x37')];}}catch(_0xa183a7){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')](_0xfcaa('0x30'),_0x22c37a[_0xfcaa('0x11')]),_0xa183a7);}};exports[_0xfcaa('0x38')]=function(_0x4fdd07){try{if(!_[_0xfcaa('0x17')](queues[_0x4fdd07['uniqueid']])){utils[_0xfcaa('0xf')](util[_0xfcaa('0x2')](_0xfcaa('0x39'),_0x4fdd07['uniqueid']),_0x4fdd07);utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x3a'),_0x4fdd07['uniqueid'],queues[_0x4fdd07[_0xfcaa('0x11')]]['name'],_0x4fdd07[_0xfcaa('0x3b')],_0x4fdd07['destaccountcode']));queues[_0x4fdd07[_0xfcaa('0x11')]][_0xfcaa('0x19')]=![];queues[_0x4fdd07[_0xfcaa('0x11')]][_0xfcaa('0x19')]=![];queues[_0x4fdd07['uniqueid']][_0xfcaa('0x26')]=null;queues[_0x4fdd07[_0xfcaa('0x11')]]['queuecallerexit']=![];queues[_0x4fdd07[_0xfcaa('0x11')]][_0xfcaa('0x7')]=null;queues[_0x4fdd07[_0xfcaa('0x11')]][_0xfcaa('0x27')]=null;queues[_0x4fdd07['uniqueid']][_0xfcaa('0x3c')]=!![];queues[_0x4fdd07[_0xfcaa('0x11')]][_0xfcaa('0x6')]=_0x4fdd07[_0xfcaa('0x3d')];queues[_0x4fdd07['uniqueid']][_0xfcaa('0x3e')]=_0x4fdd07['membername'];}}catch(_0x353cf9){utils[_0xfcaa('0x15')](util['format'](_0xfcaa('0x39'),_0x4fdd07['uniqueid']),_0x353cf9);}};exports['agentcomplete']=function(_0xe29873){try{if(!_[_0xfcaa('0x17')](queues[_0xe29873[_0xfcaa('0x11')]])){if(queues[_0xe29873['uniqueid']]['queuecallerleaveAt']){utils[_0xfcaa('0xf')](util[_0xfcaa('0x2')](_0xfcaa('0x3f'),_0xe29873['uniqueid']),_0xe29873);queues[_0xe29873['uniqueid']][_0xfcaa('0x19')]=![];queues[_0xe29873[_0xfcaa('0x11')]][_0xfcaa('0x19')]=![];queues[_0xe29873[_0xfcaa('0x11')]][_0xfcaa('0x26')]=null;queues[_0xe29873[_0xfcaa('0x11')]]['queuecallerexit']=![];queues[_0xe29873['uniqueid']][_0xfcaa('0x27')]=null;queues[_0xe29873[_0xfcaa('0x11')]][_0xfcaa('0x3c')]=!![];queues[_0xe29873[_0xfcaa('0x11')]][_0xfcaa('0x3e')]=_0xe29873[_0xfcaa('0x3b')];queues[_0xe29873[_0xfcaa('0x11')]]['queuecallercomplete']=!![];queues[_0xe29873['uniqueid']][_0xfcaa('0x1c')]=utils[_0xfcaa('0x14')]();if(_0xe29873['reason']==_0xfcaa('0x40')){if(!queues[_0xe29873['uniqueid']][_0xfcaa('0x40')]){queues[_0xe29873[_0xfcaa('0x11')]]['queuecallerexitreason']=_0xfcaa('0x41');}}else{queues[_0xe29873[_0xfcaa('0x11')]]['queuecallerexitreason']=_0xfcaa('0x42')+_0xe29873['reason'][_0xfcaa('0x25')]();}utils[_0xfcaa('0x12')](util['format'](_0xfcaa('0x43'),_0xe29873[_0xfcaa('0x11')],queues[_0xe29873['uniqueid']][_0xfcaa('0x1f')],_0xe29873[_0xfcaa('0x3b')],queues[_0xe29873[_0xfcaa('0x11')]][_0xfcaa('0x7')]));writeDB(queues[_0xe29873[_0xfcaa('0x11')]]);}}}catch(_0x1ff00e){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')](_0xfcaa('0x3f'),_0xe29873[_0xfcaa('0x11')]),_0x1ff00e);}};exports['blindtransfer']=function(_0x33615a){try{if(!_[_0xfcaa('0x17')](queues[_0x33615a[_0xfcaa('0x44')]])){utils[_0xfcaa('0xf')](util[_0xfcaa('0x2')](_0xfcaa('0x45'),_0x33615a[_0xfcaa('0x11')]),_0x33615a);queues[_0x33615a[_0xfcaa('0x44')]][_0xfcaa('0x40')]=!![];queues[_0x33615a[_0xfcaa('0x44')]]['transfertype']=_0xfcaa('0x46');queues[_0x33615a[_0xfcaa('0x44')]][_0xfcaa('0x47')]=_0x33615a[_0xfcaa('0x48')];queues[_0x33615a[_0xfcaa('0x44')]][_0xfcaa('0x49')]=_0x33615a[_0xfcaa('0x44')];queues[_0x33615a[_0xfcaa('0x44')]][_0xfcaa('0x7')]=_0xfcaa('0x4a');utils[_0xfcaa('0x12')](util['format']('[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER',_0x33615a[_0xfcaa('0x11')],queues[_0x33615a[_0xfcaa('0x44')]][_0xfcaa('0x1f')],_0x33615a['transfereeuniqueid'],_0x33615a[_0xfcaa('0x48')]));}}catch(_0x20e1a0){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')](_0xfcaa('0x45'),_0x33615a[_0xfcaa('0x11')]),_0x20e1a0);}};exports[_0xfcaa('0x4b')]=function(_0x88f272){try{utils[_0xfcaa('0xf')](util[_0xfcaa('0x2')](_0xfcaa('0x4c'),_0x88f272['origtransfereruniqueid']),_0x88f272);if(_0x88f272[_0xfcaa('0x4d')]==_0x88f272[_0xfcaa('0x4e')]){if(!_[_0xfcaa('0x17')](queues[_0x88f272[_0xfcaa('0x4f')]])){utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x50'),_0x88f272[_0xfcaa('0x4d')],queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0x1f')],_0x88f272[_0xfcaa('0x51')]));queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0x40')]=!![];queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0x52')]=_0xfcaa('0x53');queues[_0x88f272['secondtransfererlinkedid']]['transferexten']=_0x88f272['origtransfererexten'];queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0x49')]=_0x88f272[_0xfcaa('0x4d')];queues[_0x88f272[_0xfcaa('0x4f')]]['queuecallerexitreason']=_0xfcaa('0x54');}if(!_[_0xfcaa('0x17')](queues[_0x88f272[_0xfcaa('0x4e')]])){if(_0x88f272[_0xfcaa('0x55')]&&queues[_0x88f272[_0xfcaa('0x55')]]){queues[_0x88f272[_0xfcaa('0x55')]][_0xfcaa('0x56')]=0x1;queues[_0x88f272[_0xfcaa('0x44')]]=_[_0xfcaa('0x57')](queues[_0x88f272[_0xfcaa('0x55')]]);queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0xd')]=_0x88f272[_0xfcaa('0x58')];queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x56')]=0x2;queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x5')]=queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0x5')];queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x59')]=queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0x59')];queues[_0x88f272[_0xfcaa('0x44')]]['queuecallerjoinAt']=utils[_0xfcaa('0x14')]();queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x18')]=utils[_0xfcaa('0x14')]();queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x33')]=0x0;queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x5a')]=0x0;utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x5b'),_0x88f272[_0xfcaa('0x4d')],queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x1f')],queues[_0x88f272['transfereeuniqueid']][_0xfcaa('0x5')],queues[_0x88f272[_0xfcaa('0x44')]][_0xfcaa('0x59')]));}else{utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x5c'),_0x88f272['origtransfereruniqueid'],queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0x1f')],_0x88f272[_0xfcaa('0x4f')]));queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0xd')]=_0x88f272[_0xfcaa('0x4f')];}}}else if(_0x88f272[_0xfcaa('0x5d')]==_0x88f272[_0xfcaa('0x4f')]){if(!_[_0xfcaa('0x17')](queues[_0x88f272[_0xfcaa('0x4e')]])){utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x5e'),_0x88f272[_0xfcaa('0x4d')],queues[_0x88f272[_0xfcaa('0x4e')]]['name'],_0x88f272[_0xfcaa('0x5d')],_0x88f272[_0xfcaa('0x5f')]));queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0x40')]=!![];queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0x52')]='ATTENDED';queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0x47')]=_0x88f272[_0xfcaa('0x5f')];queues[_0x88f272['origtransfererlinkedid']][_0xfcaa('0x49')]=_0x88f272[_0xfcaa('0x5d')];queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0x7')]=_0xfcaa('0x54');}if(!_['isNil'](queues[_0x88f272[_0xfcaa('0x4f')]])){if(_0x88f272[_0xfcaa('0x60')]&&queues[_0x88f272[_0xfcaa('0x60')]]){queues[_0x88f272['transfertargetlinkedid']][_0xfcaa('0x56')]=0x1;queues[_0x88f272[_0xfcaa('0x58')]]=_[_0xfcaa('0x57')](queues[_0x88f272['transfertargetlinkedid']]);queues[_0x88f272[_0xfcaa('0x58')]][_0xfcaa('0xd')]=_0x88f272[_0xfcaa('0x58')];queues[_0x88f272['transfertargetuniqueid']]['queuecallerenterreason']=0x2;queues[_0x88f272[_0xfcaa('0x58')]][_0xfcaa('0x5')]=queues[_0x88f272[_0xfcaa('0x4e')]][_0xfcaa('0x5')];queues[_0x88f272[_0xfcaa('0x58')]][_0xfcaa('0x59')]=queues[_0x88f272[_0xfcaa('0x4e')]]['calleridname'];queues[_0x88f272['transfertargetuniqueid']][_0xfcaa('0x35')]=utils['now']();queues[_0x88f272[_0xfcaa('0x58')]]['queuecallerleaveAt']=utils[_0xfcaa('0x14')]();queues[_0x88f272[_0xfcaa('0x58')]][_0xfcaa('0x33')]=0x0;queues[_0x88f272['transfertargetuniqueid']][_0xfcaa('0x5a')]=0x0;utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s',_0x88f272['origtransfereruniqueid'],queues[_0x88f272['transfertargetuniqueid']][_0xfcaa('0x1f')],queues[_0x88f272[_0xfcaa('0x58')]][_0xfcaa('0xd')],queues[_0x88f272['transfertargetuniqueid']]['calleridnum'],queues[_0x88f272[_0xfcaa('0x58')]][_0xfcaa('0x59')]));}else{utils[_0xfcaa('0x12')](util[_0xfcaa('0x2')](_0xfcaa('0x5c'),_0x88f272['origtransfereruniqueid'],queues[_0x88f272['secondtransfererlinkedid']][_0xfcaa('0x1f')],_0x88f272[_0xfcaa('0x4e')]));queues[_0x88f272[_0xfcaa('0x4f')]][_0xfcaa('0xd')]=_0x88f272[_0xfcaa('0x4e')];}}}}catch(_0x5a89a4){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')]('[%s][queues][attendedtransfer]',_0x88f272[_0xfcaa('0x4d')]),_0x5a89a4);}};exports['musiconholdstart']=function(_0x44c231){try{if(!_[_0xfcaa('0x17')](queues[_0x44c231[_0xfcaa('0x11')]])){utils[_0xfcaa('0xf')](util['format'](_0xfcaa('0x61'),_0x44c231[_0xfcaa('0x11')]),_0x44c231);queues[_0x44c231[_0xfcaa('0x11')]][_0xfcaa('0x62')]=utils[_0xfcaa('0x14')]();utils[_0xfcaa('0x12')](util['format']('[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s',_0x44c231[_0xfcaa('0x11')],queues[_0x44c231[_0xfcaa('0x11')]][_0xfcaa('0x1f')],queues[_0x44c231[_0xfcaa('0x11')]]['musiconholdstartAt']));}}catch(_0x22e3e3){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')]('[%s][queues][musiconholdstart]',_0x44c231[_0xfcaa('0x11')]),_0x22e3e3);}};exports[_0xfcaa('0x63')]=function(_0x1fff36){try{if(!_['isNil'](queues[_0x1fff36[_0xfcaa('0x11')]])){if(!_[_0xfcaa('0x17')](queues[_0x1fff36['uniqueid']][_0xfcaa('0x62')])){utils[_0xfcaa('0xf')](util['format'](_0xfcaa('0x64'),_0x1fff36[_0xfcaa('0x11')]),_0x1fff36);queues[_0x1fff36[_0xfcaa('0x11')]][_0xfcaa('0x5a')]+=utils[_0xfcaa('0x34')](utils[_0xfcaa('0x14')](),queues[_0x1fff36[_0xfcaa('0x11')]][_0xfcaa('0x62')]);utils['info'](util[_0xfcaa('0x2')](_0xfcaa('0x65'),_0x1fff36[_0xfcaa('0x11')],queues[_0x1fff36[_0xfcaa('0x11')]][_0xfcaa('0x1f')],queues[_0x1fff36[_0xfcaa('0x11')]]['mohtime']));delete queues[_0x1fff36[_0xfcaa('0x11')]][_0xfcaa('0x62')];}}}catch(_0x54515a){utils[_0xfcaa('0x15')](util[_0xfcaa('0x2')]('[%s][queues][musiconholdstop]',_0x1fff36[_0xfcaa('0x11')]),_0x54515a);}};
\ No newline at end of file
+var _0xed59=['[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinename','queuecallerjoinAt','count','connectedlinenum','[%s][queues][queuecallerleave]','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','agentcomplete','[%s][queues][agentcomplete]','assigned','reason','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','[%s][queues][blindtransfer]','transfertype','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','origtransfereruniqueid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','ATTENDED','origtransfererexten','ATTENDEDTRANSFER','origtransfererlinkedid','transfereelinkedid','queuecallerenterreason','clone','calleridname','holdtime','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','transfertargetuniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','diffTime','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','queue','lastAssignedTo','calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','type','CreateVoiceQueueReport','request','transfereduniqueid','uniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','error','hangup','isNil','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','info','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','varset','[%s][queues][varset]','variable','queuestatus','value','toUpperCase','CONTINUE','queuecallerabandonAt','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','queuecallerexit','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED'];(function(_0x23e7c1,_0x35110c){var _0x1add43=function(_0x238918){while(--_0x238918){_0x23e7c1['push'](_0x23e7c1['shift']());}};_0x1add43(++_0x35110c);}(_0xed59,0x191));var _0x9ed5=function(_0x203cdb,_0x5344f4){_0x203cdb=_0x203cdb-0x0;var _0x5b9b4b=_0xed59[_0x203cdb];return _0x5b9b4b;};'use strict';var _=require('lodash');var util=require(_0x9ed5('0x0'));var utils=require('./utils');var queues={};function writeDB(_0x2c62bf){utils['info'](util[_0x9ed5('0x1')](_0x9ed5('0x2'),_0x2c62bf['uniqueid'],_0x2c62bf[_0x9ed5('0x3')],_0x2c62bf[_0x9ed5('0x4')],_0x2c62bf[_0x9ed5('0x5')],_0x2c62bf[_0x9ed5('0x6')],_0x2c62bf[_0x9ed5('0x7')],_0x2c62bf[_0x9ed5('0x8')]));if(_0x2c62bf[_0x9ed5('0x4')]){utils[_0x9ed5('0x9')](_0x2c62bf[_0x9ed5('0x4')])['then'](function(_0x33d2d7){if(_0x33d2d7){_0x2c62bf[_0x9ed5('0xa')]=_0x33d2d7[_0x9ed5('0xa')];}utils['request'](_0x9ed5('0xb'),_0x2c62bf);});}else{utils[_0x9ed5('0xc')](_0x9ed5('0xb'),_0x2c62bf);}if(_0x2c62bf[_0x9ed5('0xd')]){delete queues[_0x2c62bf[_0x9ed5('0xd')]];}else{delete queues[_0x2c62bf[_0x9ed5('0xe')]];}}exports[_0x9ed5('0xf')]=function(_0x311e85){try{utils[_0x9ed5('0x10')](util[_0x9ed5('0x1')](_0x9ed5('0x11'),_0x311e85[_0x9ed5('0xe')]),_0x311e85);utils['info'](util[_0x9ed5('0x1')](_0x9ed5('0x12'),_0x311e85[_0x9ed5('0xe')],_0x311e85['queue'],_0x311e85[_0x9ed5('0x13')]));queues[_0x311e85['uniqueid']]=_[_0x9ed5('0x14')](_0x311e85,{'originalposition':_0x311e85[_0x9ed5('0x13')],'queuecallerjoinAt':utils[_0x9ed5('0x15')](),'mohtime':0x0});}catch(_0x482171){utils[_0x9ed5('0x16')](util['format'](_0x9ed5('0x11'),_0x311e85[_0x9ed5('0xe')]),_0x482171);}};exports[_0x9ed5('0x17')]=function(_0x455578){try{if(!_[_0x9ed5('0x18')](queues[_0x455578[_0x9ed5('0xe')]])){utils[_0x9ed5('0x10')](util[_0x9ed5('0x1')](_0x9ed5('0x19'),_0x455578[_0x9ed5('0xe')]),_0x455578);if(queues[_0x455578['uniqueid']][_0x9ed5('0x1a')]){if(!queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0x1b')]&&!queues[_0x455578['uniqueid']]['queuecallerexit']){queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0x1c')]=!![];queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0x1d')]=utils['now']();queues[_0x455578['uniqueid']][_0x9ed5('0x8')]=_0x9ed5('0x1e');}utils['info'](util[_0x9ed5('0x1')](_0x9ed5('0x1f'),_0x455578[_0x9ed5('0xe')],queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0x20')],queues[_0x455578[_0x9ed5('0xe')]]['queuecallerexitreason']));writeDB(queues[_0x455578[_0x9ed5('0xe')]]);}else if(queues[_0x455578[_0x9ed5('0xe')]]['transfereduniqueid']){utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x22'),_0x455578['uniqueid'],queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0x20')],queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0xd')]));queues[queues[_0x455578[_0x9ed5('0xe')]][_0x9ed5('0xd')]]=queues[_0x455578[_0x9ed5('0xe')]];queues[queues[_0x455578['uniqueid']]['transfereduniqueid']]['queuecallerenterreason']=0x2;delete queues[_0x455578['uniqueid']];}}}catch(_0x221416){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')]('[%s][queues][hangup]',_0x455578[_0x9ed5('0xe')]),_0x221416);}};exports[_0x9ed5('0x23')]=function(_0x7ecbdc){try{utils[_0x9ed5('0x10')](util[_0x9ed5('0x1')](_0x9ed5('0x24'),_0x7ecbdc[_0x9ed5('0xe')]),_0x7ecbdc);if(!_[_0x9ed5('0x18')](_0x7ecbdc[_0x9ed5('0x25')][_0x9ed5('0x26')])&&_0x7ecbdc[_0x9ed5('0x27')][_0x9ed5('0x28')]()!==_0x9ed5('0x29')){if(!_['isNil'](queues[_0x7ecbdc[_0x9ed5('0xe')]])){queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerabandon']=![];queues[_0x7ecbdc[_0x9ed5('0xe')]][_0x9ed5('0x2a')]=null;queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerexit']=!![];queues[_0x7ecbdc['uniqueid']][_0x9ed5('0x2b')]=utils['now']();queues[_0x7ecbdc[_0x9ed5('0xe')]][_0x9ed5('0x8')]=_0x7ecbdc[_0x9ed5('0x27')][_0x9ed5('0x28')]();utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x2c'),_0x7ecbdc[_0x9ed5('0xe')],queues[_0x7ecbdc[_0x9ed5('0xe')]]['name'],_0x7ecbdc['value'],queues[_0x7ecbdc[_0x9ed5('0xe')]][_0x9ed5('0x8')]));writeDB(queues[_0x7ecbdc[_0x9ed5('0xe')]]);}}else if(!_['isNil'](_0x7ecbdc['variable'][_0x9ed5('0x2d')])){if(!_[_0x9ed5('0x18')](queues[_0x7ecbdc[_0x9ed5('0xe')]])&&!queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerabandon']){queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerabandon']=![];queues[_0x7ecbdc['uniqueid']][_0x9ed5('0x2a')]=null;queues[_0x7ecbdc[_0x9ed5('0xe')]][_0x9ed5('0x2e')]=!![];queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerexitAt']=utils[_0x9ed5('0x15')]();queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerexitreason']=_0x9ed5('0x2f');utils[_0x9ed5('0x21')](util['format'](_0x9ed5('0x30'),_0x7ecbdc[_0x9ed5('0xe')],queues[_0x7ecbdc['uniqueid']][_0x9ed5('0x20')],_0x7ecbdc[_0x9ed5('0x27')],queues[_0x7ecbdc[_0x9ed5('0xe')]]['queuecallerexitreason']));}}}catch(_0x42da5a){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')](_0x9ed5('0x24'),_0x7ecbdc[_0x9ed5('0xe')]),_0x42da5a);}};exports[_0x9ed5('0x1b')]=function(_0x57ca9a){try{if(!_[_0x9ed5('0x18')](queues[_0x57ca9a[_0x9ed5('0xe')]])){utils[_0x9ed5('0x10')](util[_0x9ed5('0x1')](_0x9ed5('0x31'),_0x57ca9a[_0x9ed5('0xe')]),_0x57ca9a);queues[_0x57ca9a['uniqueid']][_0x9ed5('0x2e')]=![];queues[_0x57ca9a[_0x9ed5('0xe')]]['queuecallerexitAt']=null;queues[_0x57ca9a[_0x9ed5('0xe')]]['queuecallerabandon']=!![];queues[_0x57ca9a['uniqueid']][_0x9ed5('0x2a')]=utils['now']();queues[_0x57ca9a['uniqueid']][_0x9ed5('0x8')]=_0x9ed5('0x32');utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x33'),_0x57ca9a[_0x9ed5('0xe')],queues[_0x57ca9a[_0x9ed5('0xe')]]['name'],queues[_0x57ca9a[_0x9ed5('0xe')]][_0x9ed5('0x8')]));}}catch(_0x95a120){utils[_0x9ed5('0x16')](util['format'](_0x9ed5('0x31'),_0x57ca9a[_0x9ed5('0xe')]),_0x95a120);}};exports[_0x9ed5('0x34')]=function(_0x59f320){try{if(!_[_0x9ed5('0x18')](queues[_0x59f320['uniqueid']])){utils[_0x9ed5('0x10')](util[_0x9ed5('0x1')]('[%s][queues][queuecallerleave]',_0x59f320['uniqueid']),_0x59f320);utils[_0x9ed5('0x21')](util['format'](_0x9ed5('0x35'),_0x59f320[_0x9ed5('0xe')],queues[_0x59f320[_0x9ed5('0xe')]][_0x9ed5('0x20')],_0x59f320['connectedlinenum'],_0x59f320[_0x9ed5('0x36')]));queues[_0x59f320['uniqueid']][_0x9ed5('0x34')]=!![];queues[_0x59f320[_0x9ed5('0xe')]][_0x9ed5('0x1a')]=utils[_0x9ed5('0x15')]();queues[_0x59f320['uniqueid']]['holdtime']=utils['diffTime'](queues[_0x59f320[_0x9ed5('0xe')]]['queuecallerleaveAt'],queues[_0x59f320[_0x9ed5('0xe')]][_0x9ed5('0x37')]);queues[_0x59f320[_0x9ed5('0xe')]]['position']=_0x59f320[_0x9ed5('0x13')];queues[_0x59f320[_0x9ed5('0xe')]][_0x9ed5('0x38')]=_0x59f320[_0x9ed5('0x38')];queues[_0x59f320['uniqueid']][_0x9ed5('0x39')]=_0x59f320[_0x9ed5('0x39')];queues[_0x59f320[_0x9ed5('0xe')]]['connectedlinename']=_0x59f320['connectedlinename'];}}catch(_0x3a672b){utils[_0x9ed5('0x16')](util['format'](_0x9ed5('0x3a'),_0x59f320[_0x9ed5('0xe')]),_0x3a672b);}};exports[_0x9ed5('0x3b')]=function(_0x448935){try{if(!_[_0x9ed5('0x18')](queues[_0x448935['uniqueid']])){utils[_0x9ed5('0x10')](util[_0x9ed5('0x1')](_0x9ed5('0x3c'),_0x448935[_0x9ed5('0xe')]),_0x448935);utils['info'](util[_0x9ed5('0x1')](_0x9ed5('0x3d'),_0x448935[_0x9ed5('0xe')],queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x20')],_0x448935[_0x9ed5('0x3e')],_0x448935[_0x9ed5('0x3f')]));queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x1b')]=![];queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x1b')]=![];queues[_0x448935['uniqueid']][_0x9ed5('0x2a')]=null;queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x2e')]=![];queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x8')]=null;queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x2b')]=null;queues[_0x448935['uniqueid']]['assigned']=!![];queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x7')]=_0x448935[_0x9ed5('0x3f')];queues[_0x448935[_0x9ed5('0xe')]][_0x9ed5('0x5')]=_0x448935['membername'];}}catch(_0x2f3b6c){utils['error'](util['format']('[%s][queues][agentconnect]',_0x448935['uniqueid']),_0x2f3b6c);}};exports[_0x9ed5('0x40')]=function(_0x7eaea5){try{if(!_[_0x9ed5('0x18')](queues[_0x7eaea5[_0x9ed5('0xe')]])){if(queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x1a')]){utils['debug'](util[_0x9ed5('0x1')](_0x9ed5('0x41'),_0x7eaea5['uniqueid']),_0x7eaea5);queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x1b')]=![];queues[_0x7eaea5[_0x9ed5('0xe')]]['queuecallerabandon']=![];queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x2a')]=null;queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x2e')]=![];queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x2b')]=null;queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x42')]=!![];queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x5')]=_0x7eaea5[_0x9ed5('0x3e')];queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x1c')]=!![];queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x1d')]=utils['now']();if(_0x7eaea5[_0x9ed5('0x43')]=='transfer'){if(!queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x44')]){queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x8')]=_0x9ed5('0x45');}}else{queues[_0x7eaea5['uniqueid']][_0x9ed5('0x8')]=_0x9ed5('0x46')+_0x7eaea5[_0x9ed5('0x43')]['toUpperCase']();}utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x47'),_0x7eaea5[_0x9ed5('0xe')],queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x20')],_0x7eaea5[_0x9ed5('0x3e')],queues[_0x7eaea5[_0x9ed5('0xe')]][_0x9ed5('0x8')]));writeDB(queues[_0x7eaea5[_0x9ed5('0xe')]]);}}}catch(_0x279f4f){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')]('[%s][queues][agentcomplete]',_0x7eaea5[_0x9ed5('0xe')]),_0x279f4f);}};exports[_0x9ed5('0x48')]=function(_0x558c7b){try{if(!_[_0x9ed5('0x18')](queues[_0x558c7b[_0x9ed5('0x49')]])){utils[_0x9ed5('0x10')](util['format'](_0x9ed5('0x4a'),_0x558c7b[_0x9ed5('0xe')]),_0x558c7b);queues[_0x558c7b[_0x9ed5('0x49')]][_0x9ed5('0x44')]=!![];queues[_0x558c7b[_0x9ed5('0x49')]][_0x9ed5('0x4b')]=_0x9ed5('0x4c');queues[_0x558c7b[_0x9ed5('0x49')]][_0x9ed5('0x4d')]=_0x558c7b[_0x9ed5('0x4e')];queues[_0x558c7b[_0x9ed5('0x49')]][_0x9ed5('0x4f')]=_0x558c7b[_0x9ed5('0x49')];queues[_0x558c7b[_0x9ed5('0x49')]][_0x9ed5('0x8')]=_0x9ed5('0x50');utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x51'),_0x558c7b['uniqueid'],queues[_0x558c7b[_0x9ed5('0x49')]][_0x9ed5('0x20')],_0x558c7b['transfereeuniqueid'],_0x558c7b[_0x9ed5('0x4e')]));}}catch(_0x80a237){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')](_0x9ed5('0x4a'),_0x558c7b[_0x9ed5('0xe')]),_0x80a237);}};exports[_0x9ed5('0x52')]=function(_0xe2db3){try{utils['debug'](util[_0x9ed5('0x1')]('[%s][queues][attendedtransfer]',_0xe2db3[_0x9ed5('0x53')]),_0xe2db3);if(_0xe2db3['origtransfereruniqueid']==_0xe2db3['origtransfererlinkedid']){if(!_['isNil'](queues[_0xe2db3[_0x9ed5('0x54')]])){utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x55'),_0xe2db3[_0x9ed5('0x53')],queues[_0xe2db3['secondtransfererlinkedid']][_0x9ed5('0x20')],_0xe2db3['origtransfererexten']));queues[_0xe2db3[_0x9ed5('0x54')]][_0x9ed5('0x44')]=!![];queues[_0xe2db3[_0x9ed5('0x54')]]['transfertype']=_0x9ed5('0x56');queues[_0xe2db3[_0x9ed5('0x54')]][_0x9ed5('0x4d')]=_0xe2db3[_0x9ed5('0x57')];queues[_0xe2db3[_0x9ed5('0x54')]]['transferuniqueid']=_0xe2db3[_0x9ed5('0x53')];queues[_0xe2db3['secondtransfererlinkedid']][_0x9ed5('0x8')]=_0x9ed5('0x58');}if(!_['isNil'](queues[_0xe2db3[_0x9ed5('0x59')]])){if(_0xe2db3[_0x9ed5('0x5a')]&&queues[_0xe2db3[_0x9ed5('0x5a')]]){queues[_0xe2db3[_0x9ed5('0x5a')]][_0x9ed5('0x5b')]=0x1;queues[_0xe2db3[_0x9ed5('0x49')]]=_[_0x9ed5('0x5c')](queues[_0xe2db3['transfereelinkedid']]);queues[_0xe2db3['transfereeuniqueid']][_0x9ed5('0xd')]=_0xe2db3['transfertargetuniqueid'];queues[_0xe2db3[_0x9ed5('0x49')]][_0x9ed5('0x5b')]=0x2;queues[_0xe2db3[_0x9ed5('0x49')]]['calleridnum']=queues[_0xe2db3[_0x9ed5('0x54')]][_0x9ed5('0x6')];queues[_0xe2db3[_0x9ed5('0x49')]][_0x9ed5('0x5d')]=queues[_0xe2db3[_0x9ed5('0x54')]][_0x9ed5('0x5d')];queues[_0xe2db3[_0x9ed5('0x49')]]['queuecallerjoinAt']=utils[_0x9ed5('0x15')]();queues[_0xe2db3[_0x9ed5('0x49')]][_0x9ed5('0x1a')]=utils[_0x9ed5('0x15')]();queues[_0xe2db3[_0x9ed5('0x49')]][_0x9ed5('0x5e')]=0x0;queues[_0xe2db3['transfereeuniqueid']][_0x9ed5('0x5f')]=0x0;utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x60'),_0xe2db3['origtransfereruniqueid'],queues[_0xe2db3['transfereeuniqueid']]['name'],queues[_0xe2db3['transfereeuniqueid']][_0x9ed5('0x6')],queues[_0xe2db3[_0x9ed5('0x49')]][_0x9ed5('0x5d')]));}else{utils[_0x9ed5('0x21')](util['format'](_0x9ed5('0x61'),_0xe2db3[_0x9ed5('0x53')],queues[_0xe2db3[_0x9ed5('0x59')]]['name'],_0xe2db3[_0x9ed5('0x54')]));queues[_0xe2db3[_0x9ed5('0x59')]]['transfereduniqueid']=_0xe2db3[_0x9ed5('0x54')];}}}else if(_0xe2db3[_0x9ed5('0x62')]==_0xe2db3[_0x9ed5('0x54')]){if(!_[_0x9ed5('0x18')](queues[_0xe2db3['origtransfererlinkedid']])){utils[_0x9ed5('0x21')](util['format'](_0x9ed5('0x63'),_0xe2db3['origtransfereruniqueid'],queues[_0xe2db3[_0x9ed5('0x59')]]['name'],_0xe2db3['secondtransfereruniqueid'],_0xe2db3[_0x9ed5('0x64')]));queues[_0xe2db3[_0x9ed5('0x59')]][_0x9ed5('0x44')]=!![];queues[_0xe2db3[_0x9ed5('0x59')]]['transfertype']=_0x9ed5('0x56');queues[_0xe2db3[_0x9ed5('0x59')]][_0x9ed5('0x4d')]=_0xe2db3[_0x9ed5('0x64')];queues[_0xe2db3[_0x9ed5('0x59')]][_0x9ed5('0x4f')]=_0xe2db3[_0x9ed5('0x62')];queues[_0xe2db3[_0x9ed5('0x59')]][_0x9ed5('0x8')]='ATTENDEDTRANSFER';}if(!_[_0x9ed5('0x18')](queues[_0xe2db3[_0x9ed5('0x54')]])){if(_0xe2db3[_0x9ed5('0x65')]&&queues[_0xe2db3[_0x9ed5('0x65')]]){queues[_0xe2db3[_0x9ed5('0x65')]][_0x9ed5('0x5b')]=0x1;queues[_0xe2db3[_0x9ed5('0x66')]]=_['clone'](queues[_0xe2db3[_0x9ed5('0x65')]]);queues[_0xe2db3[_0x9ed5('0x66')]][_0x9ed5('0xd')]=_0xe2db3[_0x9ed5('0x66')];queues[_0xe2db3[_0x9ed5('0x66')]][_0x9ed5('0x5b')]=0x2;queues[_0xe2db3[_0x9ed5('0x66')]][_0x9ed5('0x6')]=queues[_0xe2db3[_0x9ed5('0x59')]][_0x9ed5('0x6')];queues[_0xe2db3[_0x9ed5('0x66')]]['calleridname']=queues[_0xe2db3[_0x9ed5('0x59')]][_0x9ed5('0x5d')];queues[_0xe2db3[_0x9ed5('0x66')]]['queuecallerjoinAt']=utils['now']();queues[_0xe2db3['transfertargetuniqueid']]['queuecallerleaveAt']=utils[_0x9ed5('0x15')]();queues[_0xe2db3['transfertargetuniqueid']]['holdtime']=0x0;queues[_0xe2db3[_0x9ed5('0x66')]][_0x9ed5('0x5f')]=0x0;utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x67'),_0xe2db3['origtransfereruniqueid'],queues[_0xe2db3['transfertargetuniqueid']]['name'],queues[_0xe2db3[_0x9ed5('0x66')]]['transfereduniqueid'],queues[_0xe2db3[_0x9ed5('0x66')]][_0x9ed5('0x6')],queues[_0xe2db3['transfertargetuniqueid']]['calleridname']));}else{utils['info'](util['format'](_0x9ed5('0x61'),_0xe2db3['origtransfereruniqueid'],queues[_0xe2db3[_0x9ed5('0x54')]]['name'],_0xe2db3[_0x9ed5('0x59')]));queues[_0xe2db3[_0x9ed5('0x54')]][_0x9ed5('0xd')]=_0xe2db3[_0x9ed5('0x59')];}}}}catch(_0x11ae04){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')](_0x9ed5('0x68'),_0xe2db3[_0x9ed5('0x53')]),_0x11ae04);}};exports[_0x9ed5('0x69')]=function(_0x11f988){try{if(!_[_0x9ed5('0x18')](queues[_0x11f988[_0x9ed5('0xe')]])){utils['debug'](util['format'](_0x9ed5('0x6a'),_0x11f988[_0x9ed5('0xe')]),_0x11f988);queues[_0x11f988[_0x9ed5('0xe')]][_0x9ed5('0x6b')]=utils[_0x9ed5('0x15')]();utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x6c'),_0x11f988[_0x9ed5('0xe')],queues[_0x11f988[_0x9ed5('0xe')]][_0x9ed5('0x20')],queues[_0x11f988[_0x9ed5('0xe')]][_0x9ed5('0x6b')]));}}catch(_0x13cac7){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')](_0x9ed5('0x6a'),_0x11f988[_0x9ed5('0xe')]),_0x13cac7);}};exports[_0x9ed5('0x6d')]=function(_0x3beefc){try{if(!_[_0x9ed5('0x18')](queues[_0x3beefc['uniqueid']])){if(!_[_0x9ed5('0x18')](queues[_0x3beefc[_0x9ed5('0xe')]][_0x9ed5('0x6b')])){utils['debug'](util[_0x9ed5('0x1')](_0x9ed5('0x6e'),_0x3beefc[_0x9ed5('0xe')]),_0x3beefc);queues[_0x3beefc[_0x9ed5('0xe')]][_0x9ed5('0x5f')]+=utils[_0x9ed5('0x6f')](utils[_0x9ed5('0x15')](),queues[_0x3beefc[_0x9ed5('0xe')]][_0x9ed5('0x6b')]);utils[_0x9ed5('0x21')](util[_0x9ed5('0x1')](_0x9ed5('0x70'),_0x3beefc[_0x9ed5('0xe')],queues[_0x3beefc[_0x9ed5('0xe')]]['name'],queues[_0x3beefc['uniqueid']][_0x9ed5('0x5f')]));delete queues[_0x3beefc['uniqueid']]['musiconholdstartAt'];}}}catch(_0x1face6){utils[_0x9ed5('0x16')](util[_0x9ed5('0x1')](_0x9ed5('0x6e'),_0x3beefc[_0x9ed5('0xe')]),_0x1face6);}};
\ No newline at end of file