Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / services / xdr / queues.controller.js
index 1dee859..7327d0d 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 _0xe4d9=['[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','assigned','accountcode','agentcomplete','queuecallercomplete','reason','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','[%s][queues][agentcomplete]','transfereeuniqueid','[%s][queues][blindtransfer]','BLIND','transferexten','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','extension','attendedtransfer','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','origtransfererexten','transfertype','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridname','queuecallerjoinAt','holdtime','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','./utils','info','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','queue','lastAssignedTo','calleridnum','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','queuecallerjoin','debug','format','position','now','error','[%s][queues][queuecallerjoin]','hangup','isNil','[%s][queues][hangup]','queuecallercompleteAt','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','variable','queuestatus','value','toUpperCase','CONTINUE','queuecallerabandon','queuecallerabandonAt','queuecallerexit','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queuecallerexitAt','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','name','[%s][queues][varset]','[%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','diffTime','queuecallerleaveAt','count','connectedlinename','agentconnect'];(function(_0x158f01,_0x12af3e){var _0x5ef74e=function(_0x5e7adc){while(--_0x5e7adc){_0x158f01['push'](_0x158f01['shift']());}};_0x5ef74e(++_0x12af3e);}(_0xe4d9,0x9b));var _0x9e4d=function(_0x1c71f8,_0x52799e){_0x1c71f8=_0x1c71f8-0x0;var _0x49a0a3=_0xe4d9[_0x1c71f8];return _0x49a0a3;};'use strict';var _=require('lodash');var util=require(_0x9e4d('0x0'));var utils=require(_0x9e4d('0x1'));var queues={};function writeDB(_0x1fa328){utils[_0x9e4d('0x2')](util['format'](_0x9e4d('0x3'),_0x1fa328['uniqueid'],_0x1fa328[_0x9e4d('0x4')],_0x1fa328[_0x9e4d('0x5')],_0x1fa328[_0x9e4d('0x6')],_0x1fa328[_0x9e4d('0x7')],_0x1fa328['accountcode'],_0x1fa328[_0x9e4d('0x8')]));if(_0x1fa328[_0x9e4d('0x5')]){utils[_0x9e4d('0x9')](_0x1fa328[_0x9e4d('0x5')])[_0x9e4d('0xa')](function(_0x1e189a){if(_0x1e189a){_0x1fa328[_0x9e4d('0xb')]=_0x1e189a[_0x9e4d('0xb')];}utils[_0x9e4d('0xc')]('CreateVoiceQueueReport',_0x1fa328);});}else{utils['request'](_0x9e4d('0xd'),_0x1fa328);}if(_0x1fa328[_0x9e4d('0xe')]){delete queues[_0x1fa328[_0x9e4d('0xe')]];}else{delete queues[_0x1fa328[_0x9e4d('0xf')]];}}exports[_0x9e4d('0x10')]=function(_0x260a7c){try{utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')]('[%s][queues][queuecallerjoin]',_0x260a7c[_0x9e4d('0xf')]),_0x260a7c);utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')]('[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s',_0x260a7c[_0x9e4d('0xf')],_0x260a7c[_0x9e4d('0x5')],_0x260a7c[_0x9e4d('0x13')]));queues[_0x260a7c[_0x9e4d('0xf')]]=_['assign'](_0x260a7c,{'originalposition':_0x260a7c[_0x9e4d('0x13')],'queuecallerjoinAt':utils[_0x9e4d('0x14')](),'mohtime':0x0});}catch(_0x1bae64){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x16'),_0x260a7c[_0x9e4d('0xf')]),_0x1bae64);}};exports[_0x9e4d('0x17')]=function(_0x284ea9){try{if(!_[_0x9e4d('0x18')](queues[_0x284ea9[_0x9e4d('0xf')]])){utils[_0x9e4d('0x11')](util['format'](_0x9e4d('0x19'),_0x284ea9[_0x9e4d('0xf')]),_0x284ea9);if(queues[_0x284ea9[_0x9e4d('0xf')]]['queuecallerleaveAt']){if(!queues[_0x284ea9['uniqueid']]['queuecallerabandon']&&!queues[_0x284ea9['uniqueid']]['queuecallerexit']){queues[_0x284ea9[_0x9e4d('0xf')]]['queuecallercomplete']=!![];queues[_0x284ea9[_0x9e4d('0xf')]][_0x9e4d('0x1a')]=utils['now']();queues[_0x284ea9[_0x9e4d('0xf')]]['queuecallerexitreason']='COMPLETEDBYAGENT';}utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x1b'),_0x284ea9[_0x9e4d('0xf')],queues[_0x284ea9[_0x9e4d('0xf')]]['name'],queues[_0x284ea9['uniqueid']][_0x9e4d('0x8')]));writeDB(queues[_0x284ea9[_0x9e4d('0xf')]]);}else if(queues[_0x284ea9[_0x9e4d('0xf')]][_0x9e4d('0xe')]){utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x1c'),_0x284ea9[_0x9e4d('0xf')],queues[_0x284ea9[_0x9e4d('0xf')]]['name'],queues[_0x284ea9['uniqueid']][_0x9e4d('0xe')]));queues[queues[_0x284ea9['uniqueid']][_0x9e4d('0xe')]]=queues[_0x284ea9[_0x9e4d('0xf')]];queues[queues[_0x284ea9[_0x9e4d('0xf')]][_0x9e4d('0xe')]][_0x9e4d('0x1d')]=0x2;delete queues[_0x284ea9['uniqueid']];}}}catch(_0x1bb6b0){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')]('[%s][queues][hangup]',_0x284ea9[_0x9e4d('0xf')]),_0x1bb6b0);}};exports[_0x9e4d('0x1e')]=function(_0x1b784a){try{utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')]('[%s][queues][varset]',_0x1b784a[_0x9e4d('0xf')]),_0x1b784a);if(!_[_0x9e4d('0x18')](_0x1b784a[_0x9e4d('0x1f')][_0x9e4d('0x20')])&&_0x1b784a[_0x9e4d('0x21')][_0x9e4d('0x22')]()!==_0x9e4d('0x23')){if(!_[_0x9e4d('0x18')](queues[_0x1b784a[_0x9e4d('0xf')]])){queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x24')]=![];queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x25')]=null;queues[_0x1b784a['uniqueid']][_0x9e4d('0x26')]=!![];queues[_0x1b784a['uniqueid']]['queuecallerexitAt']=utils['now']();queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x8')]=_0x1b784a[_0x9e4d('0x21')]['toUpperCase']();utils['info'](util[_0x9e4d('0x12')](_0x9e4d('0x27'),_0x1b784a[_0x9e4d('0xf')],queues[_0x1b784a['uniqueid']]['name'],_0x1b784a[_0x9e4d('0x21')],queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x8')]));writeDB(queues[_0x1b784a[_0x9e4d('0xf')]]);}}else if(!_[_0x9e4d('0x18')](_0x1b784a['variable']['queueposition'])){if(!_[_0x9e4d('0x18')](queues[_0x1b784a['uniqueid']])&&!queues[_0x1b784a['uniqueid']][_0x9e4d('0x24')]){queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x24')]=![];queues[_0x1b784a[_0x9e4d('0xf')]]['queuecallerabandonAt']=null;queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x26')]=!![];queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x28')]=utils[_0x9e4d('0x14')]();queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x8')]=_0x9e4d('0x29');utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x2a'),_0x1b784a[_0x9e4d('0xf')],queues[_0x1b784a[_0x9e4d('0xf')]][_0x9e4d('0x2b')],_0x1b784a[_0x9e4d('0x21')],queues[_0x1b784a[_0x9e4d('0xf')]]['queuecallerexitreason']));}}}catch(_0x2b4c04){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x2c'),_0x1b784a[_0x9e4d('0xf')]),_0x2b4c04);}};exports[_0x9e4d('0x24')]=function(_0x2361af){try{if(!_[_0x9e4d('0x18')](queues[_0x2361af[_0x9e4d('0xf')]])){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')](_0x9e4d('0x2d'),_0x2361af[_0x9e4d('0xf')]),_0x2361af);queues[_0x2361af[_0x9e4d('0xf')]][_0x9e4d('0x26')]=![];queues[_0x2361af[_0x9e4d('0xf')]][_0x9e4d('0x28')]=null;queues[_0x2361af[_0x9e4d('0xf')]]['queuecallerabandon']=!![];queues[_0x2361af[_0x9e4d('0xf')]][_0x9e4d('0x25')]=utils[_0x9e4d('0x14')]();queues[_0x2361af[_0x9e4d('0xf')]]['queuecallerexitreason']=_0x9e4d('0x2e');utils[_0x9e4d('0x2')](util['format'](_0x9e4d('0x2f'),_0x2361af[_0x9e4d('0xf')],queues[_0x2361af['uniqueid']][_0x9e4d('0x2b')],queues[_0x2361af['uniqueid']]['queuecallerexitreason']));}}catch(_0x2bf154){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x2d'),_0x2361af['uniqueid']),_0x2bf154);}};exports[_0x9e4d('0x30')]=function(_0x45dc0b){try{if(!_[_0x9e4d('0x18')](queues[_0x45dc0b['uniqueid']])){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')](_0x9e4d('0x31'),_0x45dc0b[_0x9e4d('0xf')]),_0x45dc0b);utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x32'),_0x45dc0b[_0x9e4d('0xf')],queues[_0x45dc0b[_0x9e4d('0xf')]][_0x9e4d('0x2b')],_0x45dc0b[_0x9e4d('0x33')],_0x45dc0b['connectedlinename']));queues[_0x45dc0b[_0x9e4d('0xf')]]['queuecallerleave']=!![];queues[_0x45dc0b[_0x9e4d('0xf')]]['queuecallerleaveAt']=utils[_0x9e4d('0x14')]();queues[_0x45dc0b[_0x9e4d('0xf')]]['holdtime']=utils[_0x9e4d('0x34')](queues[_0x45dc0b['uniqueid']][_0x9e4d('0x35')],queues[_0x45dc0b['uniqueid']]['queuecallerjoinAt']);queues[_0x45dc0b[_0x9e4d('0xf')]][_0x9e4d('0x13')]=_0x45dc0b[_0x9e4d('0x13')];queues[_0x45dc0b[_0x9e4d('0xf')]][_0x9e4d('0x36')]=_0x45dc0b[_0x9e4d('0x36')];queues[_0x45dc0b['uniqueid']][_0x9e4d('0x33')]=_0x45dc0b[_0x9e4d('0x33')];queues[_0x45dc0b['uniqueid']]['connectedlinename']=_0x45dc0b[_0x9e4d('0x37')];}}catch(_0x5ecf71){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x31'),_0x45dc0b[_0x9e4d('0xf')]),_0x5ecf71);}};exports[_0x9e4d('0x38')]=function(_0x75cfcb){try{if(!_[_0x9e4d('0x18')](queues[_0x75cfcb['uniqueid']])){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')](_0x9e4d('0x39'),_0x75cfcb['uniqueid']),_0x75cfcb);utils[_0x9e4d('0x2')](util['format'](_0x9e4d('0x3a'),_0x75cfcb[_0x9e4d('0xf')],queues[_0x75cfcb[_0x9e4d('0xf')]][_0x9e4d('0x2b')],_0x75cfcb[_0x9e4d('0x3b')],_0x75cfcb['destaccountcode']));queues[_0x75cfcb[_0x9e4d('0xf')]]['queuecallerabandon']=![];queues[_0x75cfcb[_0x9e4d('0xf')]][_0x9e4d('0x24')]=![];queues[_0x75cfcb[_0x9e4d('0xf')]][_0x9e4d('0x25')]=null;queues[_0x75cfcb[_0x9e4d('0xf')]][_0x9e4d('0x26')]=![];queues[_0x75cfcb[_0x9e4d('0xf')]]['queuecallerexitreason']=null;queues[_0x75cfcb['uniqueid']]['queuecallerexitAt']=null;queues[_0x75cfcb[_0x9e4d('0xf')]][_0x9e4d('0x3c')]=!![];queues[_0x75cfcb[_0x9e4d('0xf')]][_0x9e4d('0x3d')]=_0x75cfcb['destaccountcode'];queues[_0x75cfcb[_0x9e4d('0xf')]]['lastAssignedTo']=_0x75cfcb[_0x9e4d('0x3b')];}}catch(_0x36c5aa){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x39'),_0x75cfcb['uniqueid']),_0x36c5aa);}};exports[_0x9e4d('0x3e')]=function(_0x36784d){try{if(!_[_0x9e4d('0x18')](queues[_0x36784d[_0x9e4d('0xf')]])){if(queues[_0x36784d['uniqueid']]['queuecallerleaveAt']){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')]('[%s][queues][agentcomplete]',_0x36784d['uniqueid']),_0x36784d);queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x24')]=![];queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x24')]=![];queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x25')]=null;queues[_0x36784d['uniqueid']][_0x9e4d('0x26')]=![];queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x28')]=null;queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x3c')]=!![];queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x6')]=_0x36784d[_0x9e4d('0x3b')];queues[_0x36784d['uniqueid']][_0x9e4d('0x3f')]=!![];queues[_0x36784d[_0x9e4d('0xf')]]['queuecallercompleteAt']=utils['now']();if(_0x36784d[_0x9e4d('0x40')]==_0x9e4d('0x41')){if(!queues[_0x36784d[_0x9e4d('0xf')]]['transfer']){queues[_0x36784d['uniqueid']]['queuecallerexitreason']=_0x9e4d('0x42');}}else{queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x8')]=_0x9e4d('0x43')+_0x36784d[_0x9e4d('0x40')][_0x9e4d('0x22')]();}utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x44'),_0x36784d['uniqueid'],queues[_0x36784d[_0x9e4d('0xf')]]['name'],_0x36784d[_0x9e4d('0x3b')],queues[_0x36784d[_0x9e4d('0xf')]][_0x9e4d('0x8')]));writeDB(queues[_0x36784d['uniqueid']]);}}}catch(_0x199b86){utils['error'](util[_0x9e4d('0x12')](_0x9e4d('0x45'),_0x36784d['uniqueid']),_0x199b86);}};exports['blindtransfer']=function(_0x5ada9c){try{if(!_[_0x9e4d('0x18')](queues[_0x5ada9c[_0x9e4d('0x46')]])){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')](_0x9e4d('0x47'),_0x5ada9c[_0x9e4d('0xf')]),_0x5ada9c);queues[_0x5ada9c[_0x9e4d('0x46')]][_0x9e4d('0x41')]=!![];queues[_0x5ada9c['transfereeuniqueid']]['transfertype']=_0x9e4d('0x48');queues[_0x5ada9c[_0x9e4d('0x46')]][_0x9e4d('0x49')]=_0x5ada9c['extension'];queues[_0x5ada9c['transfereeuniqueid']][_0x9e4d('0x4a')]=_0x5ada9c['transfereeuniqueid'];queues[_0x5ada9c[_0x9e4d('0x46')]][_0x9e4d('0x8')]=_0x9e4d('0x4b');utils[_0x9e4d('0x2')](util['format'](_0x9e4d('0x4c'),_0x5ada9c[_0x9e4d('0xf')],queues[_0x5ada9c['transfereeuniqueid']][_0x9e4d('0x2b')],_0x5ada9c[_0x9e4d('0x46')],_0x5ada9c[_0x9e4d('0x4d')]));}}catch(_0x5e11c9){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x47'),_0x5ada9c[_0x9e4d('0xf')]),_0x5e11c9);}};exports[_0x9e4d('0x4e')]=function(_0x242fdf){try{utils['debug'](util[_0x9e4d('0x12')]('[%s][queues][attendedtransfer]',_0x242fdf[_0x9e4d('0x4f')]),_0x242fdf);if(_0x242fdf['origtransfereruniqueid']==_0x242fdf[_0x9e4d('0x50')]){if(!_[_0x9e4d('0x18')](queues[_0x242fdf[_0x9e4d('0x51')]])){utils['info'](util[_0x9e4d('0x12')]('[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER',_0x242fdf[_0x9e4d('0x4f')],queues[_0x242fdf['secondtransfererlinkedid']][_0x9e4d('0x2b')],_0x242fdf[_0x9e4d('0x52')]));queues[_0x242fdf['secondtransfererlinkedid']][_0x9e4d('0x41')]=!![];queues[_0x242fdf[_0x9e4d('0x51')]][_0x9e4d('0x53')]=_0x9e4d('0x54');queues[_0x242fdf[_0x9e4d('0x51')]][_0x9e4d('0x49')]=_0x242fdf[_0x9e4d('0x52')];queues[_0x242fdf['secondtransfererlinkedid']][_0x9e4d('0x4a')]=_0x242fdf[_0x9e4d('0x4f')];queues[_0x242fdf['secondtransfererlinkedid']][_0x9e4d('0x8')]=_0x9e4d('0x55');}if(!_[_0x9e4d('0x18')](queues[_0x242fdf[_0x9e4d('0x50')]])){if(_0x242fdf[_0x9e4d('0x56')]&&queues[_0x242fdf[_0x9e4d('0x56')]]){queues[_0x242fdf[_0x9e4d('0x56')]][_0x9e4d('0x1d')]=0x1;queues[_0x242fdf[_0x9e4d('0x46')]]=_[_0x9e4d('0x57')](queues[_0x242fdf[_0x9e4d('0x56')]]);queues[_0x242fdf['transfereeuniqueid']][_0x9e4d('0xe')]=_0x242fdf[_0x9e4d('0x58')];queues[_0x242fdf['transfereeuniqueid']]['queuecallerenterreason']=0x2;queues[_0x242fdf[_0x9e4d('0x46')]]['calleridnum']=queues[_0x242fdf['secondtransfererlinkedid']][_0x9e4d('0x7')];queues[_0x242fdf['transfereeuniqueid']][_0x9e4d('0x59')]=queues[_0x242fdf[_0x9e4d('0x51')]][_0x9e4d('0x59')];queues[_0x242fdf['transfereeuniqueid']][_0x9e4d('0x5a')]=utils[_0x9e4d('0x14')]();queues[_0x242fdf[_0x9e4d('0x46')]][_0x9e4d('0x35')]=utils[_0x9e4d('0x14')]();queues[_0x242fdf[_0x9e4d('0x46')]][_0x9e4d('0x5b')]=0x0;queues[_0x242fdf[_0x9e4d('0x46')]][_0x9e4d('0x5c')]=0x0;utils[_0x9e4d('0x2')](util['format']('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x242fdf['origtransfereruniqueid'],queues[_0x242fdf[_0x9e4d('0x46')]]['name'],queues[_0x242fdf[_0x9e4d('0x46')]][_0x9e4d('0x7')],queues[_0x242fdf[_0x9e4d('0x46')]][_0x9e4d('0x59')]));}else{utils['info'](util[_0x9e4d('0x12')](_0x9e4d('0x5d'),_0x242fdf['origtransfereruniqueid'],queues[_0x242fdf['origtransfererlinkedid']][_0x9e4d('0x2b')],_0x242fdf[_0x9e4d('0x51')]));queues[_0x242fdf['origtransfererlinkedid']][_0x9e4d('0xe')]=_0x242fdf['secondtransfererlinkedid'];}}}else if(_0x242fdf[_0x9e4d('0x5e')]==_0x242fdf['secondtransfererlinkedid']){if(!_[_0x9e4d('0x18')](queues[_0x242fdf[_0x9e4d('0x50')]])){utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x5f'),_0x242fdf[_0x9e4d('0x4f')],queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x2b')],_0x242fdf[_0x9e4d('0x5e')],_0x242fdf[_0x9e4d('0x60')]));queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x41')]=!![];queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x53')]='ATTENDED';queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x49')]=_0x242fdf[_0x9e4d('0x60')];queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x4a')]=_0x242fdf[_0x9e4d('0x5e')];queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x8')]=_0x9e4d('0x55');}if(!_['isNil'](queues[_0x242fdf[_0x9e4d('0x51')]])){if(_0x242fdf[_0x9e4d('0x61')]&&queues[_0x242fdf[_0x9e4d('0x61')]]){queues[_0x242fdf['transfertargetlinkedid']]['queuecallerenterreason']=0x1;queues[_0x242fdf[_0x9e4d('0x58')]]=_[_0x9e4d('0x57')](queues[_0x242fdf[_0x9e4d('0x61')]]);queues[_0x242fdf[_0x9e4d('0x58')]][_0x9e4d('0xe')]=_0x242fdf[_0x9e4d('0x58')];queues[_0x242fdf[_0x9e4d('0x58')]][_0x9e4d('0x1d')]=0x2;queues[_0x242fdf[_0x9e4d('0x58')]]['calleridnum']=queues[_0x242fdf[_0x9e4d('0x50')]]['calleridnum'];queues[_0x242fdf['transfertargetuniqueid']]['calleridname']=queues[_0x242fdf[_0x9e4d('0x50')]][_0x9e4d('0x59')];queues[_0x242fdf[_0x9e4d('0x58')]]['queuecallerjoinAt']=utils[_0x9e4d('0x14')]();queues[_0x242fdf[_0x9e4d('0x58')]]['queuecallerleaveAt']=utils['now']();queues[_0x242fdf['transfertargetuniqueid']]['holdtime']=0x0;queues[_0x242fdf[_0x9e4d('0x58')]][_0x9e4d('0x5c')]=0x0;utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x62'),_0x242fdf[_0x9e4d('0x4f')],queues[_0x242fdf[_0x9e4d('0x58')]][_0x9e4d('0x2b')],queues[_0x242fdf[_0x9e4d('0x58')]]['transfereduniqueid'],queues[_0x242fdf[_0x9e4d('0x58')]][_0x9e4d('0x7')],queues[_0x242fdf[_0x9e4d('0x58')]]['calleridname']));}else{utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x5d'),_0x242fdf[_0x9e4d('0x4f')],queues[_0x242fdf[_0x9e4d('0x51')]][_0x9e4d('0x2b')],_0x242fdf[_0x9e4d('0x50')]));queues[_0x242fdf[_0x9e4d('0x51')]][_0x9e4d('0xe')]=_0x242fdf[_0x9e4d('0x50')];}}}}catch(_0x22fb98){utils['error'](util['format']('[%s][queues][attendedtransfer]',_0x242fdf[_0x9e4d('0x4f')]),_0x22fb98);}};exports[_0x9e4d('0x63')]=function(_0x46a6f4){try{if(!_[_0x9e4d('0x18')](queues[_0x46a6f4['uniqueid']])){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')](_0x9e4d('0x64'),_0x46a6f4[_0x9e4d('0xf')]),_0x46a6f4);queues[_0x46a6f4[_0x9e4d('0xf')]][_0x9e4d('0x65')]=utils[_0x9e4d('0x14')]();utils[_0x9e4d('0x2')](util['format'](_0x9e4d('0x66'),_0x46a6f4[_0x9e4d('0xf')],queues[_0x46a6f4[_0x9e4d('0xf')]][_0x9e4d('0x2b')],queues[_0x46a6f4[_0x9e4d('0xf')]][_0x9e4d('0x65')]));}}catch(_0x2d8604){utils[_0x9e4d('0x15')](util[_0x9e4d('0x12')](_0x9e4d('0x64'),_0x46a6f4[_0x9e4d('0xf')]),_0x2d8604);}};exports[_0x9e4d('0x67')]=function(_0x217ec4){try{if(!_['isNil'](queues[_0x217ec4[_0x9e4d('0xf')]])){if(!_[_0x9e4d('0x18')](queues[_0x217ec4[_0x9e4d('0xf')]][_0x9e4d('0x65')])){utils[_0x9e4d('0x11')](util[_0x9e4d('0x12')](_0x9e4d('0x68'),_0x217ec4[_0x9e4d('0xf')]),_0x217ec4);queues[_0x217ec4['uniqueid']][_0x9e4d('0x5c')]+=utils[_0x9e4d('0x34')](utils['now'](),queues[_0x217ec4[_0x9e4d('0xf')]][_0x9e4d('0x65')]);utils[_0x9e4d('0x2')](util[_0x9e4d('0x12')](_0x9e4d('0x69'),_0x217ec4['uniqueid'],queues[_0x217ec4[_0x9e4d('0xf')]][_0x9e4d('0x2b')],queues[_0x217ec4[_0x9e4d('0xf')]][_0x9e4d('0x5c')]));delete queues[_0x217ec4[_0x9e4d('0xf')]][_0x9e4d('0x65')];}}}catch(_0x2505f3){utils['error'](util[_0x9e4d('0x12')](_0x9e4d('0x68'),_0x217ec4['uniqueid']),_0x2505f3);}};
\ No newline at end of file