Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / services / xdr / queues.controller.js
index 49d5ee6..1368c92 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf049=['extension','transfereeuniqueid','transferuniqueid','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','origtransfererexten','transferexten','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridnum','calleridname','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','secondtransfererexten','ATTENDED','transfertargetlinkedid','queuecallerjoinAt','mohtime','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','[%s][queues][musiconholdstart]','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','queue','lastAssignedTo','accountcode','getVoiceQueueByName','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','info','position','now','error','hangup','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallerexitreason','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','name','queuecallerenterreason','[%s][queues][varset]','isNil','variable','queuestatus','value','toUpperCase','CONTINUE','queuecallerexitAt','queueposition','queuecallerabandonAt','EXITWITHKEY','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','holdtime','diffTime','count','connectedlinename','agentconnect','[%s][queues][agentconnect]','membername','destaccountcode','assigned','agentcomplete','[%s][queues][agentcomplete]','queuecallercompleteAt','reason','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','[%s][queues][blindtransfer]','transfertype','BLIND'];(function(_0x476531,_0x4db620){var _0x1942d3=function(_0x111d21){while(--_0x111d21){_0x476531['push'](_0x476531['shift']());}};_0x1942d3(++_0x4db620);}(_0xf049,0x83));var _0x9f04=function(_0x21a8a9,_0x5624db){_0x21a8a9=_0x21a8a9-0x0;var _0x1bff62=_0xf049[_0x21a8a9];return _0x1bff62;};'use strict';var _=require(_0x9f04('0x0'));var util=require('util');var utils=require('./utils');var queues={};function writeDB(_0x5d025b){utils['info'](util[_0x9f04('0x1')](_0x9f04('0x2'),_0x5d025b['uniqueid'],_0x5d025b[_0x9f04('0x3')],_0x5d025b[_0x9f04('0x4')],_0x5d025b[_0x9f04('0x5')],_0x5d025b['calleridnum'],_0x5d025b[_0x9f04('0x6')],_0x5d025b['queuecallerexitreason']));if(_0x5d025b[_0x9f04('0x4')]){utils[_0x9f04('0x7')](_0x5d025b[_0x9f04('0x4')])['then'](function(_0x5e0504){if(_0x5e0504){_0x5d025b[_0x9f04('0x8')]=_0x5e0504[_0x9f04('0x8')];}utils[_0x9f04('0x9')](_0x9f04('0xa'),_0x5d025b);});}else{utils[_0x9f04('0x9')](_0x9f04('0xa'),_0x5d025b);}if(_0x5d025b[_0x9f04('0xb')]){delete queues[_0x5d025b[_0x9f04('0xb')]];}else{delete queues[_0x5d025b[_0x9f04('0xc')]];}}exports[_0x9f04('0xd')]=function(_0x25b596){try{utils[_0x9f04('0xe')](util[_0x9f04('0x1')](_0x9f04('0xf'),_0x25b596[_0x9f04('0xc')]),_0x25b596);utils[_0x9f04('0x10')](util[_0x9f04('0x1')]('[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s',_0x25b596[_0x9f04('0xc')],_0x25b596[_0x9f04('0x4')],_0x25b596[_0x9f04('0x11')]));queues[_0x25b596['uniqueid']]=_['assign'](_0x25b596,{'originalposition':_0x25b596[_0x9f04('0x11')],'queuecallerjoinAt':utils[_0x9f04('0x12')](),'mohtime':0x0});}catch(_0x583cbd){utils[_0x9f04('0x13')](util['format'](_0x9f04('0xf'),_0x25b596[_0x9f04('0xc')]),_0x583cbd);}};exports[_0x9f04('0x14')]=function(_0x5c5635){try{if(!_['isNil'](queues[_0x5c5635[_0x9f04('0xc')]])){utils['debug'](util['format'](_0x9f04('0x15'),_0x5c5635[_0x9f04('0xc')]),_0x5c5635);if(queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x16')]){if(!queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x17')]&&!queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x18')]){queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x19')]=!![];queues[_0x5c5635[_0x9f04('0xc')]]['queuecallercompleteAt']=utils[_0x9f04('0x12')]();queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x1a')]=_0x9f04('0x1b');}utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x1c'),_0x5c5635['uniqueid'],queues[_0x5c5635[_0x9f04('0xc')]]['name'],queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x1a')]));writeDB(queues[_0x5c5635[_0x9f04('0xc')]]);}else if(queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0xb')]){utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x1d'),_0x5c5635[_0x9f04('0xc')],queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0x1e')],queues[_0x5c5635[_0x9f04('0xc')]][_0x9f04('0xb')]));queues[queues[_0x5c5635['uniqueid']][_0x9f04('0xb')]]=queues[_0x5c5635['uniqueid']];queues[queues[_0x5c5635[_0x9f04('0xc')]]['transfereduniqueid']][_0x9f04('0x1f')]=0x2;delete queues[_0x5c5635[_0x9f04('0xc')]];}}}catch(_0x540d87){utils['error'](util[_0x9f04('0x1')](_0x9f04('0x15'),_0x5c5635[_0x9f04('0xc')]),_0x540d87);}};exports['varset']=function(_0x1e6705){try{utils[_0x9f04('0xe')](util['format'](_0x9f04('0x20'),_0x1e6705['uniqueid']),_0x1e6705);if(!_[_0x9f04('0x21')](_0x1e6705[_0x9f04('0x22')][_0x9f04('0x23')])&&_0x1e6705[_0x9f04('0x24')][_0x9f04('0x25')]()!==_0x9f04('0x26')){if(!_[_0x9f04('0x21')](queues[_0x1e6705[_0x9f04('0xc')]])){queues[_0x1e6705[_0x9f04('0xc')]]['queuecallerabandon']=![];queues[_0x1e6705[_0x9f04('0xc')]]['queuecallerabandonAt']=null;queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x18')]=!![];queues[_0x1e6705['uniqueid']][_0x9f04('0x27')]=utils[_0x9f04('0x12')]();queues[_0x1e6705['uniqueid']][_0x9f04('0x1a')]=_0x1e6705[_0x9f04('0x24')][_0x9f04('0x25')]();utils['info'](util['format']('[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s',_0x1e6705[_0x9f04('0xc')],queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x1e')],_0x1e6705[_0x9f04('0x24')],queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x1a')]));writeDB(queues[_0x1e6705[_0x9f04('0xc')]]);}}else if(!_[_0x9f04('0x21')](_0x1e6705[_0x9f04('0x22')][_0x9f04('0x28')])){if(!_[_0x9f04('0x21')](queues[_0x1e6705[_0x9f04('0xc')]])&&!queues[_0x1e6705['uniqueid']][_0x9f04('0x17')]){queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x17')]=![];queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x29')]=null;queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x18')]=!![];queues[_0x1e6705[_0x9f04('0xc')]]['queuecallerexitAt']=utils[_0x9f04('0x12')]();queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x1a')]=_0x9f04('0x2a');utils['info'](util['format']('[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s',_0x1e6705[_0x9f04('0xc')],queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x1e')],_0x1e6705['value'],queues[_0x1e6705[_0x9f04('0xc')]][_0x9f04('0x1a')]));}}}catch(_0x2fd730){utils[_0x9f04('0x13')](util[_0x9f04('0x1')](_0x9f04('0x20'),_0x1e6705[_0x9f04('0xc')]),_0x2fd730);}};exports['queuecallerabandon']=function(_0x3af554){try{if(!_[_0x9f04('0x21')](queues[_0x3af554[_0x9f04('0xc')]])){utils[_0x9f04('0xe')](util[_0x9f04('0x1')](_0x9f04('0x2b'),_0x3af554[_0x9f04('0xc')]),_0x3af554);queues[_0x3af554[_0x9f04('0xc')]]['queuecallerexit']=![];queues[_0x3af554[_0x9f04('0xc')]][_0x9f04('0x27')]=null;queues[_0x3af554[_0x9f04('0xc')]][_0x9f04('0x17')]=!![];queues[_0x3af554[_0x9f04('0xc')]][_0x9f04('0x29')]=utils[_0x9f04('0x12')]();queues[_0x3af554['uniqueid']]['queuecallerexitreason']=_0x9f04('0x2c');utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x2d'),_0x3af554[_0x9f04('0xc')],queues[_0x3af554[_0x9f04('0xc')]][_0x9f04('0x1e')],queues[_0x3af554[_0x9f04('0xc')]][_0x9f04('0x1a')]));}}catch(_0x3d6bde){utils['error'](util[_0x9f04('0x1')](_0x9f04('0x2b'),_0x3af554['uniqueid']),_0x3d6bde);}};exports[_0x9f04('0x2e')]=function(_0x13ef10){try{if(!_[_0x9f04('0x21')](queues[_0x13ef10[_0x9f04('0xc')]])){utils[_0x9f04('0xe')](util[_0x9f04('0x1')](_0x9f04('0x2f'),_0x13ef10[_0x9f04('0xc')]),_0x13ef10);utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x30'),_0x13ef10[_0x9f04('0xc')],queues[_0x13ef10[_0x9f04('0xc')]][_0x9f04('0x1e')],_0x13ef10[_0x9f04('0x31')],_0x13ef10['connectedlinename']));queues[_0x13ef10['uniqueid']][_0x9f04('0x2e')]=!![];queues[_0x13ef10[_0x9f04('0xc')]]['queuecallerleaveAt']=utils['now']();queues[_0x13ef10[_0x9f04('0xc')]][_0x9f04('0x32')]=utils[_0x9f04('0x33')](queues[_0x13ef10[_0x9f04('0xc')]]['queuecallerleaveAt'],queues[_0x13ef10['uniqueid']]['queuecallerjoinAt']);queues[_0x13ef10[_0x9f04('0xc')]][_0x9f04('0x11')]=_0x13ef10[_0x9f04('0x11')];queues[_0x13ef10[_0x9f04('0xc')]][_0x9f04('0x34')]=_0x13ef10[_0x9f04('0x34')];queues[_0x13ef10[_0x9f04('0xc')]][_0x9f04('0x31')]=_0x13ef10[_0x9f04('0x31')];queues[_0x13ef10['uniqueid']]['connectedlinename']=_0x13ef10[_0x9f04('0x35')];}}catch(_0x4c3984){utils['error'](util['format'](_0x9f04('0x2f'),_0x13ef10['uniqueid']),_0x4c3984);}};exports[_0x9f04('0x36')]=function(_0xb68031){try{if(!_[_0x9f04('0x21')](queues[_0xb68031[_0x9f04('0xc')]])){utils['debug'](util[_0x9f04('0x1')](_0x9f04('0x37'),_0xb68031[_0x9f04('0xc')]),_0xb68031);utils['info'](util[_0x9f04('0x1')]('[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s',_0xb68031[_0x9f04('0xc')],queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x1e')],_0xb68031[_0x9f04('0x38')],_0xb68031[_0x9f04('0x39')]));queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x17')]=![];queues[_0xb68031['uniqueid']][_0x9f04('0x17')]=![];queues[_0xb68031[_0x9f04('0xc')]]['queuecallerabandonAt']=null;queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x18')]=![];queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x1a')]=null;queues[_0xb68031['uniqueid']][_0x9f04('0x27')]=null;queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x3a')]=!![];queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x6')]=_0xb68031['destaccountcode'];queues[_0xb68031[_0x9f04('0xc')]][_0x9f04('0x5')]=_0xb68031[_0x9f04('0x38')];}}catch(_0x4a429e){utils[_0x9f04('0x13')](util[_0x9f04('0x1')](_0x9f04('0x37'),_0xb68031[_0x9f04('0xc')]),_0x4a429e);}};exports[_0x9f04('0x3b')]=function(_0x306b39){try{if(!_[_0x9f04('0x21')](queues[_0x306b39[_0x9f04('0xc')]])){if(queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x16')]){utils[_0x9f04('0xe')](util[_0x9f04('0x1')](_0x9f04('0x3c'),_0x306b39[_0x9f04('0xc')]),_0x306b39);queues[_0x306b39[_0x9f04('0xc')]]['queuecallerabandon']=![];queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x17')]=![];queues[_0x306b39['uniqueid']]['queuecallerabandonAt']=null;queues[_0x306b39[_0x9f04('0xc')]]['queuecallerexit']=![];queues[_0x306b39['uniqueid']][_0x9f04('0x27')]=null;queues[_0x306b39['uniqueid']]['assigned']=!![];queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x5')]=_0x306b39['membername'];queues[_0x306b39['uniqueid']][_0x9f04('0x19')]=!![];queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x3d')]=utils[_0x9f04('0x12')]();if(_0x306b39[_0x9f04('0x3e')]=='transfer'){if(!queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x3f')]){queues[_0x306b39['uniqueid']]['queuecallerexitreason']=_0x9f04('0x40');}}else{queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x1a')]=_0x9f04('0x41')+_0x306b39['reason']['toUpperCase']();}utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x42'),_0x306b39[_0x9f04('0xc')],queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x1e')],_0x306b39[_0x9f04('0x38')],queues[_0x306b39[_0x9f04('0xc')]][_0x9f04('0x1a')]));writeDB(queues[_0x306b39[_0x9f04('0xc')]]);}}}catch(_0x25f465){utils['error'](util['format'](_0x9f04('0x3c'),_0x306b39[_0x9f04('0xc')]),_0x25f465);}};exports[_0x9f04('0x43')]=function(_0x48384b){try{if(!_['isNil'](queues[_0x48384b['transfereeuniqueid']])){utils['debug'](util[_0x9f04('0x1')](_0x9f04('0x44'),_0x48384b[_0x9f04('0xc')]),_0x48384b);queues[_0x48384b['transfereeuniqueid']][_0x9f04('0x3f')]=!![];queues[_0x48384b['transfereeuniqueid']][_0x9f04('0x45')]=_0x9f04('0x46');queues[_0x48384b['transfereeuniqueid']]['transferexten']=_0x48384b[_0x9f04('0x47')];queues[_0x48384b[_0x9f04('0x48')]][_0x9f04('0x49')]=_0x48384b[_0x9f04('0x48')];queues[_0x48384b[_0x9f04('0x48')]][_0x9f04('0x1a')]='BLINDTRANSFER';utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x4a'),_0x48384b[_0x9f04('0xc')],queues[_0x48384b[_0x9f04('0x48')]][_0x9f04('0x1e')],_0x48384b[_0x9f04('0x48')],_0x48384b['extension']));}}catch(_0xa86e6b){utils['error'](util[_0x9f04('0x1')]('[%s][queues][blindtransfer]',_0x48384b[_0x9f04('0xc')]),_0xa86e6b);}};exports[_0x9f04('0x4b')]=function(_0x381019){try{utils[_0x9f04('0xe')](util['format'](_0x9f04('0x4c'),_0x381019[_0x9f04('0x4d')]),_0x381019);if(_0x381019[_0x9f04('0x4d')]==_0x381019[_0x9f04('0x4e')]){if(!_['isNil'](queues[_0x381019['secondtransfererlinkedid']])){utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x4f'),_0x381019[_0x9f04('0x4d')],queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0x1e')],_0x381019[_0x9f04('0x51')]));queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0x3f')]=!![];queues[_0x381019['secondtransfererlinkedid']]['transfertype']='ATTENDED';queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0x52')]=_0x381019[_0x9f04('0x51')];queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0x49')]=_0x381019[_0x9f04('0x4d')];queues[_0x381019['secondtransfererlinkedid']][_0x9f04('0x1a')]=_0x9f04('0x53');}if(!_[_0x9f04('0x21')](queues[_0x381019[_0x9f04('0x4e')]])){if(_0x381019[_0x9f04('0x54')]&&queues[_0x381019[_0x9f04('0x54')]]){queues[_0x381019[_0x9f04('0x54')]][_0x9f04('0x1f')]=0x1;queues[_0x381019[_0x9f04('0x48')]]=_[_0x9f04('0x55')](queues[_0x381019[_0x9f04('0x54')]]);queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0xb')]=_0x381019[_0x9f04('0x56')];queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x1f')]=0x2;queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x57')]=queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0x57')];queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x58')]=queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0x58')];queues[_0x381019['transfereeuniqueid']]['queuecallerjoinAt']=utils[_0x9f04('0x12')]();queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x16')]=utils[_0x9f04('0x12')]();queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x32')]=0x0;queues[_0x381019['transfereeuniqueid']]['mohtime']=0x0;utils[_0x9f04('0x10')](util[_0x9f04('0x1')]('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x381019[_0x9f04('0x4d')],queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x1e')],queues[_0x381019[_0x9f04('0x48')]][_0x9f04('0x57')],queues[_0x381019[_0x9f04('0x48')]]['calleridname']));}else{utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x59'),_0x381019[_0x9f04('0x4d')],queues[_0x381019['origtransfererlinkedid']][_0x9f04('0x1e')],_0x381019['secondtransfererlinkedid']));queues[_0x381019[_0x9f04('0x4e')]][_0x9f04('0xb')]=_0x381019['secondtransfererlinkedid'];}}}else if(_0x381019[_0x9f04('0x5a')]==_0x381019[_0x9f04('0x50')]){if(!_[_0x9f04('0x21')](queues[_0x381019[_0x9f04('0x4e')]])){utils[_0x9f04('0x10')](util[_0x9f04('0x1')]('[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER',_0x381019[_0x9f04('0x4d')],queues[_0x381019[_0x9f04('0x4e')]][_0x9f04('0x1e')],_0x381019['secondtransfereruniqueid'],_0x381019[_0x9f04('0x5b')]));queues[_0x381019[_0x9f04('0x4e')]][_0x9f04('0x3f')]=!![];queues[_0x381019[_0x9f04('0x4e')]][_0x9f04('0x45')]=_0x9f04('0x5c');queues[_0x381019[_0x9f04('0x4e')]]['transferexten']=_0x381019[_0x9f04('0x5b')];queues[_0x381019['origtransfererlinkedid']][_0x9f04('0x49')]=_0x381019['secondtransfereruniqueid'];queues[_0x381019['origtransfererlinkedid']]['queuecallerexitreason']=_0x9f04('0x53');}if(!_['isNil'](queues[_0x381019[_0x9f04('0x50')]])){if(_0x381019['transfertargetlinkedid']&&queues[_0x381019[_0x9f04('0x5d')]]){queues[_0x381019[_0x9f04('0x5d')]]['queuecallerenterreason']=0x1;queues[_0x381019['transfertargetuniqueid']]=_[_0x9f04('0x55')](queues[_0x381019['transfertargetlinkedid']]);queues[_0x381019['transfertargetuniqueid']][_0x9f04('0xb')]=_0x381019[_0x9f04('0x56')];queues[_0x381019[_0x9f04('0x56')]]['queuecallerenterreason']=0x2;queues[_0x381019['transfertargetuniqueid']][_0x9f04('0x57')]=queues[_0x381019[_0x9f04('0x4e')]][_0x9f04('0x57')];queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0x58')]=queues[_0x381019[_0x9f04('0x4e')]][_0x9f04('0x58')];queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0x5e')]=utils[_0x9f04('0x12')]();queues[_0x381019['transfertargetuniqueid']]['queuecallerleaveAt']=utils[_0x9f04('0x12')]();queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0x32')]=0x0;queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0x5f')]=0x0;utils[_0x9f04('0x10')](util[_0x9f04('0x1')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s',_0x381019[_0x9f04('0x4d')],queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0x1e')],queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0xb')],queues[_0x381019['transfertargetuniqueid']]['calleridnum'],queues[_0x381019[_0x9f04('0x56')]][_0x9f04('0x58')]));}else{utils[_0x9f04('0x10')](util[_0x9f04('0x1')](_0x9f04('0x59'),_0x381019[_0x9f04('0x4d')],queues[_0x381019['secondtransfererlinkedid']][_0x9f04('0x1e')],_0x381019[_0x9f04('0x4e')]));queues[_0x381019[_0x9f04('0x50')]][_0x9f04('0xb')]=_0x381019[_0x9f04('0x4e')];}}}}catch(_0x3f5871){utils['error'](util['format'](_0x9f04('0x4c'),_0x381019[_0x9f04('0x4d')]),_0x3f5871);}};exports['musiconholdstart']=function(_0x1cb94d){try{if(!_[_0x9f04('0x21')](queues[_0x1cb94d[_0x9f04('0xc')]])){utils[_0x9f04('0xe')](util[_0x9f04('0x1')]('[%s][queues][musiconholdstart]',_0x1cb94d['uniqueid']),_0x1cb94d);queues[_0x1cb94d['uniqueid']][_0x9f04('0x60')]=utils[_0x9f04('0x12')]();utils['info'](util[_0x9f04('0x1')](_0x9f04('0x61'),_0x1cb94d[_0x9f04('0xc')],queues[_0x1cb94d[_0x9f04('0xc')]][_0x9f04('0x1e')],queues[_0x1cb94d['uniqueid']][_0x9f04('0x60')]));}}catch(_0x837005){utils['error'](util['format'](_0x9f04('0x62'),_0x1cb94d[_0x9f04('0xc')]),_0x837005);}};exports['musiconholdstop']=function(_0x8b5aed){try{if(!_['isNil'](queues[_0x8b5aed[_0x9f04('0xc')]])){if(!_['isNil'](queues[_0x8b5aed['uniqueid']][_0x9f04('0x60')])){utils[_0x9f04('0xe')](util[_0x9f04('0x1')](_0x9f04('0x63'),_0x8b5aed['uniqueid']),_0x8b5aed);queues[_0x8b5aed['uniqueid']][_0x9f04('0x5f')]+=utils[_0x9f04('0x33')](utils[_0x9f04('0x12')](),queues[_0x8b5aed[_0x9f04('0xc')]][_0x9f04('0x60')]);utils['info'](util[_0x9f04('0x1')](_0x9f04('0x64'),_0x8b5aed[_0x9f04('0xc')],queues[_0x8b5aed[_0x9f04('0xc')]][_0x9f04('0x1e')],queues[_0x8b5aed[_0x9f04('0xc')]][_0x9f04('0x5f')]));delete queues[_0x8b5aed[_0x9f04('0xc')]]['musiconholdstartAt'];}}}catch(_0x575053){utils[_0x9f04('0x13')](util[_0x9f04('0x1')]('[%s][queues][musiconholdstop]',_0x8b5aed[_0x9f04('0xc')]),_0x575053);}};
\ 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