Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / services / xdr / queues.controller.js
index 8182561..d0c03bb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2196=['debug','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','error','hangup','isNil','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','value','CONTINUE','queuecallerabandonAt','queuecallerexitAt','toUpperCase','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','name','variable','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][varset]','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','connectedlinename','holdtime','diffTime','count','agentconnect','[%s][queues][agentconnect]','membername','destaccountcode','assigned','agentcomplete','[%s][queues][agentcomplete]','transfer','TRANSFER','COMPLETEDBY','reason','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','transfertype','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','[%s][queues][blindtransfer]','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','origtransfererexten','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','clone','queuecallerjoinAt','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','calleridname','[%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]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','./utils','info','format','uniqueid','channel','queue','lastAssignedTo','calleridnum','accountcode','queuecallerexitreason','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin'];(function(_0x2cfb20,_0x131639){var _0x45716c=function(_0xdc213f){while(--_0xdc213f){_0x2cfb20['push'](_0x2cfb20['shift']());}};_0x45716c(++_0x131639);}(_0x2196,0xc1));var _0x6219=function(_0x2a50f7,_0x4c5ed1){_0x2a50f7=_0x2a50f7-0x0;var _0x5123ec=_0x2196[_0x2a50f7];return _0x5123ec;};'use strict';var _=require('lodash');var util=require(_0x6219('0x0'));var utils=require(_0x6219('0x1'));var queues={};function writeDB(_0x24d2a0){utils[_0x6219('0x2')](util[_0x6219('0x3')]('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x24d2a0[_0x6219('0x4')],_0x24d2a0[_0x6219('0x5')],_0x24d2a0[_0x6219('0x6')],_0x24d2a0[_0x6219('0x7')],_0x24d2a0[_0x6219('0x8')],_0x24d2a0[_0x6219('0x9')],_0x24d2a0[_0x6219('0xa')]));if(_0x24d2a0[_0x6219('0x6')]){utils['getVoiceQueueByName'](_0x24d2a0[_0x6219('0x6')])[_0x6219('0xb')](function(_0x5f555b){if(_0x5f555b){_0x24d2a0[_0x6219('0xc')]=_0x5f555b[_0x6219('0xc')];}utils[_0x6219('0xd')](_0x6219('0xe'),_0x24d2a0);});}else{utils[_0x6219('0xd')](_0x6219('0xe'),_0x24d2a0);}if(_0x24d2a0[_0x6219('0xf')]){delete queues[_0x24d2a0[_0x6219('0xf')]];}else{delete queues[_0x24d2a0[_0x6219('0x4')]];}}exports[_0x6219('0x10')]=function(_0x58b4a0){try{utils[_0x6219('0x11')](util[_0x6219('0x3')](_0x6219('0x12'),_0x58b4a0[_0x6219('0x4')]),_0x58b4a0);utils['info'](util[_0x6219('0x3')](_0x6219('0x13'),_0x58b4a0[_0x6219('0x4')],_0x58b4a0[_0x6219('0x6')],_0x58b4a0[_0x6219('0x14')]));queues[_0x58b4a0['uniqueid']]=_[_0x6219('0x15')](_0x58b4a0,{'originalposition':_0x58b4a0[_0x6219('0x14')],'queuecallerjoinAt':utils[_0x6219('0x16')](),'mohtime':0x0});}catch(_0x2f1db3){utils[_0x6219('0x17')](util[_0x6219('0x3')](_0x6219('0x12'),_0x58b4a0[_0x6219('0x4')]),_0x2f1db3);}};exports[_0x6219('0x18')]=function(_0x3bb072){try{if(!_[_0x6219('0x19')](queues[_0x3bb072[_0x6219('0x4')]])){utils[_0x6219('0x11')](util[_0x6219('0x3')](_0x6219('0x1a'),_0x3bb072[_0x6219('0x4')]),_0x3bb072);if(queues[_0x3bb072['uniqueid']][_0x6219('0x1b')]){if(!queues[_0x3bb072[_0x6219('0x4')]][_0x6219('0x1c')]&&!queues[_0x3bb072[_0x6219('0x4')]][_0x6219('0x1d')]){queues[_0x3bb072[_0x6219('0x4')]][_0x6219('0x1e')]=!![];queues[_0x3bb072[_0x6219('0x4')]][_0x6219('0x1f')]=utils[_0x6219('0x16')]();queues[_0x3bb072[_0x6219('0x4')]]['queuecallerexitreason']=_0x6219('0x20');}utils[_0x6219('0x2')](util[_0x6219('0x3')]('[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s',_0x3bb072[_0x6219('0x4')],queues[_0x3bb072['uniqueid']]['name'],queues[_0x3bb072[_0x6219('0x4')]][_0x6219('0xa')]));writeDB(queues[_0x3bb072[_0x6219('0x4')]]);}else if(queues[_0x3bb072['uniqueid']]['transfereduniqueid']){utils[_0x6219('0x2')](util['format'](_0x6219('0x21'),_0x3bb072[_0x6219('0x4')],queues[_0x3bb072[_0x6219('0x4')]]['name'],queues[_0x3bb072['uniqueid']][_0x6219('0xf')]));queues[queues[_0x3bb072[_0x6219('0x4')]][_0x6219('0xf')]]=queues[_0x3bb072[_0x6219('0x4')]];queues[queues[_0x3bb072['uniqueid']][_0x6219('0xf')]][_0x6219('0x22')]=0x2;delete queues[_0x3bb072[_0x6219('0x4')]];}}}catch(_0x2103a0){utils[_0x6219('0x17')](util[_0x6219('0x3')](_0x6219('0x1a'),_0x3bb072[_0x6219('0x4')]),_0x2103a0);}};exports[_0x6219('0x23')]=function(_0x35e2ca){try{utils[_0x6219('0x11')](util[_0x6219('0x3')]('[%s][queues][varset]',_0x35e2ca['uniqueid']),_0x35e2ca);if(!_[_0x6219('0x19')](_0x35e2ca['variable']['queuestatus'])&&_0x35e2ca[_0x6219('0x24')]['toUpperCase']()!==_0x6219('0x25')){if(!_[_0x6219('0x19')](queues[_0x35e2ca[_0x6219('0x4')]])){queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0x1c')]=![];queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0x26')]=null;queues[_0x35e2ca['uniqueid']][_0x6219('0x1d')]=!![];queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0x27')]=utils[_0x6219('0x16')]();queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0xa')]=_0x35e2ca[_0x6219('0x24')][_0x6219('0x28')]();utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x29'),_0x35e2ca['uniqueid'],queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0x2a')],_0x35e2ca[_0x6219('0x24')],queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0xa')]));writeDB(queues[_0x35e2ca[_0x6219('0x4')]]);}}else if(!_[_0x6219('0x19')](_0x35e2ca[_0x6219('0x2b')]['queueposition'])){if(!_[_0x6219('0x19')](queues[_0x35e2ca[_0x6219('0x4')]])&&!queues[_0x35e2ca['uniqueid']][_0x6219('0x1c')]){queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0x1c')]=![];queues[_0x35e2ca['uniqueid']][_0x6219('0x26')]=null;queues[_0x35e2ca['uniqueid']]['queuecallerexit']=!![];queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0x27')]=utils[_0x6219('0x16')]();queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0xa')]=_0x6219('0x2c');utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x2d'),_0x35e2ca[_0x6219('0x4')],queues[_0x35e2ca['uniqueid']][_0x6219('0x2a')],_0x35e2ca['value'],queues[_0x35e2ca[_0x6219('0x4')]][_0x6219('0xa')]));}}}catch(_0x57745b){utils[_0x6219('0x17')](util[_0x6219('0x3')](_0x6219('0x2e'),_0x35e2ca['uniqueid']),_0x57745b);}};exports[_0x6219('0x1c')]=function(_0x4327f6){try{if(!_['isNil'](queues[_0x4327f6[_0x6219('0x4')]])){utils[_0x6219('0x11')](util[_0x6219('0x3')](_0x6219('0x2f'),_0x4327f6[_0x6219('0x4')]),_0x4327f6);queues[_0x4327f6[_0x6219('0x4')]][_0x6219('0x1d')]=![];queues[_0x4327f6['uniqueid']][_0x6219('0x27')]=null;queues[_0x4327f6[_0x6219('0x4')]][_0x6219('0x1c')]=!![];queues[_0x4327f6[_0x6219('0x4')]][_0x6219('0x26')]=utils[_0x6219('0x16')]();queues[_0x4327f6[_0x6219('0x4')]][_0x6219('0xa')]=_0x6219('0x30');utils[_0x6219('0x2')](util['format'](_0x6219('0x31'),_0x4327f6[_0x6219('0x4')],queues[_0x4327f6[_0x6219('0x4')]]['name'],queues[_0x4327f6[_0x6219('0x4')]][_0x6219('0xa')]));}}catch(_0x1d59d7){utils[_0x6219('0x17')](util[_0x6219('0x3')]('[%s][queues][queuecallerabandon]',_0x4327f6[_0x6219('0x4')]),_0x1d59d7);}};exports[_0x6219('0x32')]=function(_0x2678ab){try{if(!_[_0x6219('0x19')](queues[_0x2678ab['uniqueid']])){utils['debug'](util[_0x6219('0x3')](_0x6219('0x33'),_0x2678ab[_0x6219('0x4')]),_0x2678ab);utils[_0x6219('0x2')](util['format']('[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x2678ab[_0x6219('0x4')],queues[_0x2678ab[_0x6219('0x4')]][_0x6219('0x2a')],_0x2678ab['connectedlinenum'],_0x2678ab[_0x6219('0x34')]));queues[_0x2678ab[_0x6219('0x4')]][_0x6219('0x32')]=!![];queues[_0x2678ab[_0x6219('0x4')]]['queuecallerleaveAt']=utils['now']();queues[_0x2678ab[_0x6219('0x4')]][_0x6219('0x35')]=utils[_0x6219('0x36')](queues[_0x2678ab[_0x6219('0x4')]][_0x6219('0x1b')],queues[_0x2678ab[_0x6219('0x4')]]['queuecallerjoinAt']);queues[_0x2678ab[_0x6219('0x4')]][_0x6219('0x14')]=_0x2678ab['position'];queues[_0x2678ab['uniqueid']][_0x6219('0x37')]=_0x2678ab['count'];queues[_0x2678ab['uniqueid']]['connectedlinenum']=_0x2678ab['connectedlinenum'];queues[_0x2678ab[_0x6219('0x4')]]['connectedlinename']=_0x2678ab[_0x6219('0x34')];}}catch(_0x3f7833){utils['error'](util[_0x6219('0x3')](_0x6219('0x33'),_0x2678ab[_0x6219('0x4')]),_0x3f7833);}};exports[_0x6219('0x38')]=function(_0xd9512b){try{if(!_[_0x6219('0x19')](queues[_0xd9512b[_0x6219('0x4')]])){utils[_0x6219('0x11')](util[_0x6219('0x3')](_0x6219('0x39'),_0xd9512b[_0x6219('0x4')]),_0xd9512b);utils['info'](util[_0x6219('0x3')]('[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s',_0xd9512b['uniqueid'],queues[_0xd9512b[_0x6219('0x4')]]['name'],_0xd9512b[_0x6219('0x3a')],_0xd9512b[_0x6219('0x3b')]));queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x1c')]=![];queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x1c')]=![];queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x26')]=null;queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x1d')]=![];queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0xa')]=null;queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x27')]=null;queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x3c')]=!![];queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x9')]=_0xd9512b['destaccountcode'];queues[_0xd9512b[_0x6219('0x4')]][_0x6219('0x7')]=_0xd9512b[_0x6219('0x3a')];}}catch(_0x1a9624){utils[_0x6219('0x17')](util[_0x6219('0x3')](_0x6219('0x39'),_0xd9512b['uniqueid']),_0x1a9624);}};exports[_0x6219('0x3d')]=function(_0x1510a9){try{if(!_['isNil'](queues[_0x1510a9['uniqueid']])){if(queues[_0x1510a9[_0x6219('0x4')]]['queuecallerleaveAt']){utils['debug'](util[_0x6219('0x3')](_0x6219('0x3e'),_0x1510a9['uniqueid']),_0x1510a9);queues[_0x1510a9[_0x6219('0x4')]][_0x6219('0x1c')]=![];queues[_0x1510a9[_0x6219('0x4')]][_0x6219('0x1c')]=![];queues[_0x1510a9[_0x6219('0x4')]][_0x6219('0x26')]=null;queues[_0x1510a9['uniqueid']][_0x6219('0x1d')]=![];queues[_0x1510a9[_0x6219('0x4')]][_0x6219('0x27')]=null;queues[_0x1510a9['uniqueid']]['assigned']=!![];queues[_0x1510a9['uniqueid']][_0x6219('0x7')]=_0x1510a9[_0x6219('0x3a')];queues[_0x1510a9['uniqueid']]['queuecallercomplete']=!![];queues[_0x1510a9[_0x6219('0x4')]][_0x6219('0x1f')]=utils[_0x6219('0x16')]();if(_0x1510a9['reason']==_0x6219('0x3f')){if(!queues[_0x1510a9['uniqueid']][_0x6219('0x3f')]){queues[_0x1510a9['uniqueid']]['queuecallerexitreason']=_0x6219('0x40');}}else{queues[_0x1510a9['uniqueid']]['queuecallerexitreason']=_0x6219('0x41')+_0x1510a9[_0x6219('0x42')]['toUpperCase']();}utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x43'),_0x1510a9[_0x6219('0x4')],queues[_0x1510a9[_0x6219('0x4')]][_0x6219('0x2a')],_0x1510a9['membername'],queues[_0x1510a9['uniqueid']][_0x6219('0xa')]));writeDB(queues[_0x1510a9[_0x6219('0x4')]]);}}}catch(_0x545107){utils['error'](util[_0x6219('0x3')]('[%s][queues][agentcomplete]',_0x1510a9[_0x6219('0x4')]),_0x545107);}};exports[_0x6219('0x44')]=function(_0x4ba535){try{if(!_[_0x6219('0x19')](queues[_0x4ba535[_0x6219('0x45')]])){utils['debug'](util['format']('[%s][queues][blindtransfer]',_0x4ba535[_0x6219('0x4')]),_0x4ba535);queues[_0x4ba535['transfereeuniqueid']][_0x6219('0x3f')]=!![];queues[_0x4ba535[_0x6219('0x45')]][_0x6219('0x46')]=_0x6219('0x47');queues[_0x4ba535[_0x6219('0x45')]][_0x6219('0x48')]=_0x4ba535[_0x6219('0x49')];queues[_0x4ba535['transfereeuniqueid']][_0x6219('0x4a')]=_0x4ba535['transfereeuniqueid'];queues[_0x4ba535['transfereeuniqueid']][_0x6219('0xa')]=_0x6219('0x4b');utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x4c'),_0x4ba535['uniqueid'],queues[_0x4ba535[_0x6219('0x45')]][_0x6219('0x2a')],_0x4ba535['transfereeuniqueid'],_0x4ba535[_0x6219('0x49')]));}}catch(_0x227ab5){utils['error'](util[_0x6219('0x3')](_0x6219('0x4d'),_0x4ba535[_0x6219('0x4')]),_0x227ab5);}};exports[_0x6219('0x4e')]=function(_0x898cb2){try{utils[_0x6219('0x11')](util['format'](_0x6219('0x4f'),_0x898cb2['origtransfereruniqueid']),_0x898cb2);if(_0x898cb2[_0x6219('0x50')]==_0x898cb2[_0x6219('0x51')]){if(!_[_0x6219('0x19')](queues[_0x898cb2['secondtransfererlinkedid']])){utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x52'),_0x898cb2[_0x6219('0x50')],queues[_0x898cb2[_0x6219('0x53')]][_0x6219('0x2a')],_0x898cb2[_0x6219('0x54')]));queues[_0x898cb2[_0x6219('0x53')]][_0x6219('0x3f')]=!![];queues[_0x898cb2[_0x6219('0x53')]][_0x6219('0x46')]=_0x6219('0x55');queues[_0x898cb2['secondtransfererlinkedid']][_0x6219('0x48')]=_0x898cb2['origtransfererexten'];queues[_0x898cb2[_0x6219('0x53')]]['transferuniqueid']=_0x898cb2[_0x6219('0x50')];queues[_0x898cb2[_0x6219('0x53')]]['queuecallerexitreason']=_0x6219('0x56');}if(!_[_0x6219('0x19')](queues[_0x898cb2[_0x6219('0x51')]])){if(_0x898cb2['transfereelinkedid']&&queues[_0x898cb2[_0x6219('0x57')]]){queues[_0x898cb2[_0x6219('0x57')]][_0x6219('0x22')]=0x1;queues[_0x898cb2['transfereeuniqueid']]=_[_0x6219('0x58')](queues[_0x898cb2[_0x6219('0x57')]]);queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0xf')]=_0x898cb2['transfertargetuniqueid'];queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x22')]=0x2;queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x8')]=queues[_0x898cb2[_0x6219('0x53')]]['calleridnum'];queues[_0x898cb2[_0x6219('0x45')]]['calleridname']=queues[_0x898cb2[_0x6219('0x53')]]['calleridname'];queues[_0x898cb2['transfereeuniqueid']][_0x6219('0x59')]=utils[_0x6219('0x16')]();queues[_0x898cb2[_0x6219('0x45')]]['queuecallerleaveAt']=utils[_0x6219('0x16')]();queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x35')]=0x0;queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x5a')]=0x0;utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x5b'),_0x898cb2[_0x6219('0x50')],queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x2a')],queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x8')],queues[_0x898cb2[_0x6219('0x45')]][_0x6219('0x5c')]));}else{utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x5d'),_0x898cb2['origtransfereruniqueid'],queues[_0x898cb2[_0x6219('0x51')]][_0x6219('0x2a')],_0x898cb2[_0x6219('0x53')]));queues[_0x898cb2[_0x6219('0x51')]]['transfereduniqueid']=_0x898cb2[_0x6219('0x53')];}}}else if(_0x898cb2[_0x6219('0x5e')]==_0x898cb2['secondtransfererlinkedid']){if(!_[_0x6219('0x19')](queues[_0x898cb2[_0x6219('0x51')]])){utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x5f'),_0x898cb2[_0x6219('0x50')],queues[_0x898cb2[_0x6219('0x51')]][_0x6219('0x2a')],_0x898cb2[_0x6219('0x5e')],_0x898cb2[_0x6219('0x60')]));queues[_0x898cb2['origtransfererlinkedid']][_0x6219('0x3f')]=!![];queues[_0x898cb2[_0x6219('0x51')]]['transfertype']='ATTENDED';queues[_0x898cb2[_0x6219('0x51')]][_0x6219('0x48')]=_0x898cb2[_0x6219('0x60')];queues[_0x898cb2[_0x6219('0x51')]]['transferuniqueid']=_0x898cb2['secondtransfereruniqueid'];queues[_0x898cb2['origtransfererlinkedid']][_0x6219('0xa')]=_0x6219('0x56');}if(!_[_0x6219('0x19')](queues[_0x898cb2[_0x6219('0x53')]])){if(_0x898cb2[_0x6219('0x61')]&&queues[_0x898cb2[_0x6219('0x61')]]){queues[_0x898cb2['transfertargetlinkedid']]['queuecallerenterreason']=0x1;queues[_0x898cb2[_0x6219('0x62')]]=_[_0x6219('0x58')](queues[_0x898cb2['transfertargetlinkedid']]);queues[_0x898cb2['transfertargetuniqueid']][_0x6219('0xf')]=_0x898cb2[_0x6219('0x62')];queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0x22')]=0x2;queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0x8')]=queues[_0x898cb2[_0x6219('0x51')]][_0x6219('0x8')];queues[_0x898cb2['transfertargetuniqueid']][_0x6219('0x5c')]=queues[_0x898cb2[_0x6219('0x51')]]['calleridname'];queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0x59')]=utils[_0x6219('0x16')]();queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0x1b')]=utils[_0x6219('0x16')]();queues[_0x898cb2['transfertargetuniqueid']][_0x6219('0x35')]=0x0;queues[_0x898cb2[_0x6219('0x62')]]['mohtime']=0x0;utils['info'](util[_0x6219('0x3')](_0x6219('0x63'),_0x898cb2[_0x6219('0x50')],queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0x2a')],queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0xf')],queues[_0x898cb2['transfertargetuniqueid']][_0x6219('0x8')],queues[_0x898cb2[_0x6219('0x62')]][_0x6219('0x5c')]));}else{utils[_0x6219('0x2')](util['format'](_0x6219('0x5d'),_0x898cb2[_0x6219('0x50')],queues[_0x898cb2[_0x6219('0x53')]][_0x6219('0x2a')],_0x898cb2[_0x6219('0x51')]));queues[_0x898cb2['secondtransfererlinkedid']][_0x6219('0xf')]=_0x898cb2[_0x6219('0x51')];}}}}catch(_0x3ab930){utils[_0x6219('0x17')](util['format']('[%s][queues][attendedtransfer]',_0x898cb2[_0x6219('0x50')]),_0x3ab930);}};exports[_0x6219('0x64')]=function(_0x3b1c90){try{if(!_['isNil'](queues[_0x3b1c90[_0x6219('0x4')]])){utils[_0x6219('0x11')](util['format'](_0x6219('0x65'),_0x3b1c90[_0x6219('0x4')]),_0x3b1c90);queues[_0x3b1c90[_0x6219('0x4')]][_0x6219('0x66')]=utils[_0x6219('0x16')]();utils[_0x6219('0x2')](util[_0x6219('0x3')]('[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s',_0x3b1c90[_0x6219('0x4')],queues[_0x3b1c90['uniqueid']][_0x6219('0x2a')],queues[_0x3b1c90[_0x6219('0x4')]][_0x6219('0x66')]));}}catch(_0x4ef3c5){utils[_0x6219('0x17')](util[_0x6219('0x3')]('[%s][queues][musiconholdstart]',_0x3b1c90[_0x6219('0x4')]),_0x4ef3c5);}};exports['musiconholdstop']=function(_0x462ded){try{if(!_[_0x6219('0x19')](queues[_0x462ded['uniqueid']])){if(!_[_0x6219('0x19')](queues[_0x462ded[_0x6219('0x4')]][_0x6219('0x66')])){utils[_0x6219('0x11')](util[_0x6219('0x3')](_0x6219('0x67'),_0x462ded['uniqueid']),_0x462ded);queues[_0x462ded[_0x6219('0x4')]][_0x6219('0x5a')]+=utils[_0x6219('0x36')](utils[_0x6219('0x16')](),queues[_0x462ded[_0x6219('0x4')]][_0x6219('0x66')]);utils[_0x6219('0x2')](util[_0x6219('0x3')](_0x6219('0x68'),_0x462ded[_0x6219('0x4')],queues[_0x462ded[_0x6219('0x4')]][_0x6219('0x2a')],queues[_0x462ded['uniqueid']][_0x6219('0x5a')]));delete queues[_0x462ded[_0x6219('0x4')]][_0x6219('0x66')];}}}catch(_0x2d8279){utils['error'](util['format'](_0x6219('0x67'),_0x462ded['uniqueid']),_0x2d8279);}};
\ No newline at end of file
+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