Built motion from commit e02f907f.|2.6.14
[motion2.git] / server / services / xdr / queues.controller.js
index 0843f32..44331e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c1b=['extension','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','origtransfererexten','transfertype','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridname','[%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','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','mohtime','diffTime','[%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','queue','lastAssignedTo','calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','error','hangup','[%s][queues][hangup]','queuecallerleaveAt','queuecallerexit','queuecallercompleteAt','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','[%s][queues][varset]','isNil','variable','queuestatus','toUpperCase','CONTINUE','queuecallerabandon','queuecallerexitAt','value','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queuecallerabandonAt','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','holdtime','queuecallerjoinAt','count','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','destaccountcode','assigned','membername','agentcomplete','queuecallercomplete','reason','transfer','TRANSFER','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','BLIND','transferexten','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x0c1b,0x162));var _0xb0c1=function(_0x163742,_0x467e36){_0x163742=_0x163742-0x0;var _0x1152ac=_0x0c1b[_0x163742];return _0x1152ac;};'use strict';var _=require(_0xb0c1('0x0'));var util=require(_0xb0c1('0x1'));var utils=require(_0xb0c1('0x2'));var queues={};function writeDB(_0x39afa5){utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x5'),_0x39afa5[_0xb0c1('0x6')],_0x39afa5['channel'],_0x39afa5[_0xb0c1('0x7')],_0x39afa5[_0xb0c1('0x8')],_0x39afa5[_0xb0c1('0x9')],_0x39afa5[_0xb0c1('0xa')],_0x39afa5[_0xb0c1('0xb')]));if(_0x39afa5[_0xb0c1('0x7')]){utils[_0xb0c1('0xc')](_0x39afa5[_0xb0c1('0x7')])[_0xb0c1('0xd')](function(_0x50af09){if(_0x50af09){_0x39afa5[_0xb0c1('0xe')]=_0x50af09[_0xb0c1('0xe')];}utils[_0xb0c1('0xf')](_0xb0c1('0x10'),_0x39afa5);});}else{utils['request'](_0xb0c1('0x10'),_0x39afa5);}if(_0x39afa5['transfereduniqueid']){delete queues[_0x39afa5[_0xb0c1('0x11')]];}else{delete queues[_0x39afa5[_0xb0c1('0x6')]];}}exports[_0xb0c1('0x12')]=function(_0x3e305b){try{utils[_0xb0c1('0x13')](util['format'](_0xb0c1('0x14'),_0x3e305b['uniqueid']),_0x3e305b);utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x15'),_0x3e305b[_0xb0c1('0x6')],_0x3e305b[_0xb0c1('0x7')],_0x3e305b[_0xb0c1('0x16')]));queues[_0x3e305b[_0xb0c1('0x6')]]=_[_0xb0c1('0x17')](_0x3e305b,{'originalposition':_0x3e305b[_0xb0c1('0x16')],'queuecallerjoinAt':utils[_0xb0c1('0x18')](),'mohtime':0x0});}catch(_0x77d021){utils[_0xb0c1('0x19')](util['format'](_0xb0c1('0x14'),_0x3e305b['uniqueid']),_0x77d021);}};exports[_0xb0c1('0x1a')]=function(_0x2677da){try{if(!_['isNil'](queues[_0x2677da[_0xb0c1('0x6')]])){utils[_0xb0c1('0x13')](util[_0xb0c1('0x4')](_0xb0c1('0x1b'),_0x2677da[_0xb0c1('0x6')]),_0x2677da);if(queues[_0x2677da[_0xb0c1('0x6')]][_0xb0c1('0x1c')]){if(!queues[_0x2677da[_0xb0c1('0x6')]]['queuecallerabandon']&&!queues[_0x2677da[_0xb0c1('0x6')]][_0xb0c1('0x1d')]){queues[_0x2677da[_0xb0c1('0x6')]]['queuecallercomplete']=!![];queues[_0x2677da['uniqueid']][_0xb0c1('0x1e')]=utils[_0xb0c1('0x18')]();queues[_0x2677da[_0xb0c1('0x6')]]['queuecallerexitreason']='COMPLETEDBYAGENT';}utils[_0xb0c1('0x3')](util['format'](_0xb0c1('0x1f'),_0x2677da[_0xb0c1('0x6')],queues[_0x2677da['uniqueid']][_0xb0c1('0x20')],queues[_0x2677da['uniqueid']][_0xb0c1('0xb')]));writeDB(queues[_0x2677da['uniqueid']]);}else if(queues[_0x2677da['uniqueid']]['transfereduniqueid']){utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x21'),_0x2677da[_0xb0c1('0x6')],queues[_0x2677da[_0xb0c1('0x6')]]['name'],queues[_0x2677da['uniqueid']]['transfereduniqueid']));queues[queues[_0x2677da[_0xb0c1('0x6')]][_0xb0c1('0x11')]]=queues[_0x2677da['uniqueid']];queues[queues[_0x2677da[_0xb0c1('0x6')]][_0xb0c1('0x11')]][_0xb0c1('0x22')]=0x2;delete queues[_0x2677da[_0xb0c1('0x6')]];}}}catch(_0x5ec25c){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')](_0xb0c1('0x1b'),_0x2677da['uniqueid']),_0x5ec25c);}};exports[_0xb0c1('0x23')]=function(_0x3617e6){try{utils[_0xb0c1('0x13')](util['format'](_0xb0c1('0x24'),_0x3617e6['uniqueid']),_0x3617e6);if(!_[_0xb0c1('0x25')](_0x3617e6[_0xb0c1('0x26')][_0xb0c1('0x27')])&&_0x3617e6['value'][_0xb0c1('0x28')]()!==_0xb0c1('0x29')){if(!_[_0xb0c1('0x25')](queues[_0x3617e6[_0xb0c1('0x6')]])){queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x2a')]=![];queues[_0x3617e6[_0xb0c1('0x6')]]['queuecallerabandonAt']=null;queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x1d')]=!![];queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x2b')]=utils[_0xb0c1('0x18')]();queues[_0x3617e6['uniqueid']][_0xb0c1('0xb')]=_0x3617e6[_0xb0c1('0x2c')][_0xb0c1('0x28')]();utils['info'](util[_0xb0c1('0x4')](_0xb0c1('0x2d'),_0x3617e6[_0xb0c1('0x6')],queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x20')],_0x3617e6[_0xb0c1('0x2c')],queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0xb')]));writeDB(queues[_0x3617e6[_0xb0c1('0x6')]]);}}else if(!_[_0xb0c1('0x25')](_0x3617e6[_0xb0c1('0x26')]['queueposition'])){if(!_[_0xb0c1('0x25')](queues[_0x3617e6[_0xb0c1('0x6')]])&&!queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x2a')]){queues[_0x3617e6[_0xb0c1('0x6')]]['queuecallerabandon']=![];queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x2e')]=null;queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x1d')]=!![];queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x2b')]=utils[_0xb0c1('0x18')]();queues[_0x3617e6['uniqueid']]['queuecallerexitreason']=_0xb0c1('0x2f');utils['info'](util[_0xb0c1('0x4')](_0xb0c1('0x30'),_0x3617e6[_0xb0c1('0x6')],queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0x20')],_0x3617e6[_0xb0c1('0x2c')],queues[_0x3617e6[_0xb0c1('0x6')]][_0xb0c1('0xb')]));}}}catch(_0x1693d7){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')](_0xb0c1('0x24'),_0x3617e6[_0xb0c1('0x6')]),_0x1693d7);}};exports[_0xb0c1('0x2a')]=function(_0x1c46fe){try{if(!_['isNil'](queues[_0x1c46fe[_0xb0c1('0x6')]])){utils[_0xb0c1('0x13')](util['format'](_0xb0c1('0x31'),_0x1c46fe['uniqueid']),_0x1c46fe);queues[_0x1c46fe['uniqueid']][_0xb0c1('0x1d')]=![];queues[_0x1c46fe[_0xb0c1('0x6')]][_0xb0c1('0x2b')]=null;queues[_0x1c46fe['uniqueid']][_0xb0c1('0x2a')]=!![];queues[_0x1c46fe[_0xb0c1('0x6')]][_0xb0c1('0x2e')]=utils['now']();queues[_0x1c46fe[_0xb0c1('0x6')]][_0xb0c1('0xb')]=_0xb0c1('0x32');utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x33'),_0x1c46fe[_0xb0c1('0x6')],queues[_0x1c46fe[_0xb0c1('0x6')]][_0xb0c1('0x20')],queues[_0x1c46fe['uniqueid']]['queuecallerexitreason']));}}catch(_0x535ef0){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')](_0xb0c1('0x31'),_0x1c46fe[_0xb0c1('0x6')]),_0x535ef0);}};exports[_0xb0c1('0x34')]=function(_0x157187){try{if(!_[_0xb0c1('0x25')](queues[_0x157187[_0xb0c1('0x6')]])){utils[_0xb0c1('0x13')](util[_0xb0c1('0x4')](_0xb0c1('0x35'),_0x157187['uniqueid']),_0x157187);utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x36'),_0x157187['uniqueid'],queues[_0x157187['uniqueid']][_0xb0c1('0x20')],_0x157187[_0xb0c1('0x37')],_0x157187[_0xb0c1('0x38')]));queues[_0x157187[_0xb0c1('0x6')]]['queuecallerleave']=!![];queues[_0x157187[_0xb0c1('0x6')]]['queuecallerleaveAt']=utils[_0xb0c1('0x18')]();queues[_0x157187[_0xb0c1('0x6')]][_0xb0c1('0x39')]=utils['diffTime'](queues[_0x157187['uniqueid']][_0xb0c1('0x1c')],queues[_0x157187[_0xb0c1('0x6')]][_0xb0c1('0x3a')]);queues[_0x157187[_0xb0c1('0x6')]][_0xb0c1('0x16')]=_0x157187[_0xb0c1('0x16')];queues[_0x157187[_0xb0c1('0x6')]][_0xb0c1('0x3b')]=_0x157187[_0xb0c1('0x3b')];queues[_0x157187['uniqueid']][_0xb0c1('0x37')]=_0x157187[_0xb0c1('0x37')];queues[_0x157187[_0xb0c1('0x6')]][_0xb0c1('0x38')]=_0x157187[_0xb0c1('0x38')];}}catch(_0x1948c6){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')]('[%s][queues][queuecallerleave]',_0x157187[_0xb0c1('0x6')]),_0x1948c6);}};exports['agentconnect']=function(_0x480812){try{if(!_['isNil'](queues[_0x480812[_0xb0c1('0x6')]])){utils[_0xb0c1('0x13')](util['format'](_0xb0c1('0x3c'),_0x480812[_0xb0c1('0x6')]),_0x480812);utils['info'](util[_0xb0c1('0x4')](_0xb0c1('0x3d'),_0x480812[_0xb0c1('0x6')],queues[_0x480812[_0xb0c1('0x6')]][_0xb0c1('0x20')],_0x480812['membername'],_0x480812[_0xb0c1('0x3e')]));queues[_0x480812[_0xb0c1('0x6')]]['queuecallerabandon']=![];queues[_0x480812[_0xb0c1('0x6')]][_0xb0c1('0x2a')]=![];queues[_0x480812[_0xb0c1('0x6')]][_0xb0c1('0x2e')]=null;queues[_0x480812[_0xb0c1('0x6')]]['queuecallerexit']=![];queues[_0x480812['uniqueid']][_0xb0c1('0xb')]=null;queues[_0x480812['uniqueid']]['queuecallerexitAt']=null;queues[_0x480812[_0xb0c1('0x6')]][_0xb0c1('0x3f')]=!![];queues[_0x480812[_0xb0c1('0x6')]]['accountcode']=_0x480812[_0xb0c1('0x3e')];queues[_0x480812['uniqueid']][_0xb0c1('0x8')]=_0x480812[_0xb0c1('0x40')];}}catch(_0x421691){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')](_0xb0c1('0x3c'),_0x480812[_0xb0c1('0x6')]),_0x421691);}};exports[_0xb0c1('0x41')]=function(_0x580c6e){try{if(!_[_0xb0c1('0x25')](queues[_0x580c6e['uniqueid']])){if(queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x1c')]){utils[_0xb0c1('0x13')](util['format']('[%s][queues][agentcomplete]',_0x580c6e['uniqueid']),_0x580c6e);queues[_0x580c6e['uniqueid']][_0xb0c1('0x2a')]=![];queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x2a')]=![];queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x2e')]=null;queues[_0x580c6e['uniqueid']][_0xb0c1('0x1d')]=![];queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x2b')]=null;queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x3f')]=!![];queues[_0x580c6e['uniqueid']]['lastAssignedTo']=_0x580c6e[_0xb0c1('0x40')];queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x42')]=!![];queues[_0x580c6e['uniqueid']][_0xb0c1('0x1e')]=utils['now']();if(_0x580c6e[_0xb0c1('0x43')]==_0xb0c1('0x44')){if(!queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0x44')]){queues[_0x580c6e['uniqueid']][_0xb0c1('0xb')]=_0xb0c1('0x45');}}else{queues[_0x580c6e[_0xb0c1('0x6')]][_0xb0c1('0xb')]='COMPLETEDBY'+_0x580c6e['reason'][_0xb0c1('0x28')]();}utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x46'),_0x580c6e[_0xb0c1('0x6')],queues[_0x580c6e['uniqueid']]['name'],_0x580c6e[_0xb0c1('0x40')],queues[_0x580c6e['uniqueid']][_0xb0c1('0xb')]));writeDB(queues[_0x580c6e[_0xb0c1('0x6')]]);}}}catch(_0x240204){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')]('[%s][queues][agentcomplete]',_0x580c6e['uniqueid']),_0x240204);}};exports[_0xb0c1('0x47')]=function(_0x31ec7b){try{if(!_[_0xb0c1('0x25')](queues[_0x31ec7b[_0xb0c1('0x48')]])){utils[_0xb0c1('0x13')](util[_0xb0c1('0x4')]('[%s][queues][blindtransfer]',_0x31ec7b['uniqueid']),_0x31ec7b);queues[_0x31ec7b[_0xb0c1('0x48')]][_0xb0c1('0x44')]=!![];queues[_0x31ec7b[_0xb0c1('0x48')]]['transfertype']=_0xb0c1('0x49');queues[_0x31ec7b['transfereeuniqueid']][_0xb0c1('0x4a')]=_0x31ec7b['extension'];queues[_0x31ec7b[_0xb0c1('0x48')]][_0xb0c1('0x4b')]=_0x31ec7b[_0xb0c1('0x48')];queues[_0x31ec7b[_0xb0c1('0x48')]][_0xb0c1('0xb')]=_0xb0c1('0x4c');utils['info'](util['format'](_0xb0c1('0x4d'),_0x31ec7b['uniqueid'],queues[_0x31ec7b['transfereeuniqueid']][_0xb0c1('0x20')],_0x31ec7b['transfereeuniqueid'],_0x31ec7b[_0xb0c1('0x4e')]));}}catch(_0x44f61f){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')]('[%s][queues][blindtransfer]',_0x31ec7b[_0xb0c1('0x6')]),_0x44f61f);}};exports[_0xb0c1('0x4f')]=function(_0x4a5084){try{utils[_0xb0c1('0x13')](util[_0xb0c1('0x4')](_0xb0c1('0x50'),_0x4a5084[_0xb0c1('0x51')]),_0x4a5084);if(_0x4a5084[_0xb0c1('0x51')]==_0x4a5084[_0xb0c1('0x52')]){if(!_[_0xb0c1('0x25')](queues[_0x4a5084['secondtransfererlinkedid']])){utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x53'),_0x4a5084[_0xb0c1('0x51')],queues[_0x4a5084[_0xb0c1('0x54')]]['name'],_0x4a5084[_0xb0c1('0x55')]));queues[_0x4a5084['secondtransfererlinkedid']][_0xb0c1('0x44')]=!![];queues[_0x4a5084[_0xb0c1('0x54')]][_0xb0c1('0x56')]=_0xb0c1('0x57');queues[_0x4a5084[_0xb0c1('0x54')]][_0xb0c1('0x4a')]=_0x4a5084[_0xb0c1('0x55')];queues[_0x4a5084[_0xb0c1('0x54')]][_0xb0c1('0x4b')]=_0x4a5084['origtransfereruniqueid'];queues[_0x4a5084[_0xb0c1('0x54')]]['queuecallerexitreason']=_0xb0c1('0x58');}if(!_['isNil'](queues[_0x4a5084[_0xb0c1('0x52')]])){if(_0x4a5084[_0xb0c1('0x59')]&&queues[_0x4a5084[_0xb0c1('0x59')]]){queues[_0x4a5084[_0xb0c1('0x59')]][_0xb0c1('0x22')]=0x1;queues[_0x4a5084[_0xb0c1('0x48')]]=_[_0xb0c1('0x5a')](queues[_0x4a5084['transfereelinkedid']]);queues[_0x4a5084[_0xb0c1('0x48')]][_0xb0c1('0x11')]=_0x4a5084[_0xb0c1('0x5b')];queues[_0x4a5084[_0xb0c1('0x48')]][_0xb0c1('0x22')]=0x2;queues[_0x4a5084[_0xb0c1('0x48')]][_0xb0c1('0x9')]=queues[_0x4a5084['secondtransfererlinkedid']][_0xb0c1('0x9')];queues[_0x4a5084[_0xb0c1('0x48')]][_0xb0c1('0x5c')]=queues[_0x4a5084[_0xb0c1('0x54')]]['calleridname'];queues[_0x4a5084[_0xb0c1('0x48')]][_0xb0c1('0x3a')]=utils['now']();queues[_0x4a5084['transfereeuniqueid']][_0xb0c1('0x1c')]=utils[_0xb0c1('0x18')]();queues[_0x4a5084[_0xb0c1('0x48')]]['holdtime']=0x0;queues[_0x4a5084[_0xb0c1('0x48')]]['mohtime']=0x0;utils['info'](util[_0xb0c1('0x4')](_0xb0c1('0x5d'),_0x4a5084[_0xb0c1('0x51')],queues[_0x4a5084['transfereeuniqueid']]['name'],queues[_0x4a5084[_0xb0c1('0x48')]][_0xb0c1('0x9')],queues[_0x4a5084[_0xb0c1('0x48')]]['calleridname']));}else{utils['info'](util[_0xb0c1('0x4')](_0xb0c1('0x5e'),_0x4a5084['origtransfereruniqueid'],queues[_0x4a5084[_0xb0c1('0x52')]][_0xb0c1('0x20')],_0x4a5084[_0xb0c1('0x54')]));queues[_0x4a5084[_0xb0c1('0x52')]][_0xb0c1('0x11')]=_0x4a5084[_0xb0c1('0x54')];}}}else if(_0x4a5084[_0xb0c1('0x5f')]==_0x4a5084[_0xb0c1('0x54')]){if(!_[_0xb0c1('0x25')](queues[_0x4a5084[_0xb0c1('0x52')]])){utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x60'),_0x4a5084['origtransfereruniqueid'],queues[_0x4a5084[_0xb0c1('0x52')]][_0xb0c1('0x20')],_0x4a5084['secondtransfereruniqueid'],_0x4a5084[_0xb0c1('0x61')]));queues[_0x4a5084[_0xb0c1('0x52')]][_0xb0c1('0x44')]=!![];queues[_0x4a5084[_0xb0c1('0x52')]]['transfertype']=_0xb0c1('0x57');queues[_0x4a5084[_0xb0c1('0x52')]]['transferexten']=_0x4a5084[_0xb0c1('0x61')];queues[_0x4a5084['origtransfererlinkedid']][_0xb0c1('0x4b')]=_0x4a5084[_0xb0c1('0x5f')];queues[_0x4a5084[_0xb0c1('0x52')]]['queuecallerexitreason']='ATTENDEDTRANSFER';}if(!_[_0xb0c1('0x25')](queues[_0x4a5084[_0xb0c1('0x54')]])){if(_0x4a5084[_0xb0c1('0x62')]&&queues[_0x4a5084[_0xb0c1('0x62')]]){queues[_0x4a5084[_0xb0c1('0x62')]][_0xb0c1('0x22')]=0x1;queues[_0x4a5084['transfertargetuniqueid']]=_[_0xb0c1('0x5a')](queues[_0x4a5084['transfertargetlinkedid']]);queues[_0x4a5084[_0xb0c1('0x5b')]][_0xb0c1('0x11')]=_0x4a5084[_0xb0c1('0x5b')];queues[_0x4a5084['transfertargetuniqueid']][_0xb0c1('0x22')]=0x2;queues[_0x4a5084['transfertargetuniqueid']]['calleridnum']=queues[_0x4a5084[_0xb0c1('0x52')]]['calleridnum'];queues[_0x4a5084['transfertargetuniqueid']][_0xb0c1('0x5c')]=queues[_0x4a5084[_0xb0c1('0x52')]][_0xb0c1('0x5c')];queues[_0x4a5084['transfertargetuniqueid']][_0xb0c1('0x3a')]=utils[_0xb0c1('0x18')]();queues[_0x4a5084[_0xb0c1('0x5b')]]['queuecallerleaveAt']=utils['now']();queues[_0x4a5084[_0xb0c1('0x5b')]]['holdtime']=0x0;queues[_0x4a5084[_0xb0c1('0x5b')]]['mohtime']=0x0;utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s',_0x4a5084[_0xb0c1('0x51')],queues[_0x4a5084[_0xb0c1('0x5b')]]['name'],queues[_0x4a5084['transfertargetuniqueid']]['transfereduniqueid'],queues[_0x4a5084['transfertargetuniqueid']]['calleridnum'],queues[_0x4a5084[_0xb0c1('0x5b')]][_0xb0c1('0x5c')]));}else{utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x5e'),_0x4a5084[_0xb0c1('0x51')],queues[_0x4a5084[_0xb0c1('0x54')]][_0xb0c1('0x20')],_0x4a5084['origtransfererlinkedid']));queues[_0x4a5084['secondtransfererlinkedid']]['transfereduniqueid']=_0x4a5084['origtransfererlinkedid'];}}}}catch(_0x59c7ad){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')]('[%s][queues][attendedtransfer]',_0x4a5084[_0xb0c1('0x51')]),_0x59c7ad);}};exports[_0xb0c1('0x63')]=function(_0xf8dea1){try{if(!_[_0xb0c1('0x25')](queues[_0xf8dea1[_0xb0c1('0x6')]])){utils[_0xb0c1('0x13')](util['format'](_0xb0c1('0x64'),_0xf8dea1['uniqueid']),_0xf8dea1);queues[_0xf8dea1[_0xb0c1('0x6')]][_0xb0c1('0x65')]=utils[_0xb0c1('0x18')]();utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x66'),_0xf8dea1[_0xb0c1('0x6')],queues[_0xf8dea1[_0xb0c1('0x6')]][_0xb0c1('0x20')],queues[_0xf8dea1[_0xb0c1('0x6')]]['musiconholdstartAt']));}}catch(_0x5a7f53){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')]('[%s][queues][musiconholdstart]',_0xf8dea1['uniqueid']),_0x5a7f53);}};exports[_0xb0c1('0x67')]=function(_0x25ee36){try{if(!_[_0xb0c1('0x25')](queues[_0x25ee36['uniqueid']])){if(!_[_0xb0c1('0x25')](queues[_0x25ee36[_0xb0c1('0x6')]][_0xb0c1('0x65')])){utils[_0xb0c1('0x13')](util['format'](_0xb0c1('0x68'),_0x25ee36[_0xb0c1('0x6')]),_0x25ee36);queues[_0x25ee36[_0xb0c1('0x6')]][_0xb0c1('0x69')]+=utils[_0xb0c1('0x6a')](utils[_0xb0c1('0x18')](),queues[_0x25ee36[_0xb0c1('0x6')]]['musiconholdstartAt']);utils[_0xb0c1('0x3')](util[_0xb0c1('0x4')](_0xb0c1('0x6b'),_0x25ee36['uniqueid'],queues[_0x25ee36[_0xb0c1('0x6')]][_0xb0c1('0x20')],queues[_0x25ee36[_0xb0c1('0x6')]][_0xb0c1('0x69')]));delete queues[_0x25ee36[_0xb0c1('0x6')]][_0xb0c1('0x65')];}}}catch(_0x4fb6ad){utils[_0xb0c1('0x19')](util[_0xb0c1('0x4')]('[%s][queues][musiconholdstop]',_0x25ee36[_0xb0c1('0x6')]),_0x4fb6ad);}};
\ No newline at end of file
+var _0x7be7=['[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','util','info','format','uniqueid','channel','lastAssignedTo','calleridnum','queuecallerexitreason','queue','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','error','hangup','isNil','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','variable','toUpperCase','queuecallerabandonAt','queuecallerexitAt','value','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','now','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]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinename','holdtime','diffTime','queuecallerjoinAt','count','connectedlinenum','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','accountcode','agentcomplete','[%s][queues][agentcomplete]','reason','transfer','COMPLETEDBY','[%s][queues][blindtransfer]','transfereeuniqueid','BLIND','extension','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','transfertype','ATTENDED','transferexten','transferuniqueid','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','transfertargetlinkedid','[%s][queues][attendedtransfer]','musiconholdstart'];(function(_0x403204,_0x2e1a02){var _0x4be583=function(_0x1cb7ae){while(--_0x1cb7ae){_0x403204['push'](_0x403204['shift']());}};_0x4be583(++_0x2e1a02);}(_0x7be7,0xda));var _0x77be=function(_0x56681f,_0x25f80c){_0x56681f=_0x56681f-0x0;var _0x1f9e9a=_0x7be7[_0x56681f];return _0x1f9e9a;};'use strict';var _=require(_0x77be('0x0'));var util=require(_0x77be('0x1'));var utils=require('./utils');var queues={};function writeDB(_0x44626e){utils[_0x77be('0x2')](util[_0x77be('0x3')]('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x44626e[_0x77be('0x4')],_0x44626e[_0x77be('0x5')],_0x44626e['queue'],_0x44626e[_0x77be('0x6')],_0x44626e[_0x77be('0x7')],_0x44626e['accountcode'],_0x44626e[_0x77be('0x8')]));if(_0x44626e[_0x77be('0x9')]){utils[_0x77be('0xa')](_0x44626e[_0x77be('0x9')])[_0x77be('0xb')](function(_0x42cdc2){if(_0x42cdc2){_0x44626e[_0x77be('0xc')]=_0x42cdc2['type'];}utils[_0x77be('0xd')](_0x77be('0xe'),_0x44626e);});}else{utils[_0x77be('0xd')](_0x77be('0xe'),_0x44626e);}if(_0x44626e['transfereduniqueid']){delete queues[_0x44626e[_0x77be('0xf')]];}else{delete queues[_0x44626e['uniqueid']];}}exports[_0x77be('0x10')]=function(_0xc33245){try{utils[_0x77be('0x11')](util[_0x77be('0x3')](_0x77be('0x12'),_0xc33245['uniqueid']),_0xc33245);utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x13'),_0xc33245[_0x77be('0x4')],_0xc33245[_0x77be('0x9')],_0xc33245[_0x77be('0x14')]));queues[_0xc33245['uniqueid']]=_[_0x77be('0x15')](_0xc33245,{'originalposition':_0xc33245[_0x77be('0x14')],'queuecallerjoinAt':utils['now'](),'mohtime':0x0});}catch(_0x25d76e){utils[_0x77be('0x16')](util[_0x77be('0x3')](_0x77be('0x12'),_0xc33245[_0x77be('0x4')]),_0x25d76e);}};exports[_0x77be('0x17')]=function(_0x2ce2ed){try{if(!_[_0x77be('0x18')](queues[_0x2ce2ed[_0x77be('0x4')]])){utils[_0x77be('0x11')](util[_0x77be('0x3')](_0x77be('0x19'),_0x2ce2ed['uniqueid']),_0x2ce2ed);if(queues[_0x2ce2ed['uniqueid']][_0x77be('0x1a')]){if(!queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0x1b')]&&!queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0x1c')]){queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0x1d')]=!![];queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0x1e')]=utils['now']();queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0x8')]=_0x77be('0x1f');}utils[_0x77be('0x2')](util[_0x77be('0x3')]('[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s',_0x2ce2ed['uniqueid'],queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0x20')],queues[_0x2ce2ed['uniqueid']][_0x77be('0x8')]));writeDB(queues[_0x2ce2ed[_0x77be('0x4')]]);}else if(queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0xf')]){utils['info'](util[_0x77be('0x3')](_0x77be('0x21'),_0x2ce2ed[_0x77be('0x4')],queues[_0x2ce2ed[_0x77be('0x4')]]['name'],queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0xf')]));queues[queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0xf')]]=queues[_0x2ce2ed[_0x77be('0x4')]];queues[queues[_0x2ce2ed[_0x77be('0x4')]][_0x77be('0xf')]][_0x77be('0x22')]=0x2;delete queues[_0x2ce2ed['uniqueid']];}}}catch(_0x5536a5){utils[_0x77be('0x16')](util[_0x77be('0x3')](_0x77be('0x19'),_0x2ce2ed[_0x77be('0x4')]),_0x5536a5);}};exports[_0x77be('0x23')]=function(_0xa22628){try{utils[_0x77be('0x11')](util[_0x77be('0x3')]('[%s][queues][varset]',_0xa22628[_0x77be('0x4')]),_0xa22628);if(!_[_0x77be('0x18')](_0xa22628[_0x77be('0x24')]['queuestatus'])&&_0xa22628['value'][_0x77be('0x25')]()!=='CONTINUE'){if(!_[_0x77be('0x18')](queues[_0xa22628[_0x77be('0x4')]])){queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x1b')]=![];queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x26')]=null;queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x1c')]=!![];queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x27')]=utils['now']();queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x8')]=_0xa22628[_0x77be('0x28')][_0x77be('0x25')]();utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x29'),_0xa22628['uniqueid'],queues[_0xa22628['uniqueid']][_0x77be('0x20')],_0xa22628[_0x77be('0x28')],queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x8')]));writeDB(queues[_0xa22628[_0x77be('0x4')]]);}}else if(!_[_0x77be('0x18')](_0xa22628[_0x77be('0x24')][_0x77be('0x2a')])){if(!_[_0x77be('0x18')](queues[_0xa22628[_0x77be('0x4')]])&&!queues[_0xa22628['uniqueid']][_0x77be('0x1b')]){queues[_0xa22628['uniqueid']][_0x77be('0x1b')]=![];queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x26')]=null;queues[_0xa22628['uniqueid']]['queuecallerexit']=!![];queues[_0xa22628['uniqueid']][_0x77be('0x27')]=utils[_0x77be('0x2b')]();queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x8')]=_0x77be('0x2c');utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x2d'),_0xa22628[_0x77be('0x4')],queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x20')],_0xa22628[_0x77be('0x28')],queues[_0xa22628[_0x77be('0x4')]][_0x77be('0x8')]));}}}catch(_0x528ce0){utils[_0x77be('0x16')](util[_0x77be('0x3')](_0x77be('0x2e'),_0xa22628[_0x77be('0x4')]),_0x528ce0);}};exports[_0x77be('0x1b')]=function(_0x117fef){try{if(!_[_0x77be('0x18')](queues[_0x117fef['uniqueid']])){utils[_0x77be('0x11')](util[_0x77be('0x3')](_0x77be('0x2f'),_0x117fef['uniqueid']),_0x117fef);queues[_0x117fef[_0x77be('0x4')]][_0x77be('0x1c')]=![];queues[_0x117fef['uniqueid']]['queuecallerexitAt']=null;queues[_0x117fef[_0x77be('0x4')]][_0x77be('0x1b')]=!![];queues[_0x117fef[_0x77be('0x4')]]['queuecallerabandonAt']=utils[_0x77be('0x2b')]();queues[_0x117fef[_0x77be('0x4')]][_0x77be('0x8')]=_0x77be('0x30');utils['info'](util[_0x77be('0x3')](_0x77be('0x31'),_0x117fef[_0x77be('0x4')],queues[_0x117fef[_0x77be('0x4')]][_0x77be('0x20')],queues[_0x117fef[_0x77be('0x4')]][_0x77be('0x8')]));}}catch(_0x12f685){utils['error'](util[_0x77be('0x3')]('[%s][queues][queuecallerabandon]',_0x117fef[_0x77be('0x4')]),_0x12f685);}};exports[_0x77be('0x32')]=function(_0x4bbe29){try{if(!_[_0x77be('0x18')](queues[_0x4bbe29[_0x77be('0x4')]])){utils['debug'](util[_0x77be('0x3')](_0x77be('0x33'),_0x4bbe29['uniqueid']),_0x4bbe29);utils['info'](util['format'](_0x77be('0x34'),_0x4bbe29['uniqueid'],queues[_0x4bbe29[_0x77be('0x4')]]['name'],_0x4bbe29['connectedlinenum'],_0x4bbe29[_0x77be('0x35')]));queues[_0x4bbe29[_0x77be('0x4')]]['queuecallerleave']=!![];queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x1a')]=utils[_0x77be('0x2b')]();queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x36')]=utils[_0x77be('0x37')](queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x1a')],queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x38')]);queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x14')]=_0x4bbe29[_0x77be('0x14')];queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x39')]=_0x4bbe29[_0x77be('0x39')];queues[_0x4bbe29[_0x77be('0x4')]][_0x77be('0x3a')]=_0x4bbe29[_0x77be('0x3a')];queues[_0x4bbe29['uniqueid']]['connectedlinename']=_0x4bbe29[_0x77be('0x35')];}}catch(_0x15e20e){utils[_0x77be('0x16')](util[_0x77be('0x3')]('[%s][queues][queuecallerleave]',_0x4bbe29[_0x77be('0x4')]),_0x15e20e);}};exports[_0x77be('0x3b')]=function(_0xebf878){try{if(!_[_0x77be('0x18')](queues[_0xebf878[_0x77be('0x4')]])){utils['debug'](util[_0x77be('0x3')](_0x77be('0x3c'),_0xebf878[_0x77be('0x4')]),_0xebf878);utils['info'](util[_0x77be('0x3')](_0x77be('0x3d'),_0xebf878[_0x77be('0x4')],queues[_0xebf878['uniqueid']]['name'],_0xebf878[_0x77be('0x3e')],_0xebf878[_0x77be('0x3f')]));queues[_0xebf878[_0x77be('0x4')]]['queuecallerabandon']=![];queues[_0xebf878['uniqueid']][_0x77be('0x1b')]=![];queues[_0xebf878[_0x77be('0x4')]][_0x77be('0x26')]=null;queues[_0xebf878['uniqueid']][_0x77be('0x1c')]=![];queues[_0xebf878[_0x77be('0x4')]]['queuecallerexitreason']=null;queues[_0xebf878[_0x77be('0x4')]][_0x77be('0x27')]=null;queues[_0xebf878[_0x77be('0x4')]][_0x77be('0x40')]=!![];queues[_0xebf878['uniqueid']][_0x77be('0x41')]=_0xebf878[_0x77be('0x3f')];queues[_0xebf878['uniqueid']]['lastAssignedTo']=_0xebf878[_0x77be('0x3e')];}}catch(_0x1b487f){utils[_0x77be('0x16')](util[_0x77be('0x3')](_0x77be('0x3c'),_0xebf878[_0x77be('0x4')]),_0x1b487f);}};exports[_0x77be('0x42')]=function(_0x475c43){try{if(!_[_0x77be('0x18')](queues[_0x475c43[_0x77be('0x4')]])){if(queues[_0x475c43['uniqueid']][_0x77be('0x1a')]){utils[_0x77be('0x11')](util[_0x77be('0x3')](_0x77be('0x43'),_0x475c43[_0x77be('0x4')]),_0x475c43);queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x1b')]=![];queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x1b')]=![];queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x26')]=null;queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x1c')]=![];queues[_0x475c43['uniqueid']][_0x77be('0x27')]=null;queues[_0x475c43['uniqueid']][_0x77be('0x40')]=!![];queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x6')]=_0x475c43[_0x77be('0x3e')];queues[_0x475c43[_0x77be('0x4')]]['queuecallercomplete']=!![];queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x1e')]=utils['now']();if(_0x475c43[_0x77be('0x44')]==_0x77be('0x45')){if(!queues[_0x475c43['uniqueid']][_0x77be('0x45')]){queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x8')]='TRANSFER';}}else{queues[_0x475c43['uniqueid']][_0x77be('0x8')]=_0x77be('0x46')+_0x475c43['reason'][_0x77be('0x25')]();}utils[_0x77be('0x2')](util[_0x77be('0x3')]('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x475c43[_0x77be('0x4')],queues[_0x475c43[_0x77be('0x4')]][_0x77be('0x20')],_0x475c43[_0x77be('0x3e')],queues[_0x475c43['uniqueid']]['queuecallerexitreason']));writeDB(queues[_0x475c43[_0x77be('0x4')]]);}}}catch(_0x36cdf8){utils[_0x77be('0x16')](util[_0x77be('0x3')]('[%s][queues][agentcomplete]',_0x475c43[_0x77be('0x4')]),_0x36cdf8);}};exports['blindtransfer']=function(_0x4444db){try{if(!_[_0x77be('0x18')](queues[_0x4444db['transfereeuniqueid']])){utils[_0x77be('0x11')](util[_0x77be('0x3')](_0x77be('0x47'),_0x4444db[_0x77be('0x4')]),_0x4444db);queues[_0x4444db[_0x77be('0x48')]][_0x77be('0x45')]=!![];queues[_0x4444db[_0x77be('0x48')]]['transfertype']=_0x77be('0x49');queues[_0x4444db[_0x77be('0x48')]]['transferexten']=_0x4444db[_0x77be('0x4a')];queues[_0x4444db['transfereeuniqueid']]['transferuniqueid']=_0x4444db[_0x77be('0x48')];queues[_0x4444db[_0x77be('0x48')]][_0x77be('0x8')]=_0x77be('0x4b');utils['info'](util[_0x77be('0x3')](_0x77be('0x4c'),_0x4444db[_0x77be('0x4')],queues[_0x4444db[_0x77be('0x48')]][_0x77be('0x20')],_0x4444db['transfereeuniqueid'],_0x4444db[_0x77be('0x4a')]));}}catch(_0x50e889){utils[_0x77be('0x16')](util[_0x77be('0x3')](_0x77be('0x47'),_0x4444db[_0x77be('0x4')]),_0x50e889);}};exports[_0x77be('0x4d')]=function(_0x3326c1){try{utils[_0x77be('0x11')](util[_0x77be('0x3')]('[%s][queues][attendedtransfer]',_0x3326c1[_0x77be('0x4e')]),_0x3326c1);if(_0x3326c1[_0x77be('0x4e')]==_0x3326c1[_0x77be('0x4f')]){if(!_['isNil'](queues[_0x3326c1[_0x77be('0x50')]])){utils['info'](util['format'](_0x77be('0x51'),_0x3326c1['origtransfereruniqueid'],queues[_0x3326c1['secondtransfererlinkedid']]['name'],_0x3326c1[_0x77be('0x52')]));queues[_0x3326c1[_0x77be('0x50')]]['transfer']=!![];queues[_0x3326c1[_0x77be('0x50')]][_0x77be('0x53')]=_0x77be('0x54');queues[_0x3326c1[_0x77be('0x50')]][_0x77be('0x55')]=_0x3326c1[_0x77be('0x52')];queues[_0x3326c1[_0x77be('0x50')]][_0x77be('0x56')]=_0x3326c1['origtransfereruniqueid'];queues[_0x3326c1[_0x77be('0x50')]][_0x77be('0x8')]=_0x77be('0x57');}if(!_[_0x77be('0x18')](queues[_0x3326c1[_0x77be('0x4f')]])){if(_0x3326c1[_0x77be('0x58')]&&queues[_0x3326c1['transfereelinkedid']]){queues[_0x3326c1['transfereelinkedid']]['queuecallerenterreason']=0x1;queues[_0x3326c1[_0x77be('0x48')]]=_[_0x77be('0x59')](queues[_0x3326c1['transfereelinkedid']]);queues[_0x3326c1['transfereeuniqueid']][_0x77be('0xf')]=_0x3326c1[_0x77be('0x5a')];queues[_0x3326c1[_0x77be('0x48')]][_0x77be('0x22')]=0x2;queues[_0x3326c1['transfereeuniqueid']][_0x77be('0x7')]=queues[_0x3326c1[_0x77be('0x50')]]['calleridnum'];queues[_0x3326c1[_0x77be('0x48')]][_0x77be('0x5b')]=queues[_0x3326c1[_0x77be('0x50')]][_0x77be('0x5b')];queues[_0x3326c1['transfereeuniqueid']][_0x77be('0x38')]=utils['now']();queues[_0x3326c1[_0x77be('0x48')]]['queuecallerleaveAt']=utils[_0x77be('0x2b')]();queues[_0x3326c1[_0x77be('0x48')]][_0x77be('0x36')]=0x0;queues[_0x3326c1[_0x77be('0x48')]][_0x77be('0x5c')]=0x0;utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x5d'),_0x3326c1[_0x77be('0x4e')],queues[_0x3326c1[_0x77be('0x48')]][_0x77be('0x20')],queues[_0x3326c1[_0x77be('0x48')]]['calleridnum'],queues[_0x3326c1[_0x77be('0x48')]]['calleridname']));}else{utils['info'](util[_0x77be('0x3')](_0x77be('0x5e'),_0x3326c1['origtransfereruniqueid'],queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0x20')],_0x3326c1['secondtransfererlinkedid']));queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0xf')]=_0x3326c1[_0x77be('0x50')];}}}else if(_0x3326c1[_0x77be('0x5f')]==_0x3326c1[_0x77be('0x50')]){if(!_[_0x77be('0x18')](queues[_0x3326c1['origtransfererlinkedid']])){utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x60'),_0x3326c1[_0x77be('0x4e')],queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0x20')],_0x3326c1[_0x77be('0x5f')],_0x3326c1['secondtransfererexten']));queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0x45')]=!![];queues[_0x3326c1[_0x77be('0x4f')]]['transfertype']=_0x77be('0x54');queues[_0x3326c1[_0x77be('0x4f')]]['transferexten']=_0x3326c1['secondtransfererexten'];queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0x56')]=_0x3326c1[_0x77be('0x5f')];queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0x8')]=_0x77be('0x57');}if(!_[_0x77be('0x18')](queues[_0x3326c1[_0x77be('0x50')]])){if(_0x3326c1['transfertargetlinkedid']&&queues[_0x3326c1[_0x77be('0x61')]]){queues[_0x3326c1[_0x77be('0x61')]][_0x77be('0x22')]=0x1;queues[_0x3326c1[_0x77be('0x5a')]]=_[_0x77be('0x59')](queues[_0x3326c1['transfertargetlinkedid']]);queues[_0x3326c1[_0x77be('0x5a')]][_0x77be('0xf')]=_0x3326c1[_0x77be('0x5a')];queues[_0x3326c1['transfertargetuniqueid']]['queuecallerenterreason']=0x2;queues[_0x3326c1['transfertargetuniqueid']]['calleridnum']=queues[_0x3326c1[_0x77be('0x4f')]][_0x77be('0x7')];queues[_0x3326c1[_0x77be('0x5a')]]['calleridname']=queues[_0x3326c1[_0x77be('0x4f')]]['calleridname'];queues[_0x3326c1[_0x77be('0x5a')]]['queuecallerjoinAt']=utils[_0x77be('0x2b')]();queues[_0x3326c1[_0x77be('0x5a')]]['queuecallerleaveAt']=utils[_0x77be('0x2b')]();queues[_0x3326c1[_0x77be('0x5a')]][_0x77be('0x36')]=0x0;queues[_0x3326c1[_0x77be('0x5a')]]['mohtime']=0x0;utils[_0x77be('0x2')](util[_0x77be('0x3')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s',_0x3326c1[_0x77be('0x4e')],queues[_0x3326c1[_0x77be('0x5a')]][_0x77be('0x20')],queues[_0x3326c1[_0x77be('0x5a')]]['transfereduniqueid'],queues[_0x3326c1[_0x77be('0x5a')]][_0x77be('0x7')],queues[_0x3326c1[_0x77be('0x5a')]][_0x77be('0x5b')]));}else{utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x5e'),_0x3326c1[_0x77be('0x4e')],queues[_0x3326c1[_0x77be('0x50')]][_0x77be('0x20')],_0x3326c1[_0x77be('0x4f')]));queues[_0x3326c1['secondtransfererlinkedid']]['transfereduniqueid']=_0x3326c1['origtransfererlinkedid'];}}}}catch(_0x52c243){utils[_0x77be('0x16')](util[_0x77be('0x3')](_0x77be('0x62'),_0x3326c1[_0x77be('0x4e')]),_0x52c243);}};exports[_0x77be('0x63')]=function(_0x24d193){try{if(!_[_0x77be('0x18')](queues[_0x24d193[_0x77be('0x4')]])){utils[_0x77be('0x11')](util['format'](_0x77be('0x64'),_0x24d193[_0x77be('0x4')]),_0x24d193);queues[_0x24d193[_0x77be('0x4')]][_0x77be('0x65')]=utils[_0x77be('0x2b')]();utils[_0x77be('0x2')](util[_0x77be('0x3')](_0x77be('0x66'),_0x24d193['uniqueid'],queues[_0x24d193[_0x77be('0x4')]]['name'],queues[_0x24d193[_0x77be('0x4')]][_0x77be('0x65')]));}}catch(_0x47e801){utils['error'](util[_0x77be('0x3')](_0x77be('0x64'),_0x24d193[_0x77be('0x4')]),_0x47e801);}};exports[_0x77be('0x67')]=function(_0x481375){try{if(!_[_0x77be('0x18')](queues[_0x481375[_0x77be('0x4')]])){if(!_[_0x77be('0x18')](queues[_0x481375[_0x77be('0x4')]][_0x77be('0x65')])){utils['debug'](util[_0x77be('0x3')](_0x77be('0x68'),_0x481375[_0x77be('0x4')]),_0x481375);queues[_0x481375[_0x77be('0x4')]][_0x77be('0x5c')]+=utils[_0x77be('0x37')](utils[_0x77be('0x2b')](),queues[_0x481375[_0x77be('0x4')]][_0x77be('0x65')]);utils[_0x77be('0x2')](util['format'](_0x77be('0x69'),_0x481375[_0x77be('0x4')],queues[_0x481375[_0x77be('0x4')]]['name'],queues[_0x481375[_0x77be('0x4')]][_0x77be('0x5c')]));delete queues[_0x481375[_0x77be('0x4')]][_0x77be('0x65')];}}}catch(_0x187781){utils['error'](util[_0x77be('0x3')]('[%s][queues][musiconholdstop]',_0x481375[_0x77be('0x4')]),_0x187781);}};
\ No newline at end of file