Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / services / xdr / queues.controller.js
index 4eb2b58..1368c92 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f83=['[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][attendedtransfer]','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','./utils','info','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','uniqueid','channel','queue','lastAssignedTo','calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','now','[%s][queues][queuecallerjoin]','hangup','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','name','queuecallerenterreason','varset','[%s][queues][varset]','isNil','variable','queuestatus','value','toUpperCase','CONTINUE','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','queuecallerexitAt','EXITWITHKEY','error','[%s][queues][queuecallerabandon]','queuecallerabandonAt','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','holdtime','diffTime','count','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','destaccountcode','membername','agentcomplete','[%s][queues][agentcomplete]','assigned','reason','transfer','TRANSFER','COMPLETEDBY','transfereeuniqueid','[%s][queues][blindtransfer]','BLIND','transferexten','extension','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','origtransfereruniqueid','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','origtransfererexten','transfertype','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridname','queuecallerjoinAt','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfereruniqueid','secondtransfererexten','transferuniqueid','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s'];(function(_0x53210f,_0x1a51c4){var _0x23a251=function(_0x3d6856){while(--_0x3d6856){_0x53210f['push'](_0x53210f['shift']());}};_0x23a251(++_0x1a51c4);}(_0x6f83,0x72));var _0x36f8=function(_0x106e24,_0x100067){_0x106e24=_0x106e24-0x0;var _0x27caea=_0x6f83[_0x106e24];return _0x27caea;};'use strict';var _=require('lodash');var util=require(_0x36f8('0x0'));var utils=require(_0x36f8('0x1'));var queues={};function writeDB(_0x5e5f87){utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x4'),_0x5e5f87[_0x36f8('0x5')],_0x5e5f87[_0x36f8('0x6')],_0x5e5f87[_0x36f8('0x7')],_0x5e5f87[_0x36f8('0x8')],_0x5e5f87[_0x36f8('0x9')],_0x5e5f87[_0x36f8('0xa')],_0x5e5f87[_0x36f8('0xb')]));if(_0x5e5f87[_0x36f8('0x7')]){utils[_0x36f8('0xc')](_0x5e5f87[_0x36f8('0x7')])[_0x36f8('0xd')](function(_0x22b992){if(_0x22b992){_0x5e5f87[_0x36f8('0xe')]=_0x22b992['type'];}utils['request']('CreateVoiceQueueReport',_0x5e5f87);});}else{utils[_0x36f8('0xf')](_0x36f8('0x10'),_0x5e5f87);}if(_0x5e5f87[_0x36f8('0x11')]){delete queues[_0x5e5f87[_0x36f8('0x11')]];}else{delete queues[_0x5e5f87[_0x36f8('0x5')]];}}exports[_0x36f8('0x12')]=function(_0x2da79f){try{utils[_0x36f8('0x13')](util[_0x36f8('0x3')]('[%s][queues][queuecallerjoin]',_0x2da79f[_0x36f8('0x5')]),_0x2da79f);utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x14'),_0x2da79f['uniqueid'],_0x2da79f[_0x36f8('0x7')],_0x2da79f[_0x36f8('0x15')]));queues[_0x2da79f[_0x36f8('0x5')]]=_['assign'](_0x2da79f,{'originalposition':_0x2da79f[_0x36f8('0x15')],'queuecallerjoinAt':utils[_0x36f8('0x16')](),'mohtime':0x0});}catch(_0x1ba051){utils['error'](util[_0x36f8('0x3')](_0x36f8('0x17'),_0x2da79f[_0x36f8('0x5')]),_0x1ba051);}};exports[_0x36f8('0x18')]=function(_0x5ec545){try{if(!_['isNil'](queues[_0x5ec545[_0x36f8('0x5')]])){utils['debug'](util['format'](_0x36f8('0x19'),_0x5ec545[_0x36f8('0x5')]),_0x5ec545);if(queues[_0x5ec545['uniqueid']][_0x36f8('0x1a')]){if(!queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x1b')]&&!queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x1c')]){queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x1d')]=!![];queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x1e')]=utils[_0x36f8('0x16')]();queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0xb')]='COMPLETEDBYAGENT';}utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x1f'),_0x5ec545['uniqueid'],queues[_0x5ec545[_0x36f8('0x5')]]['name'],queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0xb')]));writeDB(queues[_0x5ec545['uniqueid']]);}else if(queues[_0x5ec545[_0x36f8('0x5')]]['transfereduniqueid']){utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x20'),_0x5ec545[_0x36f8('0x5')],queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x21')],queues[_0x5ec545['uniqueid']][_0x36f8('0x11')]));queues[queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x11')]]=queues[_0x5ec545[_0x36f8('0x5')]];queues[queues[_0x5ec545[_0x36f8('0x5')]][_0x36f8('0x11')]][_0x36f8('0x22')]=0x2;delete queues[_0x5ec545[_0x36f8('0x5')]];}}}catch(_0x2468a0){utils['error'](util[_0x36f8('0x3')](_0x36f8('0x19'),_0x5ec545[_0x36f8('0x5')]),_0x2468a0);}};exports[_0x36f8('0x23')]=function(_0x191cdc){try{utils[_0x36f8('0x13')](util['format'](_0x36f8('0x24'),_0x191cdc[_0x36f8('0x5')]),_0x191cdc);if(!_[_0x36f8('0x25')](_0x191cdc[_0x36f8('0x26')][_0x36f8('0x27')])&&_0x191cdc[_0x36f8('0x28')][_0x36f8('0x29')]()!==_0x36f8('0x2a')){if(!_[_0x36f8('0x25')](queues[_0x191cdc[_0x36f8('0x5')]])){queues[_0x191cdc[_0x36f8('0x5')]]['queuecallerabandon']=![];queues[_0x191cdc['uniqueid']]['queuecallerabandonAt']=null;queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0x1c')]=!![];queues[_0x191cdc[_0x36f8('0x5')]]['queuecallerexitAt']=utils[_0x36f8('0x16')]();queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0xb')]=_0x191cdc[_0x36f8('0x28')][_0x36f8('0x29')]();utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x2b'),_0x191cdc[_0x36f8('0x5')],queues[_0x191cdc[_0x36f8('0x5')]]['name'],_0x191cdc[_0x36f8('0x28')],queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0xb')]));writeDB(queues[_0x191cdc[_0x36f8('0x5')]]);}}else if(!_[_0x36f8('0x25')](_0x191cdc['variable'][_0x36f8('0x2c')])){if(!_[_0x36f8('0x25')](queues[_0x191cdc[_0x36f8('0x5')]])&&!queues[_0x191cdc['uniqueid']][_0x36f8('0x1b')]){queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0x1b')]=![];queues[_0x191cdc[_0x36f8('0x5')]]['queuecallerabandonAt']=null;queues[_0x191cdc['uniqueid']][_0x36f8('0x1c')]=!![];queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0x2d')]=utils[_0x36f8('0x16')]();queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0xb')]=_0x36f8('0x2e');utils['info'](util[_0x36f8('0x3')]('[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s',_0x191cdc[_0x36f8('0x5')],queues[_0x191cdc[_0x36f8('0x5')]][_0x36f8('0x21')],_0x191cdc['value'],queues[_0x191cdc['uniqueid']][_0x36f8('0xb')]));}}}catch(_0x245a27){utils[_0x36f8('0x2f')](util[_0x36f8('0x3')](_0x36f8('0x24'),_0x191cdc[_0x36f8('0x5')]),_0x245a27);}};exports[_0x36f8('0x1b')]=function(_0xb75354){try{if(!_[_0x36f8('0x25')](queues[_0xb75354[_0x36f8('0x5')]])){utils['debug'](util[_0x36f8('0x3')](_0x36f8('0x30'),_0xb75354[_0x36f8('0x5')]),_0xb75354);queues[_0xb75354[_0x36f8('0x5')]][_0x36f8('0x1c')]=![];queues[_0xb75354['uniqueid']][_0x36f8('0x2d')]=null;queues[_0xb75354[_0x36f8('0x5')]][_0x36f8('0x1b')]=!![];queues[_0xb75354['uniqueid']][_0x36f8('0x31')]=utils[_0x36f8('0x16')]();queues[_0xb75354[_0x36f8('0x5')]][_0x36f8('0xb')]=_0x36f8('0x32');utils['info'](util[_0x36f8('0x3')](_0x36f8('0x33'),_0xb75354[_0x36f8('0x5')],queues[_0xb75354[_0x36f8('0x5')]][_0x36f8('0x21')],queues[_0xb75354[_0x36f8('0x5')]][_0x36f8('0xb')]));}}catch(_0xfbbe0){utils['error'](util[_0x36f8('0x3')]('[%s][queues][queuecallerabandon]',_0xb75354[_0x36f8('0x5')]),_0xfbbe0);}};exports[_0x36f8('0x34')]=function(_0x598cc8){try{if(!_[_0x36f8('0x25')](queues[_0x598cc8[_0x36f8('0x5')]])){utils['debug'](util['format'](_0x36f8('0x35'),_0x598cc8[_0x36f8('0x5')]),_0x598cc8);utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x36'),_0x598cc8['uniqueid'],queues[_0x598cc8['uniqueid']][_0x36f8('0x21')],_0x598cc8[_0x36f8('0x37')],_0x598cc8[_0x36f8('0x38')]));queues[_0x598cc8[_0x36f8('0x5')]][_0x36f8('0x34')]=!![];queues[_0x598cc8['uniqueid']]['queuecallerleaveAt']=utils[_0x36f8('0x16')]();queues[_0x598cc8[_0x36f8('0x5')]][_0x36f8('0x39')]=utils[_0x36f8('0x3a')](queues[_0x598cc8[_0x36f8('0x5')]]['queuecallerleaveAt'],queues[_0x598cc8[_0x36f8('0x5')]]['queuecallerjoinAt']);queues[_0x598cc8[_0x36f8('0x5')]][_0x36f8('0x15')]=_0x598cc8[_0x36f8('0x15')];queues[_0x598cc8['uniqueid']][_0x36f8('0x3b')]=_0x598cc8[_0x36f8('0x3b')];queues[_0x598cc8[_0x36f8('0x5')]][_0x36f8('0x37')]=_0x598cc8[_0x36f8('0x37')];queues[_0x598cc8['uniqueid']][_0x36f8('0x38')]=_0x598cc8['connectedlinename'];}}catch(_0x5b38da){utils['error'](util[_0x36f8('0x3')](_0x36f8('0x35'),_0x598cc8[_0x36f8('0x5')]),_0x5b38da);}};exports[_0x36f8('0x3c')]=function(_0x3ed3be){try{if(!_['isNil'](queues[_0x3ed3be['uniqueid']])){utils[_0x36f8('0x13')](util[_0x36f8('0x3')](_0x36f8('0x3d'),_0x3ed3be[_0x36f8('0x5')]),_0x3ed3be);utils['info'](util['format'](_0x36f8('0x3e'),_0x3ed3be['uniqueid'],queues[_0x3ed3be[_0x36f8('0x5')]][_0x36f8('0x21')],_0x3ed3be['membername'],_0x3ed3be[_0x36f8('0x3f')]));queues[_0x3ed3be['uniqueid']]['queuecallerabandon']=![];queues[_0x3ed3be[_0x36f8('0x5')]]['queuecallerabandon']=![];queues[_0x3ed3be[_0x36f8('0x5')]]['queuecallerabandonAt']=null;queues[_0x3ed3be[_0x36f8('0x5')]][_0x36f8('0x1c')]=![];queues[_0x3ed3be[_0x36f8('0x5')]]['queuecallerexitreason']=null;queues[_0x3ed3be[_0x36f8('0x5')]][_0x36f8('0x2d')]=null;queues[_0x3ed3be[_0x36f8('0x5')]]['assigned']=!![];queues[_0x3ed3be[_0x36f8('0x5')]]['accountcode']=_0x3ed3be[_0x36f8('0x3f')];queues[_0x3ed3be[_0x36f8('0x5')]][_0x36f8('0x8')]=_0x3ed3be[_0x36f8('0x40')];}}catch(_0x216aff){utils[_0x36f8('0x2f')](util[_0x36f8('0x3')](_0x36f8('0x3d'),_0x3ed3be[_0x36f8('0x5')]),_0x216aff);}};exports[_0x36f8('0x41')]=function(_0x2c050c){try{if(!_[_0x36f8('0x25')](queues[_0x2c050c[_0x36f8('0x5')]])){if(queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x1a')]){utils[_0x36f8('0x13')](util['format'](_0x36f8('0x42'),_0x2c050c['uniqueid']),_0x2c050c);queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x1b')]=![];queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x1b')]=![];queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x31')]=null;queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x1c')]=![];queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x2d')]=null;queues[_0x2c050c['uniqueid']][_0x36f8('0x43')]=!![];queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x8')]=_0x2c050c[_0x36f8('0x40')];queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x1d')]=!![];queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x1e')]=utils['now']();if(_0x2c050c[_0x36f8('0x44')]==_0x36f8('0x45')){if(!queues[_0x2c050c['uniqueid']][_0x36f8('0x45')]){queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0xb')]=_0x36f8('0x46');}}else{queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0xb')]=_0x36f8('0x47')+_0x2c050c[_0x36f8('0x44')][_0x36f8('0x29')]();}utils['info'](util[_0x36f8('0x3')]('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x2c050c[_0x36f8('0x5')],queues[_0x2c050c[_0x36f8('0x5')]][_0x36f8('0x21')],_0x2c050c[_0x36f8('0x40')],queues[_0x2c050c[_0x36f8('0x5')]]['queuecallerexitreason']));writeDB(queues[_0x2c050c['uniqueid']]);}}}catch(_0x479016){utils[_0x36f8('0x2f')](util['format'](_0x36f8('0x42'),_0x2c050c[_0x36f8('0x5')]),_0x479016);}};exports['blindtransfer']=function(_0x35ba1c){try{if(!_[_0x36f8('0x25')](queues[_0x35ba1c[_0x36f8('0x48')]])){utils['debug'](util[_0x36f8('0x3')](_0x36f8('0x49'),_0x35ba1c[_0x36f8('0x5')]),_0x35ba1c);queues[_0x35ba1c[_0x36f8('0x48')]][_0x36f8('0x45')]=!![];queues[_0x35ba1c[_0x36f8('0x48')]]['transfertype']=_0x36f8('0x4a');queues[_0x35ba1c[_0x36f8('0x48')]][_0x36f8('0x4b')]=_0x35ba1c[_0x36f8('0x4c')];queues[_0x35ba1c[_0x36f8('0x48')]]['transferuniqueid']=_0x35ba1c[_0x36f8('0x48')];queues[_0x35ba1c[_0x36f8('0x48')]][_0x36f8('0xb')]='BLINDTRANSFER';utils[_0x36f8('0x2')](util['format'](_0x36f8('0x4d'),_0x35ba1c['uniqueid'],queues[_0x35ba1c[_0x36f8('0x48')]][_0x36f8('0x21')],_0x35ba1c['transfereeuniqueid'],_0x35ba1c[_0x36f8('0x4c')]));}}catch(_0x2f3d35){utils['error'](util[_0x36f8('0x3')]('[%s][queues][blindtransfer]',_0x35ba1c[_0x36f8('0x5')]),_0x2f3d35);}};exports['attendedtransfer']=function(_0x265efa){try{utils['debug'](util['format']('[%s][queues][attendedtransfer]',_0x265efa[_0x36f8('0x4e')]),_0x265efa);if(_0x265efa[_0x36f8('0x4e')]==_0x265efa[_0x36f8('0x4f')]){if(!_[_0x36f8('0x25')](queues[_0x265efa['secondtransfererlinkedid']])){utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x50'),_0x265efa[_0x36f8('0x4e')],queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x21')],_0x265efa[_0x36f8('0x52')]));queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x45')]=!![];queues[_0x265efa['secondtransfererlinkedid']][_0x36f8('0x53')]=_0x36f8('0x54');queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x4b')]=_0x265efa['origtransfererexten'];queues[_0x265efa['secondtransfererlinkedid']]['transferuniqueid']=_0x265efa[_0x36f8('0x4e')];queues[_0x265efa[_0x36f8('0x51')]]['queuecallerexitreason']=_0x36f8('0x55');}if(!_[_0x36f8('0x25')](queues[_0x265efa[_0x36f8('0x4f')]])){if(_0x265efa['transfereelinkedid']&&queues[_0x265efa[_0x36f8('0x56')]]){queues[_0x265efa[_0x36f8('0x56')]]['queuecallerenterreason']=0x1;queues[_0x265efa[_0x36f8('0x48')]]=_[_0x36f8('0x57')](queues[_0x265efa[_0x36f8('0x56')]]);queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x11')]=_0x265efa[_0x36f8('0x58')];queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x22')]=0x2;queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x9')]=queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x9')];queues[_0x265efa['transfereeuniqueid']][_0x36f8('0x59')]=queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x59')];queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x5a')]=utils[_0x36f8('0x16')]();queues[_0x265efa['transfereeuniqueid']][_0x36f8('0x1a')]=utils[_0x36f8('0x16')]();queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x39')]=0x0;queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x5b')]=0x0;utils[_0x36f8('0x2')](util['format']('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x265efa[_0x36f8('0x4e')],queues[_0x265efa[_0x36f8('0x48')]]['name'],queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x9')],queues[_0x265efa[_0x36f8('0x48')]][_0x36f8('0x59')]));}else{utils['info'](util[_0x36f8('0x3')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x265efa[_0x36f8('0x4e')],queues[_0x265efa[_0x36f8('0x4f')]][_0x36f8('0x21')],_0x265efa[_0x36f8('0x51')]));queues[_0x265efa[_0x36f8('0x4f')]][_0x36f8('0x11')]=_0x265efa[_0x36f8('0x51')];}}}else if(_0x265efa['secondtransfereruniqueid']==_0x265efa[_0x36f8('0x51')]){if(!_[_0x36f8('0x25')](queues[_0x265efa[_0x36f8('0x4f')]])){utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x5c'),_0x265efa[_0x36f8('0x4e')],queues[_0x265efa['origtransfererlinkedid']]['name'],_0x265efa[_0x36f8('0x5d')],_0x265efa[_0x36f8('0x5e')]));queues[_0x265efa[_0x36f8('0x4f')]][_0x36f8('0x45')]=!![];queues[_0x265efa['origtransfererlinkedid']][_0x36f8('0x53')]=_0x36f8('0x54');queues[_0x265efa[_0x36f8('0x4f')]][_0x36f8('0x4b')]=_0x265efa[_0x36f8('0x5e')];queues[_0x265efa['origtransfererlinkedid']][_0x36f8('0x5f')]=_0x265efa[_0x36f8('0x5d')];queues[_0x265efa[_0x36f8('0x4f')]][_0x36f8('0xb')]=_0x36f8('0x55');}if(!_[_0x36f8('0x25')](queues[_0x265efa['secondtransfererlinkedid']])){if(_0x265efa['transfertargetlinkedid']&&queues[_0x265efa[_0x36f8('0x60')]]){queues[_0x265efa['transfertargetlinkedid']][_0x36f8('0x22')]=0x1;queues[_0x265efa[_0x36f8('0x58')]]=_[_0x36f8('0x57')](queues[_0x265efa['transfertargetlinkedid']]);queues[_0x265efa['transfertargetuniqueid']][_0x36f8('0x11')]=_0x265efa[_0x36f8('0x58')];queues[_0x265efa['transfertargetuniqueid']][_0x36f8('0x22')]=0x2;queues[_0x265efa[_0x36f8('0x58')]][_0x36f8('0x9')]=queues[_0x265efa[_0x36f8('0x4f')]]['calleridnum'];queues[_0x265efa[_0x36f8('0x58')]][_0x36f8('0x59')]=queues[_0x265efa[_0x36f8('0x4f')]][_0x36f8('0x59')];queues[_0x265efa['transfertargetuniqueid']]['queuecallerjoinAt']=utils[_0x36f8('0x16')]();queues[_0x265efa[_0x36f8('0x58')]][_0x36f8('0x1a')]=utils[_0x36f8('0x16')]();queues[_0x265efa[_0x36f8('0x58')]][_0x36f8('0x39')]=0x0;queues[_0x265efa['transfertargetuniqueid']]['mohtime']=0x0;utils[_0x36f8('0x2')](util[_0x36f8('0x3')](_0x36f8('0x61'),_0x265efa[_0x36f8('0x4e')],queues[_0x265efa['transfertargetuniqueid']][_0x36f8('0x21')],queues[_0x265efa['transfertargetuniqueid']]['transfereduniqueid'],queues[_0x265efa[_0x36f8('0x58')]][_0x36f8('0x9')],queues[_0x265efa[_0x36f8('0x58')]][_0x36f8('0x59')]));}else{utils['info'](util[_0x36f8('0x3')](_0x36f8('0x62'),_0x265efa[_0x36f8('0x4e')],queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x21')],_0x265efa[_0x36f8('0x4f')]));queues[_0x265efa[_0x36f8('0x51')]][_0x36f8('0x11')]=_0x265efa[_0x36f8('0x4f')];}}}}catch(_0x3091f7){utils[_0x36f8('0x2f')](util[_0x36f8('0x3')](_0x36f8('0x63'),_0x265efa[_0x36f8('0x4e')]),_0x3091f7);}};exports[_0x36f8('0x64')]=function(_0x42863d){try{if(!_['isNil'](queues[_0x42863d[_0x36f8('0x5')]])){utils[_0x36f8('0x13')](util[_0x36f8('0x3')](_0x36f8('0x65'),_0x42863d['uniqueid']),_0x42863d);queues[_0x42863d['uniqueid']][_0x36f8('0x66')]=utils[_0x36f8('0x16')]();utils[_0x36f8('0x2')](util['format'](_0x36f8('0x67'),_0x42863d[_0x36f8('0x5')],queues[_0x42863d[_0x36f8('0x5')]]['name'],queues[_0x42863d['uniqueid']][_0x36f8('0x66')]));}}catch(_0x3536a1){utils[_0x36f8('0x2f')](util[_0x36f8('0x3')](_0x36f8('0x65'),_0x42863d['uniqueid']),_0x3536a1);}};exports[_0x36f8('0x68')]=function(_0x4a86a6){try{if(!_[_0x36f8('0x25')](queues[_0x4a86a6[_0x36f8('0x5')]])){if(!_['isNil'](queues[_0x4a86a6[_0x36f8('0x5')]][_0x36f8('0x66')])){utils['debug'](util[_0x36f8('0x3')]('[%s][queues][musiconholdstop]',_0x4a86a6[_0x36f8('0x5')]),_0x4a86a6);queues[_0x4a86a6[_0x36f8('0x5')]][_0x36f8('0x5b')]+=utils[_0x36f8('0x3a')](utils[_0x36f8('0x16')](),queues[_0x4a86a6['uniqueid']][_0x36f8('0x66')]);utils['info'](util[_0x36f8('0x3')](_0x36f8('0x69'),_0x4a86a6[_0x36f8('0x5')],queues[_0x4a86a6['uniqueid']][_0x36f8('0x21')],queues[_0x4a86a6[_0x36f8('0x5')]]['mohtime']));delete queues[_0x4a86a6[_0x36f8('0x5')]][_0x36f8('0x66')];}}}catch(_0x2e9822){utils['error'](util['format']('[%s][queues][musiconholdstop]',_0x4a86a6[_0x36f8('0x5')]),_0x2e9822);}};
\ 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