Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / services / xdr / queues.controller.js
index d0c03bb..7baca48 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34a8=['destaccountcode','assigned','lastAssignedTo','agentcomplete','[%s][queues][agentcomplete]','queuecallercomplete','transfer','COMPLETEDBY','reason','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','origtransfererexten','transfertype','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','clone','calleridnum','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','transfertargetuniqueid','[%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]','lodash','util','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','accountcode','queue','getVoiceQueueByName','then','type','CreateVoiceQueueReport','request','transfereduniqueid','uniqueid','queuecallerjoin','[%s][queues][queuecallerjoin]','info','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','hangup','isNil','debug','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercompleteAt','now','queuecallerexitreason','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','[%s][queues][hangup]','varset','variable','value','toUpperCase','CONTINUE','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','queuecallerabandonAt','queuecallerexitAt','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','name','error','[%s][queues][varset]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','holdtime','diffTime','queuecallerjoinAt','count','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername'];(function(_0x1a87b3,_0x45ba68){var _0x37e84d=function(_0x39f49e){while(--_0x39f49e){_0x1a87b3['push'](_0x1a87b3['shift']());}};_0x37e84d(++_0x45ba68);}(_0x34a8,0x9b));var _0x834a=function(_0x5864ef,_0x496812){_0x5864ef=_0x5864ef-0x0;var _0x21c244=_0x34a8[_0x5864ef];return _0x21c244;};'use strict';var _=require(_0x834a('0x0'));var util=require(_0x834a('0x1'));var utils=require('./utils');var queues={};function writeDB(_0x2348a2){utils['info'](util[_0x834a('0x2')](_0x834a('0x3'),_0x2348a2['uniqueid'],_0x2348a2[_0x834a('0x4')],_0x2348a2['queue'],_0x2348a2['lastAssignedTo'],_0x2348a2['calleridnum'],_0x2348a2[_0x834a('0x5')],_0x2348a2['queuecallerexitreason']));if(_0x2348a2[_0x834a('0x6')]){utils[_0x834a('0x7')](_0x2348a2[_0x834a('0x6')])[_0x834a('0x8')](function(_0x3a1c8e){if(_0x3a1c8e){_0x2348a2[_0x834a('0x9')]=_0x3a1c8e['type'];}utils['request'](_0x834a('0xa'),_0x2348a2);});}else{utils[_0x834a('0xb')](_0x834a('0xa'),_0x2348a2);}if(_0x2348a2['transfereduniqueid']){delete queues[_0x2348a2[_0x834a('0xc')]];}else{delete queues[_0x2348a2[_0x834a('0xd')]];}}exports[_0x834a('0xe')]=function(_0x5ab188){try{utils['debug'](util[_0x834a('0x2')](_0x834a('0xf'),_0x5ab188[_0x834a('0xd')]),_0x5ab188);utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x11'),_0x5ab188['uniqueid'],_0x5ab188['queue'],_0x5ab188[_0x834a('0x12')]));queues[_0x5ab188['uniqueid']]=_[_0x834a('0x13')](_0x5ab188,{'originalposition':_0x5ab188[_0x834a('0x12')],'queuecallerjoinAt':utils['now'](),'mohtime':0x0});}catch(_0x353312){utils['error'](util[_0x834a('0x2')](_0x834a('0xf'),_0x5ab188[_0x834a('0xd')]),_0x353312);}};exports[_0x834a('0x14')]=function(_0x3c085c){try{if(!_[_0x834a('0x15')](queues[_0x3c085c[_0x834a('0xd')]])){utils[_0x834a('0x16')](util[_0x834a('0x2')]('[%s][queues][hangup]',_0x3c085c[_0x834a('0xd')]),_0x3c085c);if(queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0x17')]){if(!queues[_0x3c085c['uniqueid']][_0x834a('0x18')]&&!queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0x19')]){queues[_0x3c085c[_0x834a('0xd')]]['queuecallercomplete']=!![];queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0x1a')]=utils[_0x834a('0x1b')]();queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0x1c')]='COMPLETEDBYAGENT';}utils['info'](util[_0x834a('0x2')](_0x834a('0x1d'),_0x3c085c[_0x834a('0xd')],queues[_0x3c085c['uniqueid']]['name'],queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0x1c')]));writeDB(queues[_0x3c085c['uniqueid']]);}else if(queues[_0x3c085c[_0x834a('0xd')]]['transfereduniqueid']){utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x1e'),_0x3c085c['uniqueid'],queues[_0x3c085c[_0x834a('0xd')]]['name'],queues[_0x3c085c['uniqueid']]['transfereduniqueid']));queues[queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0xc')]]=queues[_0x3c085c[_0x834a('0xd')]];queues[queues[_0x3c085c[_0x834a('0xd')]][_0x834a('0xc')]][_0x834a('0x1f')]=0x2;delete queues[_0x3c085c[_0x834a('0xd')]];}}}catch(_0x5573fe){utils['error'](util[_0x834a('0x2')](_0x834a('0x20'),_0x3c085c[_0x834a('0xd')]),_0x5573fe);}};exports[_0x834a('0x21')]=function(_0x24e4fb){try{utils[_0x834a('0x16')](util['format']('[%s][queues][varset]',_0x24e4fb[_0x834a('0xd')]),_0x24e4fb);if(!_[_0x834a('0x15')](_0x24e4fb[_0x834a('0x22')]['queuestatus'])&&_0x24e4fb[_0x834a('0x23')][_0x834a('0x24')]()!==_0x834a('0x25')){if(!_['isNil'](queues[_0x24e4fb[_0x834a('0xd')]])){queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x18')]=![];queues[_0x24e4fb[_0x834a('0xd')]]['queuecallerabandonAt']=null;queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x19')]=!![];queues[_0x24e4fb[_0x834a('0xd')]]['queuecallerexitAt']=utils[_0x834a('0x1b')]();queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x1c')]=_0x24e4fb[_0x834a('0x23')]['toUpperCase']();utils['info'](util[_0x834a('0x2')](_0x834a('0x26'),_0x24e4fb['uniqueid'],queues[_0x24e4fb['uniqueid']]['name'],_0x24e4fb[_0x834a('0x23')],queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x1c')]));writeDB(queues[_0x24e4fb[_0x834a('0xd')]]);}}else if(!_[_0x834a('0x15')](_0x24e4fb[_0x834a('0x22')][_0x834a('0x27')])){if(!_[_0x834a('0x15')](queues[_0x24e4fb[_0x834a('0xd')]])&&!queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x18')]){queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x18')]=![];queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x28')]=null;queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x19')]=!![];queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x29')]=utils[_0x834a('0x1b')]();queues[_0x24e4fb['uniqueid']]['queuecallerexitreason']=_0x834a('0x2a');utils[_0x834a('0x10')](util['format'](_0x834a('0x2b'),_0x24e4fb[_0x834a('0xd')],queues[_0x24e4fb[_0x834a('0xd')]][_0x834a('0x2c')],_0x24e4fb[_0x834a('0x23')],queues[_0x24e4fb[_0x834a('0xd')]]['queuecallerexitreason']));}}}catch(_0xc258d9){utils[_0x834a('0x2d')](util[_0x834a('0x2')](_0x834a('0x2e'),_0x24e4fb[_0x834a('0xd')]),_0xc258d9);}};exports[_0x834a('0x18')]=function(_0x5b0cde){try{if(!_[_0x834a('0x15')](queues[_0x5b0cde['uniqueid']])){utils[_0x834a('0x16')](util[_0x834a('0x2')]('[%s][queues][queuecallerabandon]',_0x5b0cde['uniqueid']),_0x5b0cde);queues[_0x5b0cde[_0x834a('0xd')]][_0x834a('0x19')]=![];queues[_0x5b0cde[_0x834a('0xd')]][_0x834a('0x29')]=null;queues[_0x5b0cde[_0x834a('0xd')]][_0x834a('0x18')]=!![];queues[_0x5b0cde[_0x834a('0xd')]][_0x834a('0x28')]=utils['now']();queues[_0x5b0cde[_0x834a('0xd')]][_0x834a('0x1c')]=_0x834a('0x2f');utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x30'),_0x5b0cde[_0x834a('0xd')],queues[_0x5b0cde['uniqueid']][_0x834a('0x2c')],queues[_0x5b0cde[_0x834a('0xd')]]['queuecallerexitreason']));}}catch(_0x3829bf){utils[_0x834a('0x2d')](util[_0x834a('0x2')](_0x834a('0x31'),_0x5b0cde[_0x834a('0xd')]),_0x3829bf);}};exports[_0x834a('0x32')]=function(_0x26a479){try{if(!_[_0x834a('0x15')](queues[_0x26a479[_0x834a('0xd')]])){utils[_0x834a('0x16')](util[_0x834a('0x2')](_0x834a('0x33'),_0x26a479['uniqueid']),_0x26a479);utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x34'),_0x26a479[_0x834a('0xd')],queues[_0x26a479[_0x834a('0xd')]][_0x834a('0x2c')],_0x26a479[_0x834a('0x35')],_0x26a479[_0x834a('0x36')]));queues[_0x26a479[_0x834a('0xd')]][_0x834a('0x32')]=!![];queues[_0x26a479[_0x834a('0xd')]]['queuecallerleaveAt']=utils[_0x834a('0x1b')]();queues[_0x26a479[_0x834a('0xd')]][_0x834a('0x37')]=utils[_0x834a('0x38')](queues[_0x26a479[_0x834a('0xd')]]['queuecallerleaveAt'],queues[_0x26a479[_0x834a('0xd')]][_0x834a('0x39')]);queues[_0x26a479[_0x834a('0xd')]][_0x834a('0x12')]=_0x26a479[_0x834a('0x12')];queues[_0x26a479['uniqueid']][_0x834a('0x3a')]=_0x26a479[_0x834a('0x3a')];queues[_0x26a479[_0x834a('0xd')]][_0x834a('0x35')]=_0x26a479['connectedlinenum'];queues[_0x26a479[_0x834a('0xd')]]['connectedlinename']=_0x26a479[_0x834a('0x36')];}}catch(_0x4872a2){utils[_0x834a('0x2d')](util[_0x834a('0x2')](_0x834a('0x33'),_0x26a479[_0x834a('0xd')]),_0x4872a2);}};exports[_0x834a('0x3b')]=function(_0xf27df0){try{if(!_['isNil'](queues[_0xf27df0[_0x834a('0xd')]])){utils[_0x834a('0x16')](util[_0x834a('0x2')](_0x834a('0x3c'),_0xf27df0[_0x834a('0xd')]),_0xf27df0);utils[_0x834a('0x10')](util['format'](_0x834a('0x3d'),_0xf27df0[_0x834a('0xd')],queues[_0xf27df0[_0x834a('0xd')]][_0x834a('0x2c')],_0xf27df0[_0x834a('0x3e')],_0xf27df0[_0x834a('0x3f')]));queues[_0xf27df0[_0x834a('0xd')]][_0x834a('0x18')]=![];queues[_0xf27df0['uniqueid']][_0x834a('0x18')]=![];queues[_0xf27df0[_0x834a('0xd')]]['queuecallerabandonAt']=null;queues[_0xf27df0[_0x834a('0xd')]]['queuecallerexit']=![];queues[_0xf27df0[_0x834a('0xd')]][_0x834a('0x1c')]=null;queues[_0xf27df0[_0x834a('0xd')]][_0x834a('0x29')]=null;queues[_0xf27df0['uniqueid']][_0x834a('0x40')]=!![];queues[_0xf27df0['uniqueid']][_0x834a('0x5')]=_0xf27df0[_0x834a('0x3f')];queues[_0xf27df0[_0x834a('0xd')]][_0x834a('0x41')]=_0xf27df0['membername'];}}catch(_0x13a113){utils[_0x834a('0x2d')](util['format'](_0x834a('0x3c'),_0xf27df0[_0x834a('0xd')]),_0x13a113);}};exports[_0x834a('0x42')]=function(_0x1748de){try{if(!_[_0x834a('0x15')](queues[_0x1748de[_0x834a('0xd')]])){if(queues[_0x1748de[_0x834a('0xd')]]['queuecallerleaveAt']){utils[_0x834a('0x16')](util[_0x834a('0x2')](_0x834a('0x43'),_0x1748de[_0x834a('0xd')]),_0x1748de);queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x18')]=![];queues[_0x1748de[_0x834a('0xd')]]['queuecallerabandon']=![];queues[_0x1748de[_0x834a('0xd')]]['queuecallerabandonAt']=null;queues[_0x1748de['uniqueid']][_0x834a('0x19')]=![];queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x29')]=null;queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x40')]=!![];queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x41')]=_0x1748de[_0x834a('0x3e')];queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x44')]=!![];queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x1a')]=utils[_0x834a('0x1b')]();if(_0x1748de['reason']==_0x834a('0x45')){if(!queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x45')]){queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x1c')]='TRANSFER';}}else{queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x1c')]=_0x834a('0x46')+_0x1748de[_0x834a('0x47')][_0x834a('0x24')]();}utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x48'),_0x1748de['uniqueid'],queues[_0x1748de[_0x834a('0xd')]]['name'],_0x1748de['membername'],queues[_0x1748de[_0x834a('0xd')]][_0x834a('0x1c')]));writeDB(queues[_0x1748de['uniqueid']]);}}}catch(_0x355763){utils['error'](util[_0x834a('0x2')](_0x834a('0x43'),_0x1748de[_0x834a('0xd')]),_0x355763);}};exports[_0x834a('0x49')]=function(_0x59a498){try{if(!_['isNil'](queues[_0x59a498[_0x834a('0x4a')]])){utils[_0x834a('0x16')](util[_0x834a('0x2')]('[%s][queues][blindtransfer]',_0x59a498[_0x834a('0xd')]),_0x59a498);queues[_0x59a498['transfereeuniqueid']][_0x834a('0x45')]=!![];queues[_0x59a498[_0x834a('0x4a')]]['transfertype']=_0x834a('0x4b');queues[_0x59a498['transfereeuniqueid']][_0x834a('0x4c')]=_0x59a498[_0x834a('0x4d')];queues[_0x59a498['transfereeuniqueid']][_0x834a('0x4e')]=_0x59a498[_0x834a('0x4a')];queues[_0x59a498[_0x834a('0x4a')]][_0x834a('0x1c')]=_0x834a('0x4f');utils['info'](util['format']('[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER',_0x59a498[_0x834a('0xd')],queues[_0x59a498[_0x834a('0x4a')]][_0x834a('0x2c')],_0x59a498['transfereeuniqueid'],_0x59a498[_0x834a('0x4d')]));}}catch(_0x60b51a){utils[_0x834a('0x2d')](util[_0x834a('0x2')](_0x834a('0x50'),_0x59a498['uniqueid']),_0x60b51a);}};exports[_0x834a('0x51')]=function(_0x5cb16d){try{utils['debug'](util[_0x834a('0x2')](_0x834a('0x52'),_0x5cb16d[_0x834a('0x53')]),_0x5cb16d);if(_0x5cb16d['origtransfereruniqueid']==_0x5cb16d[_0x834a('0x54')]){if(!_[_0x834a('0x15')](queues[_0x5cb16d[_0x834a('0x55')]])){utils[_0x834a('0x10')](util[_0x834a('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER',_0x5cb16d[_0x834a('0x53')],queues[_0x5cb16d[_0x834a('0x55')]]['name'],_0x5cb16d[_0x834a('0x56')]));queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x45')]=!![];queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x57')]=_0x834a('0x58');queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x4c')]=_0x5cb16d[_0x834a('0x56')];queues[_0x5cb16d[_0x834a('0x55')]]['transferuniqueid']=_0x5cb16d[_0x834a('0x53')];queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x1c')]=_0x834a('0x59');}if(!_['isNil'](queues[_0x5cb16d[_0x834a('0x54')]])){if(_0x5cb16d[_0x834a('0x5a')]&&queues[_0x5cb16d[_0x834a('0x5a')]]){queues[_0x5cb16d['transfereelinkedid']][_0x834a('0x1f')]=0x1;queues[_0x5cb16d[_0x834a('0x4a')]]=_[_0x834a('0x5b')](queues[_0x5cb16d[_0x834a('0x5a')]]);queues[_0x5cb16d['transfereeuniqueid']]['transfereduniqueid']=_0x5cb16d['transfertargetuniqueid'];queues[_0x5cb16d[_0x834a('0x4a')]]['queuecallerenterreason']=0x2;queues[_0x5cb16d[_0x834a('0x4a')]][_0x834a('0x5c')]=queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x5c')];queues[_0x5cb16d[_0x834a('0x4a')]][_0x834a('0x5d')]=queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x5d')];queues[_0x5cb16d['transfereeuniqueid']][_0x834a('0x39')]=utils[_0x834a('0x1b')]();queues[_0x5cb16d['transfereeuniqueid']]['queuecallerleaveAt']=utils[_0x834a('0x1b')]();queues[_0x5cb16d[_0x834a('0x4a')]]['holdtime']=0x0;queues[_0x5cb16d['transfereeuniqueid']][_0x834a('0x5e')]=0x0;utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x5f'),_0x5cb16d['origtransfereruniqueid'],queues[_0x5cb16d[_0x834a('0x4a')]]['name'],queues[_0x5cb16d[_0x834a('0x4a')]]['calleridnum'],queues[_0x5cb16d[_0x834a('0x4a')]][_0x834a('0x5d')]));}else{utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x60'),_0x5cb16d[_0x834a('0x53')],queues[_0x5cb16d[_0x834a('0x54')]]['name'],_0x5cb16d[_0x834a('0x55')]));queues[_0x5cb16d['origtransfererlinkedid']]['transfereduniqueid']=_0x5cb16d[_0x834a('0x55')];}}}else if(_0x5cb16d[_0x834a('0x61')]==_0x5cb16d[_0x834a('0x55')]){if(!_['isNil'](queues[_0x5cb16d[_0x834a('0x54')]])){utils[_0x834a('0x10')](util['format'](_0x834a('0x62'),_0x5cb16d[_0x834a('0x53')],queues[_0x5cb16d[_0x834a('0x54')]]['name'],_0x5cb16d[_0x834a('0x61')],_0x5cb16d['secondtransfererexten']));queues[_0x5cb16d[_0x834a('0x54')]]['transfer']=!![];queues[_0x5cb16d['origtransfererlinkedid']][_0x834a('0x57')]=_0x834a('0x58');queues[_0x5cb16d[_0x834a('0x54')]]['transferexten']=_0x5cb16d[_0x834a('0x63')];queues[_0x5cb16d[_0x834a('0x54')]][_0x834a('0x4e')]=_0x5cb16d[_0x834a('0x61')];queues[_0x5cb16d[_0x834a('0x54')]][_0x834a('0x1c')]=_0x834a('0x59');}if(!_['isNil'](queues[_0x5cb16d[_0x834a('0x55')]])){if(_0x5cb16d[_0x834a('0x64')]&&queues[_0x5cb16d[_0x834a('0x64')]]){queues[_0x5cb16d[_0x834a('0x64')]][_0x834a('0x1f')]=0x1;queues[_0x5cb16d[_0x834a('0x65')]]=_[_0x834a('0x5b')](queues[_0x5cb16d[_0x834a('0x64')]]);queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0xc')]=_0x5cb16d[_0x834a('0x65')];queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0x1f')]=0x2;queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0x5c')]=queues[_0x5cb16d[_0x834a('0x54')]][_0x834a('0x5c')];queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0x5d')]=queues[_0x5cb16d[_0x834a('0x54')]][_0x834a('0x5d')];queues[_0x5cb16d['transfertargetuniqueid']][_0x834a('0x39')]=utils[_0x834a('0x1b')]();queues[_0x5cb16d[_0x834a('0x65')]]['queuecallerleaveAt']=utils['now']();queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0x37')]=0x0;queues[_0x5cb16d['transfertargetuniqueid']][_0x834a('0x5e')]=0x0;utils[_0x834a('0x10')](util['format'](_0x834a('0x66'),_0x5cb16d['origtransfereruniqueid'],queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0x2c')],queues[_0x5cb16d['transfertargetuniqueid']][_0x834a('0xc')],queues[_0x5cb16d[_0x834a('0x65')]][_0x834a('0x5c')],queues[_0x5cb16d['transfertargetuniqueid']]['calleridname']));}else{utils[_0x834a('0x10')](util[_0x834a('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x5cb16d[_0x834a('0x53')],queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0x2c')],_0x5cb16d[_0x834a('0x54')]));queues[_0x5cb16d[_0x834a('0x55')]][_0x834a('0xc')]=_0x5cb16d['origtransfererlinkedid'];}}}}catch(_0x12a8d0){utils['error'](util[_0x834a('0x2')](_0x834a('0x52'),_0x5cb16d[_0x834a('0x53')]),_0x12a8d0);}};exports[_0x834a('0x67')]=function(_0x2959ac){try{if(!_[_0x834a('0x15')](queues[_0x2959ac[_0x834a('0xd')]])){utils['debug'](util[_0x834a('0x2')](_0x834a('0x68'),_0x2959ac[_0x834a('0xd')]),_0x2959ac);queues[_0x2959ac['uniqueid']][_0x834a('0x69')]=utils[_0x834a('0x1b')]();utils[_0x834a('0x10')](util[_0x834a('0x2')](_0x834a('0x6a'),_0x2959ac['uniqueid'],queues[_0x2959ac[_0x834a('0xd')]]['name'],queues[_0x2959ac[_0x834a('0xd')]][_0x834a('0x69')]));}}catch(_0x48a11d){utils[_0x834a('0x2d')](util[_0x834a('0x2')]('[%s][queues][musiconholdstart]',_0x2959ac[_0x834a('0xd')]),_0x48a11d);}};exports[_0x834a('0x6b')]=function(_0x5030b8){try{if(!_[_0x834a('0x15')](queues[_0x5030b8[_0x834a('0xd')]])){if(!_[_0x834a('0x15')](queues[_0x5030b8[_0x834a('0xd')]][_0x834a('0x69')])){utils[_0x834a('0x16')](util[_0x834a('0x2')](_0x834a('0x6c'),_0x5030b8[_0x834a('0xd')]),_0x5030b8);queues[_0x5030b8[_0x834a('0xd')]][_0x834a('0x5e')]+=utils[_0x834a('0x38')](utils[_0x834a('0x1b')](),queues[_0x5030b8[_0x834a('0xd')]]['musiconholdstartAt']);utils[_0x834a('0x10')](util['format']('[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s',_0x5030b8['uniqueid'],queues[_0x5030b8[_0x834a('0xd')]][_0x834a('0x2c')],queues[_0x5030b8[_0x834a('0xd')]]['mohtime']));delete queues[_0x5030b8[_0x834a('0xd')]][_0x834a('0x69')];}}}catch(_0x17d5a0){utils[_0x834a('0x2d')](util[_0x834a('0x2')](_0x834a('0x6c'),_0x5030b8['uniqueid']),_0x17d5a0);}};
\ No newline at end of file
+var _0x8de6=['toUpperCase','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','transfereeuniqueid','[%s][queues][blindtransfer]','transfertype','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','ATTENDED','transferexten','ATTENDEDTRANSFER','transfereelinkedid','queuecallerenterreason','clone','transfertargetuniqueid','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','secondtransfererexten','transfertargetlinkedid','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','util','./utils','info','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','uniqueid','lastAssignedTo','calleridnum','accountcode','getVoiceQueueByName','queue','then','type','request','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','error','hangup','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','now','queuecallerexitreason','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','varset','[%s][queues][varset]','isNil','queuestatus','CONTINUE','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','value','variable','queueposition','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','queuecallerabandonAt','ABANDONED','queuecallerleave','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','holdtime','queuecallerjoinAt','count','connectedlinename','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','agentcomplete','[%s][queues][agentcomplete]','reason','transfer','COMPLETEDBY'];(function(_0x13409c,_0x409b40){var _0xff4a0e=function(_0x4fda54){while(--_0x4fda54){_0x13409c['push'](_0x13409c['shift']());}};_0xff4a0e(++_0x409b40);}(_0x8de6,0x8f));var _0x68de=function(_0x40719f,_0x1deaeb){_0x40719f=_0x40719f-0x0;var _0x40f007=_0x8de6[_0x40719f];return _0x40f007;};'use strict';var _=require(_0x68de('0x0'));var util=require(_0x68de('0x1'));var utils=require(_0x68de('0x2'));var queues={};function writeDB(_0x53425b){utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x5'),_0x53425b[_0x68de('0x6')],_0x53425b['channel'],_0x53425b['queue'],_0x53425b[_0x68de('0x7')],_0x53425b[_0x68de('0x8')],_0x53425b[_0x68de('0x9')],_0x53425b['queuecallerexitreason']));if(_0x53425b['queue']){utils[_0x68de('0xa')](_0x53425b[_0x68de('0xb')])[_0x68de('0xc')](function(_0xb4f134){if(_0xb4f134){_0x53425b[_0x68de('0xd')]=_0xb4f134[_0x68de('0xd')];}utils[_0x68de('0xe')]('CreateVoiceQueueReport',_0x53425b);});}else{utils[_0x68de('0xe')]('CreateVoiceQueueReport',_0x53425b);}if(_0x53425b[_0x68de('0xf')]){delete queues[_0x53425b['transfereduniqueid']];}else{delete queues[_0x53425b[_0x68de('0x6')]];}}exports[_0x68de('0x10')]=function(_0x220232){try{utils[_0x68de('0x11')](util[_0x68de('0x4')](_0x68de('0x12'),_0x220232[_0x68de('0x6')]),_0x220232);utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x13'),_0x220232['uniqueid'],_0x220232[_0x68de('0xb')],_0x220232[_0x68de('0x14')]));queues[_0x220232[_0x68de('0x6')]]=_[_0x68de('0x15')](_0x220232,{'originalposition':_0x220232[_0x68de('0x14')],'queuecallerjoinAt':utils['now'](),'mohtime':0x0});}catch(_0x26e9e5){utils[_0x68de('0x16')](util['format']('[%s][queues][queuecallerjoin]',_0x220232[_0x68de('0x6')]),_0x26e9e5);}};exports[_0x68de('0x17')]=function(_0x27e48e){try{if(!_['isNil'](queues[_0x27e48e['uniqueid']])){utils[_0x68de('0x11')](util[_0x68de('0x4')](_0x68de('0x18'),_0x27e48e[_0x68de('0x6')]),_0x27e48e);if(queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0x19')]){if(!queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0x1a')]&&!queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0x1b')]){queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0x1c')]=!![];queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0x1d')]=utils[_0x68de('0x1e')]();queues[_0x27e48e['uniqueid']][_0x68de('0x1f')]=_0x68de('0x20');}utils[_0x68de('0x3')](util['format'](_0x68de('0x21'),_0x27e48e[_0x68de('0x6')],queues[_0x27e48e['uniqueid']][_0x68de('0x22')],queues[_0x27e48e[_0x68de('0x6')]]['queuecallerexitreason']));writeDB(queues[_0x27e48e[_0x68de('0x6')]]);}else if(queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0xf')]){utils['info'](util[_0x68de('0x4')](_0x68de('0x23'),_0x27e48e[_0x68de('0x6')],queues[_0x27e48e[_0x68de('0x6')]][_0x68de('0x22')],queues[_0x27e48e['uniqueid']][_0x68de('0xf')]));queues[queues[_0x27e48e['uniqueid']][_0x68de('0xf')]]=queues[_0x27e48e[_0x68de('0x6')]];queues[queues[_0x27e48e['uniqueid']]['transfereduniqueid']]['queuecallerenterreason']=0x2;delete queues[_0x27e48e[_0x68de('0x6')]];}}}catch(_0x20e6da){utils[_0x68de('0x16')](util[_0x68de('0x4')]('[%s][queues][hangup]',_0x27e48e[_0x68de('0x6')]),_0x20e6da);}};exports[_0x68de('0x24')]=function(_0x24d241){try{utils['debug'](util[_0x68de('0x4')](_0x68de('0x25'),_0x24d241['uniqueid']),_0x24d241);if(!_[_0x68de('0x26')](_0x24d241['variable'][_0x68de('0x27')])&&_0x24d241['value']['toUpperCase']()!==_0x68de('0x28')){if(!_[_0x68de('0x26')](queues[_0x24d241[_0x68de('0x6')]])){queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x1a')]=![];queues[_0x24d241[_0x68de('0x6')]]['queuecallerabandonAt']=null;queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x1b')]=!![];queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x29')]=utils[_0x68de('0x1e')]();queues[_0x24d241['uniqueid']][_0x68de('0x1f')]=_0x24d241['value']['toUpperCase']();utils[_0x68de('0x3')](util['format'](_0x68de('0x2a'),_0x24d241[_0x68de('0x6')],queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x22')],_0x24d241[_0x68de('0x2b')],queues[_0x24d241['uniqueid']][_0x68de('0x1f')]));writeDB(queues[_0x24d241[_0x68de('0x6')]]);}}else if(!_[_0x68de('0x26')](_0x24d241[_0x68de('0x2c')][_0x68de('0x2d')])){if(!_[_0x68de('0x26')](queues[_0x24d241[_0x68de('0x6')]])&&!queues[_0x24d241['uniqueid']]['queuecallerabandon']){queues[_0x24d241[_0x68de('0x6')]]['queuecallerabandon']=![];queues[_0x24d241['uniqueid']]['queuecallerabandonAt']=null;queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x1b')]=!![];queues[_0x24d241['uniqueid']]['queuecallerexitAt']=utils[_0x68de('0x1e')]();queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x1f')]=_0x68de('0x2e');utils[_0x68de('0x3')](util['format'](_0x68de('0x2f'),_0x24d241[_0x68de('0x6')],queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x22')],_0x24d241[_0x68de('0x2b')],queues[_0x24d241[_0x68de('0x6')]][_0x68de('0x1f')]));}}}catch(_0xec837d){utils['error'](util[_0x68de('0x4')]('[%s][queues][varset]',_0x24d241[_0x68de('0x6')]),_0xec837d);}};exports[_0x68de('0x1a')]=function(_0x2a1bb9){try{if(!_[_0x68de('0x26')](queues[_0x2a1bb9[_0x68de('0x6')]])){utils[_0x68de('0x11')](util['format'](_0x68de('0x30'),_0x2a1bb9['uniqueid']),_0x2a1bb9);queues[_0x2a1bb9['uniqueid']][_0x68de('0x1b')]=![];queues[_0x2a1bb9[_0x68de('0x6')]][_0x68de('0x29')]=null;queues[_0x2a1bb9[_0x68de('0x6')]][_0x68de('0x1a')]=!![];queues[_0x2a1bb9[_0x68de('0x6')]][_0x68de('0x31')]=utils[_0x68de('0x1e')]();queues[_0x2a1bb9['uniqueid']][_0x68de('0x1f')]=_0x68de('0x32');utils[_0x68de('0x3')](util[_0x68de('0x4')]('[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s',_0x2a1bb9[_0x68de('0x6')],queues[_0x2a1bb9[_0x68de('0x6')]]['name'],queues[_0x2a1bb9[_0x68de('0x6')]][_0x68de('0x1f')]));}}catch(_0x29ec47){utils['error'](util['format'](_0x68de('0x30'),_0x2a1bb9[_0x68de('0x6')]),_0x29ec47);}};exports[_0x68de('0x33')]=function(_0x41f587){try{if(!_['isNil'](queues[_0x41f587[_0x68de('0x6')]])){utils['debug'](util[_0x68de('0x4')]('[%s][queues][queuecallerleave]',_0x41f587[_0x68de('0x6')]),_0x41f587);utils['info'](util[_0x68de('0x4')](_0x68de('0x34'),_0x41f587[_0x68de('0x6')],queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x22')],_0x41f587[_0x68de('0x35')],_0x41f587['connectedlinename']));queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x33')]=!![];queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x19')]=utils[_0x68de('0x1e')]();queues[_0x41f587['uniqueid']][_0x68de('0x36')]=utils['diffTime'](queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x19')],queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x37')]);queues[_0x41f587[_0x68de('0x6')]]['position']=_0x41f587[_0x68de('0x14')];queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x38')]=_0x41f587['count'];queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x35')]=_0x41f587[_0x68de('0x35')];queues[_0x41f587[_0x68de('0x6')]][_0x68de('0x39')]=_0x41f587[_0x68de('0x39')];}}catch(_0x206618){utils[_0x68de('0x16')](util[_0x68de('0x4')]('[%s][queues][queuecallerleave]',_0x41f587[_0x68de('0x6')]),_0x206618);}};exports[_0x68de('0x3a')]=function(_0x337f69){try{if(!_[_0x68de('0x26')](queues[_0x337f69[_0x68de('0x6')]])){utils[_0x68de('0x11')](util[_0x68de('0x4')](_0x68de('0x3b'),_0x337f69[_0x68de('0x6')]),_0x337f69);utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x3c'),_0x337f69[_0x68de('0x6')],queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x22')],_0x337f69[_0x68de('0x3d')],_0x337f69[_0x68de('0x3e')]));queues[_0x337f69[_0x68de('0x6')]]['queuecallerabandon']=![];queues[_0x337f69['uniqueid']][_0x68de('0x1a')]=![];queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x31')]=null;queues[_0x337f69['uniqueid']][_0x68de('0x1b')]=![];queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x1f')]=null;queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x29')]=null;queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x3f')]=!![];queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x9')]=_0x337f69[_0x68de('0x3e')];queues[_0x337f69[_0x68de('0x6')]][_0x68de('0x7')]=_0x337f69['membername'];}}catch(_0x2b939e){utils[_0x68de('0x16')](util[_0x68de('0x4')]('[%s][queues][agentconnect]',_0x337f69['uniqueid']),_0x2b939e);}};exports[_0x68de('0x40')]=function(_0x299800){try{if(!_['isNil'](queues[_0x299800['uniqueid']])){if(queues[_0x299800[_0x68de('0x6')]][_0x68de('0x19')]){utils['debug'](util[_0x68de('0x4')](_0x68de('0x41'),_0x299800[_0x68de('0x6')]),_0x299800);queues[_0x299800[_0x68de('0x6')]][_0x68de('0x1a')]=![];queues[_0x299800[_0x68de('0x6')]][_0x68de('0x1a')]=![];queues[_0x299800[_0x68de('0x6')]][_0x68de('0x31')]=null;queues[_0x299800[_0x68de('0x6')]][_0x68de('0x1b')]=![];queues[_0x299800[_0x68de('0x6')]]['queuecallerexitAt']=null;queues[_0x299800['uniqueid']][_0x68de('0x3f')]=!![];queues[_0x299800[_0x68de('0x6')]][_0x68de('0x7')]=_0x299800[_0x68de('0x3d')];queues[_0x299800[_0x68de('0x6')]][_0x68de('0x1c')]=!![];queues[_0x299800[_0x68de('0x6')]][_0x68de('0x1d')]=utils[_0x68de('0x1e')]();if(_0x299800[_0x68de('0x42')]==_0x68de('0x43')){if(!queues[_0x299800['uniqueid']][_0x68de('0x43')]){queues[_0x299800[_0x68de('0x6')]]['queuecallerexitreason']='TRANSFER';}}else{queues[_0x299800['uniqueid']]['queuecallerexitreason']=_0x68de('0x44')+_0x299800[_0x68de('0x42')][_0x68de('0x45')]();}utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x46'),_0x299800[_0x68de('0x6')],queues[_0x299800[_0x68de('0x6')]][_0x68de('0x22')],_0x299800[_0x68de('0x3d')],queues[_0x299800[_0x68de('0x6')]][_0x68de('0x1f')]));writeDB(queues[_0x299800['uniqueid']]);}}}catch(_0x5bb361){utils[_0x68de('0x16')](util[_0x68de('0x4')](_0x68de('0x41'),_0x299800[_0x68de('0x6')]),_0x5bb361);}};exports['blindtransfer']=function(_0x164571){try{if(!_['isNil'](queues[_0x164571[_0x68de('0x47')]])){utils[_0x68de('0x11')](util[_0x68de('0x4')](_0x68de('0x48'),_0x164571['uniqueid']),_0x164571);queues[_0x164571[_0x68de('0x47')]][_0x68de('0x43')]=!![];queues[_0x164571['transfereeuniqueid']][_0x68de('0x49')]='BLIND';queues[_0x164571[_0x68de('0x47')]]['transferexten']=_0x164571[_0x68de('0x4a')];queues[_0x164571[_0x68de('0x47')]][_0x68de('0x4b')]=_0x164571['transfereeuniqueid'];queues[_0x164571[_0x68de('0x47')]][_0x68de('0x1f')]=_0x68de('0x4c');utils[_0x68de('0x3')](util['format'](_0x68de('0x4d'),_0x164571[_0x68de('0x6')],queues[_0x164571[_0x68de('0x47')]][_0x68de('0x22')],_0x164571['transfereeuniqueid'],_0x164571[_0x68de('0x4a')]));}}catch(_0xd7acdb){utils[_0x68de('0x16')](util['format'](_0x68de('0x48'),_0x164571[_0x68de('0x6')]),_0xd7acdb);}};exports[_0x68de('0x4e')]=function(_0x53ba26){try{utils[_0x68de('0x11')](util['format'](_0x68de('0x4f'),_0x53ba26[_0x68de('0x50')]),_0x53ba26);if(_0x53ba26[_0x68de('0x50')]==_0x53ba26[_0x68de('0x51')]){if(!_[_0x68de('0x26')](queues[_0x53ba26[_0x68de('0x52')]])){utils[_0x68de('0x3')](util['format'](_0x68de('0x53'),_0x53ba26[_0x68de('0x50')],queues[_0x53ba26[_0x68de('0x52')]][_0x68de('0x22')],_0x53ba26[_0x68de('0x54')]));queues[_0x53ba26['secondtransfererlinkedid']]['transfer']=!![];queues[_0x53ba26[_0x68de('0x52')]]['transfertype']=_0x68de('0x55');queues[_0x53ba26['secondtransfererlinkedid']][_0x68de('0x56')]=_0x53ba26['origtransfererexten'];queues[_0x53ba26[_0x68de('0x52')]][_0x68de('0x4b')]=_0x53ba26[_0x68de('0x50')];queues[_0x53ba26[_0x68de('0x52')]][_0x68de('0x1f')]=_0x68de('0x57');}if(!_[_0x68de('0x26')](queues[_0x53ba26[_0x68de('0x51')]])){if(_0x53ba26[_0x68de('0x58')]&&queues[_0x53ba26[_0x68de('0x58')]]){queues[_0x53ba26[_0x68de('0x58')]][_0x68de('0x59')]=0x1;queues[_0x53ba26[_0x68de('0x47')]]=_[_0x68de('0x5a')](queues[_0x53ba26[_0x68de('0x58')]]);queues[_0x53ba26['transfereeuniqueid']][_0x68de('0xf')]=_0x53ba26[_0x68de('0x5b')];queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x59')]=0x2;queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x8')]=queues[_0x53ba26[_0x68de('0x52')]][_0x68de('0x8')];queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x5c')]=queues[_0x53ba26['secondtransfererlinkedid']][_0x68de('0x5c')];queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x37')]=utils[_0x68de('0x1e')]();queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x19')]=utils['now']();queues[_0x53ba26['transfereeuniqueid']]['holdtime']=0x0;queues[_0x53ba26['transfereeuniqueid']][_0x68de('0x5d')]=0x0;utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x5e'),_0x53ba26['origtransfereruniqueid'],queues[_0x53ba26['transfereeuniqueid']][_0x68de('0x22')],queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x8')],queues[_0x53ba26[_0x68de('0x47')]][_0x68de('0x5c')]));}else{utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x5f'),_0x53ba26[_0x68de('0x50')],queues[_0x53ba26[_0x68de('0x51')]]['name'],_0x53ba26[_0x68de('0x52')]));queues[_0x53ba26[_0x68de('0x51')]]['transfereduniqueid']=_0x53ba26['secondtransfererlinkedid'];}}}else if(_0x53ba26[_0x68de('0x60')]==_0x53ba26[_0x68de('0x52')]){if(!_[_0x68de('0x26')](queues[_0x53ba26['origtransfererlinkedid']])){utils[_0x68de('0x3')](util[_0x68de('0x4')]('[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER',_0x53ba26[_0x68de('0x50')],queues[_0x53ba26[_0x68de('0x51')]][_0x68de('0x22')],_0x53ba26[_0x68de('0x60')],_0x53ba26[_0x68de('0x61')]));queues[_0x53ba26['origtransfererlinkedid']][_0x68de('0x43')]=!![];queues[_0x53ba26[_0x68de('0x51')]][_0x68de('0x49')]=_0x68de('0x55');queues[_0x53ba26[_0x68de('0x51')]][_0x68de('0x56')]=_0x53ba26['secondtransfererexten'];queues[_0x53ba26['origtransfererlinkedid']][_0x68de('0x4b')]=_0x53ba26[_0x68de('0x60')];queues[_0x53ba26['origtransfererlinkedid']]['queuecallerexitreason']=_0x68de('0x57');}if(!_[_0x68de('0x26')](queues[_0x53ba26[_0x68de('0x52')]])){if(_0x53ba26['transfertargetlinkedid']&&queues[_0x53ba26['transfertargetlinkedid']]){queues[_0x53ba26[_0x68de('0x62')]][_0x68de('0x59')]=0x1;queues[_0x53ba26['transfertargetuniqueid']]=_[_0x68de('0x5a')](queues[_0x53ba26['transfertargetlinkedid']]);queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0xf')]=_0x53ba26[_0x68de('0x5b')];queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x59')]=0x2;queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x8')]=queues[_0x53ba26['origtransfererlinkedid']][_0x68de('0x8')];queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x5c')]=queues[_0x53ba26[_0x68de('0x51')]][_0x68de('0x5c')];queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x37')]=utils[_0x68de('0x1e')]();queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x19')]=utils['now']();queues[_0x53ba26['transfertargetuniqueid']][_0x68de('0x36')]=0x0;queues[_0x53ba26[_0x68de('0x5b')]]['mohtime']=0x0;utils['info'](util[_0x68de('0x4')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s',_0x53ba26[_0x68de('0x50')],queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x22')],queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0xf')],queues[_0x53ba26[_0x68de('0x5b')]]['calleridnum'],queues[_0x53ba26[_0x68de('0x5b')]][_0x68de('0x5c')]));}else{utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x5f'),_0x53ba26[_0x68de('0x50')],queues[_0x53ba26[_0x68de('0x52')]]['name'],_0x53ba26[_0x68de('0x51')]));queues[_0x53ba26[_0x68de('0x52')]]['transfereduniqueid']=_0x53ba26[_0x68de('0x51')];}}}}catch(_0x38563b){utils[_0x68de('0x16')](util[_0x68de('0x4')](_0x68de('0x4f'),_0x53ba26['origtransfereruniqueid']),_0x38563b);}};exports[_0x68de('0x63')]=function(_0x51afbb){try{if(!_[_0x68de('0x26')](queues[_0x51afbb[_0x68de('0x6')]])){utils[_0x68de('0x11')](util[_0x68de('0x4')](_0x68de('0x64'),_0x51afbb[_0x68de('0x6')]),_0x51afbb);queues[_0x51afbb[_0x68de('0x6')]][_0x68de('0x65')]=utils[_0x68de('0x1e')]();utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x66'),_0x51afbb['uniqueid'],queues[_0x51afbb['uniqueid']][_0x68de('0x22')],queues[_0x51afbb['uniqueid']]['musiconholdstartAt']));}}catch(_0x2a5161){utils[_0x68de('0x16')](util[_0x68de('0x4')]('[%s][queues][musiconholdstart]',_0x51afbb['uniqueid']),_0x2a5161);}};exports[_0x68de('0x67')]=function(_0x27b2b3){try{if(!_[_0x68de('0x26')](queues[_0x27b2b3[_0x68de('0x6')]])){if(!_['isNil'](queues[_0x27b2b3[_0x68de('0x6')]][_0x68de('0x65')])){utils['debug'](util[_0x68de('0x4')](_0x68de('0x68'),_0x27b2b3[_0x68de('0x6')]),_0x27b2b3);queues[_0x27b2b3[_0x68de('0x6')]][_0x68de('0x5d')]+=utils['diffTime'](utils[_0x68de('0x1e')](),queues[_0x27b2b3[_0x68de('0x6')]][_0x68de('0x65')]);utils[_0x68de('0x3')](util[_0x68de('0x4')](_0x68de('0x69'),_0x27b2b3[_0x68de('0x6')],queues[_0x27b2b3[_0x68de('0x6')]][_0x68de('0x22')],queues[_0x27b2b3[_0x68de('0x6')]][_0x68de('0x5d')]));delete queues[_0x27b2b3[_0x68de('0x6')]][_0x68de('0x65')];}}}catch(_0x58a05f){utils[_0x68de('0x16')](util[_0x68de('0x4')](_0x68de('0x68'),_0x27b2b3[_0x68de('0x6')]),_0x58a05f);}};
\ No newline at end of file