// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa467=['pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','buildObj','queue','interface','buildAcw','agentReadyId','not_inuse','status','getDiff','filterKey','idContact','type','campaigntype','dialAnswer','countcongestionretry','callbackuniqueid','callbackat','recallme','sipcallid','xmd-queue','xmd-phone','xmd-listid','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqos','rtpaudioqoslossbridged','bridgepeer','\x5cw{0,','pow','replace','random','extractCalleridName','extractCalleridNumber','match','util','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','127.0.0.1','milliseconds','diff','seconds','error','inspect','logger','info','loggerError','logger2','message','getCallerId','isUndefined','isEmpty','string','\x22%s\x22\x20<%s>','isActive','addVariables','Queue','name','calleridnum','ContactId','VoiceQueueId','format','\x22rtTxX%s%s\x22','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','dialQueueProject2','originatecalleridnum','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','Contact','hasOwnProperty','isNil','createdAt','updatedAt','XMD-','toUpper','toLowerVariables','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','responsetime','endtime','logAgent','ringtime','starttime','logLookAgent','membername','UserId','talktime','answertime','isFailure','variablesAction','RECALL','uniqueid','originate','channelAgent','from-sip','timeout','countbusyretry','countnoanswerretry','cloneAction','clone','Global','scheduledAt','active','scheduledat','add','minutes','ListId','decrementTalkink'];(function(_0x2d40e5,_0x45ada9){var _0x2736e6=function(_0x120a02){while(--_0x120a02){_0x2d40e5['push'](_0x2d40e5['shift']());}};_0x2736e6(++_0x45ada9);}(_0xa467,0x143));var _0x7a46=function(_0x17e818,_0x4728d6){_0x17e818=_0x17e818-0x0;var _0x2aad51=_0xa467[_0x17e818];return _0x2aad51;};'use strict';var util=require(_0x7a46('0x0'));var _=require(_0x7a46('0x1'));var moment=require(_0x7a46('0x2'));var logger=require(_0x7a46('0x3'))(_0x7a46('0x4'));var ipAgi=process[_0x7a46('0x5')][_0x7a46('0x6')]||_0x7a46('0x7');function getSeconds(_0x119b5b,_0x48b9d9){var _0x4e2693=moment(_0x119b5b)[_0x7a46('0x8')](0x0);var _0x1940e6=moment(_0x48b9d9)[_0x7a46('0x8')](0x0);return _0x4e2693[_0x7a46('0x9')](_0x1940e6,_0x7a46('0xa'));}exports['loggerCatch']=function(_0x341d9e){return function(_0x1f8b07){logger[_0x7a46('0xb')](_0x341d9e,util[_0x7a46('0xc')](_0x1f8b07,{'showHidden':![],'depth':null}));};};exports[_0x7a46('0xd')]=function(_0x334af5,_0x594627){logger[_0x7a46('0xe')](_0x334af5,util['inspect'](_0x594627,{'showHidden':![],'depth':null}));};exports[_0x7a46('0xf')]=function(_0x555f7a,_0x612ed3){logger[_0x7a46('0xb')](_0x555f7a,util[_0x7a46('0xc')](_0x612ed3,{'showHidden':![],'depth':null}));};exports[_0x7a46('0x10')]=function(_0x4372d4){return function(_0x5da2d3){logger[_0x7a46('0xe')](_0x4372d4,util[_0x7a46('0xc')](_0x5da2d3,{'showHidden':![],'depth':null}));};};exports[_0x7a46('0x11')]=function(_0x32f9a3,_0x22d3c1,_0x571a46){return{'message':_0x32f9a3,'unlock':_0x22d3c1,'active':_0x571a46};};exports[_0x7a46('0x12')]=function(_0x53fd6a,_0x5a50df,_0x46c5a3){if(!_[_0x7a46('0x13')](_0x46c5a3)&&'string'===typeof _0x46c5a3&&!_[_0x7a46('0x14')](_0x46c5a3)){if(!_['isUndefined'](_0x5a50df)&&_0x7a46('0x15')===typeof _0x5a50df&&!_[_0x7a46('0x14')](_0x5a50df)){return util['format'](_0x7a46('0x16'),_0x5a50df,_0x46c5a3);}return util['format'](_0x7a46('0x16'),_0x46c5a3,_0x46c5a3);}if(!_[_0x7a46('0x13')](_0x53fd6a)&&_0x7a46('0x15')===typeof _0x53fd6a&&!_[_0x7a46('0x14')](_0x53fd6a)){return _0x53fd6a;}return'\x22\x22\x20<>';};exports[_0x7a46('0x17')]=function(_0x1c3dae){if(_['isNil'](_0x1c3dae)){return![];}return _0x1c3dae;};exports[_0x7a46('0x18')]=function(_0x1e6887,_0x4a301b,_0x5c2c60,_0x2cb5b3,_0x1d5766,_0x234db3){var _0x23d54e={'XMD-QUEUE':_0x4a301b['Queue']?_0x4a301b[_0x7a46('0x19')][_0x7a46('0x1a')]:'','XMD-CALLERID':_0x2cb5b3,'XMD-CALLERID-PREVIEW':_0x234db3?util['format']('\x22%s\x22\x20<%s>',_0x234db3['calleridname'],_0x234db3[_0x7a46('0x1b')]):_0x2cb5b3,'XMD-DIALID':_0x1d5766,'XMD-CONTACTID':_0x4a301b[_0x7a46('0x1c')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x2cb5b3,'XMD-VOICEQUEUEID':_0x4a301b[_0x7a46('0x1d')],'XMD-DIALCHANNEL':_0x5c2c60,'XMD-DIALTIMEOUT':_0x1e6887['dialOriginateTimeout']||0x1e,'XMD-DIALOPTIONS':util[_0x7a46('0x1e')](_0x7a46('0x1f'),_0x1e6887['dialQueueProject2']?'g':'',_[_0x7a46('0x14')](_0x1e6887[_0x7a46('0x20')])?'':_0x7a46('0x21')),'XMD-DIALURL':_0x1e6887[_0x7a46('0x22')]||'','XMD-AGI':_0x1e6887[_0x7a46('0x23')]?util[_0x7a46('0x1e')](_0x7a46('0x24'),ipAgi,_0x1e6887['dialQueueProject']):_0x7a46('0x25'),'XMD-AGIAFTER':_0x1e6887[_0x7a46('0x26')]?util[_0x7a46('0x1e')](_0x7a46('0x24'),ipAgi,_0x1e6887[_0x7a46('0x26')]):_0x7a46('0x25'),'XMD-ORIGINATECALLERIDNUM':_0x234db3?_0x234db3[_0x7a46('0x27')]:'','XMD-ORIGINATECALLERIDNAME':_0x234db3?_0x234db3['originatecalleridname']:'','XMD-DESTINATION':_0x7a46('0x28')};if(!_[_0x7a46('0x14')](_0x1e6887[_0x7a46('0x20')])){_0x23d54e[util[_0x7a46('0x1e')]('%s',_0x7a46('0x29'))]=_0x1e6887['monitor_format'];_0x23d54e[util[_0x7a46('0x1e')]('%s','_XCALLY_MIXMONITOR_UNIQUEID')]=_0x1d5766;}if(_0x4a301b&&_0x4a301b['Contact']){for(var _0x29ac6a in _0x4a301b[_0x7a46('0x2a')]){if(_0x4a301b[_0x7a46('0x2a')][_0x7a46('0x2b')](_0x29ac6a)){if(!_[_0x7a46('0x2c')](_0x4a301b['Contact'][_0x29ac6a])&&_0x29ac6a!=='id'&&_0x29ac6a!=='tags'&&_0x29ac6a!==_0x7a46('0x2d')&&_0x29ac6a!==_0x7a46('0x2e')){_0x23d54e[util[_0x7a46('0x1e')]('%s%s',_0x7a46('0x2f'),_[_0x7a46('0x30')](_0x29ac6a))]=_0x4a301b[_0x7a46('0x2a')][_0x29ac6a];}}}}return _0x23d54e;};exports[_0x7a46('0x31')]=function(_0x21cea7){var _0x1fbf36={};for(var _0x321e18 in _0x21cea7){if(_0x21cea7[_0x7a46('0x2b')](_0x321e18)){_0x1fbf36[util[_0x7a46('0x1e')]('%s',_[_0x7a46('0x32')](_0x321e18))]=_0x21cea7[_0x321e18];}}return{'variables':_0x1fbf36};};exports[_0x7a46('0x33')]=function(_0x208ea0,_0x7c2014){if(!_[_0x7a46('0x2c')](_0x208ea0)){if(_0x208ea0[_0x7a46('0x2b')](_0x7a46('0x34'))){if(_0x208ea0['originated']>0x0){_0x208ea0['originated']-=0x1;}else{logger[_0x7a46('0xb')](_0x7a46('0x35'),_0x7c2014);}}}else{logger[_0x7a46('0xb')](_0x7a46('0x36'),_0x7c2014);}};exports['logBlacklist']=function(_0x1a0d6a){var _0x3e2a2f=moment()['format'](_0x7a46('0x37'));_0x1a0d6a[_0x7a46('0x38')]=0xd;_0x1a0d6a[_0x7a46('0x39')]='Blacklist';_0x1a0d6a['starttime']=_0x3e2a2f;_0x1a0d6a[_0x7a46('0x3a')]=_0x3e2a2f;_0x1a0d6a[_0x7a46('0x3b')]=_0x3e2a2f;};exports[_0x7a46('0x3c')]=function(_0x2d29c6,_0x1f034e,_0x3c5e23){var _0x3cfbb7=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x2d29c6[_0x7a46('0x38')]=_0x1f034e;_0x2d29c6[_0x7a46('0x39')]=_0x3c5e23;_0x2d29c6['responsetime']=_0x3cfbb7;_0x2d29c6[_0x7a46('0x3d')]=getSeconds(_0x2d29c6[_0x7a46('0x3a')],_0x2d29c6[_0x7a46('0x3e')]);};exports[_0x7a46('0x3f')]=function(_0x20500a,_0x3630a2,_0x7b67da){_0x20500a[_0x7a46('0x40')]=_0x3630a2;_0x20500a[_0x7a46('0x41')]=_0x7b67da;};exports['logCustomer']=function(_0x332ba0,_0x34c63e,_0x365867){var _0x21ba36=moment()[_0x7a46('0x1e')](_0x7a46('0x37'));_0x332ba0['state']=_0x34c63e;_0x332ba0[_0x7a46('0x39')]=_0x365867;_0x332ba0[_0x7a46('0x3a')]=_0x332ba0['responsetime']?_0x332ba0[_0x7a46('0x3a')]:_0x21ba36;_0x332ba0['endtime']=_0x332ba0[_0x7a46('0x3b')]?_0x332ba0[_0x7a46('0x3b')]:_0x21ba36;_0x332ba0[_0x7a46('0x3d')]=getSeconds(_0x332ba0[_0x7a46('0x3a')]||0x0,_0x332ba0[_0x7a46('0x3e')]||0x0);_0x332ba0[_0x7a46('0x42')]=_0x332ba0[_0x7a46('0x43')]?getSeconds(_0x332ba0['endtime'],_0x332ba0[_0x7a46('0x43')]):0x0;};exports[_0x7a46('0x44')]=function(_0x3b1206){return _0x3b1206==='Failure';};exports[_0x7a46('0x45')]=function(_0x21759c,_0xc563d8,_0x49faa4,_0x1b9dc0,_0x2a0bac){var _0x4719c0=_0x1b9dc0?_0x7a46('0x46'):_0x21759c['calleridname'];_0x4719c0=_0x2a0bac?'BOOKED':_0x4719c0;return{'actionid':_0x21759c[_0x7a46('0x47')],'action':_0x7a46('0x48'),'channel':_0x21759c[_0x7a46('0x49')],'callerid':util[_0x7a46('0x1e')]('\x22%s\x22\x20<%s>',_0x4719c0,_0x21759c[_0x7a46('0x1b')]),'Exten':_0x7a46('0x28'),'Context':_0x7a46('0x4a'),'Priority':'1','variable':_0x49faa4,'timeout':(_0xc563d8[_0x7a46('0x4b')]||0x1e)*0x3e8,'async':!![],'channelid':_0x21759c[_0x7a46('0x47')]};};exports['totalGlobal']=function(_0x3b8bc7){return _0x3b8bc7[_0x7a46('0x4c')]+_0x3b8bc7['countcongestionretry']+_0x3b8bc7[_0x7a46('0x4d')]+_0x3b8bc7['countagentrejectretry']+_0x3b8bc7['countnosuchnumberretry'];};exports[_0x7a46('0x4e')]=function(_0x54f129){var _0x586eaa=_[_0x7a46('0x4f')](_0x54f129);_0x586eaa[_0x7a46('0x38')]=0xf;_0x586eaa[_0x7a46('0x39')]=_0x7a46('0x50');return _0x586eaa;};exports[_0x7a46('0x51')]=function(_0x1bb3cb,_0xafef25,_0x31d265){var _0x596fbe={};_0x596fbe[_0xafef25]=_0x1bb3cb[_0xafef25];_0x596fbe[_0x7a46('0x52')]=![];_0x596fbe[_0x7a46('0x53')]=moment()[_0x7a46('0x54')](_0x31d265,_0x7a46('0x55'))[_0x7a46('0x1e')](_0x7a46('0x37'));_0x596fbe['ContactId']=_0x1bb3cb[_0x7a46('0x1c')];_0x596fbe[_0x7a46('0x56')]=_0x1bb3cb['ListId'];_0x596fbe['VoiceQueueId']=_0x1bb3cb[_0x7a46('0x1d')]||undefined;return _0x596fbe;};exports[_0x7a46('0x57')]=function(_0x5c0012,_0x21e263){if(!_[_0x7a46('0x2c')](_0x5c0012)){if(_0x5c0012[_0x7a46('0x58')]>0x0){_0x5c0012[_0x7a46('0x58')]-=0x1;}else{logger[_0x7a46('0xb')](_0x21e263,_0x7a46('0x59'));}}else{logger[_0x7a46('0xb')](_0x21e263,_0x7a46('0x5a'));}};exports[_0x7a46('0x5b')]=function(_0x135076){if(_0x135076<=0x0){return!![];}return![];};exports[_0x7a46('0x5c')]=function(_0x199ddd,_0x278315){_0x199ddd['lastevent']=_0x278315;_0x199ddd[_0x7a46('0x1a')]=_0x199ddd[_0x7a46('0x5d')];_0x199ddd[_0x7a46('0x5e')]=_0x199ddd[_0x7a46('0x49')];return _0x199ddd;};exports[_0x7a46('0x5f')]=function(_0x553869){var _0x266cb6={};_0x266cb6[_0x7a46('0x5d')]=_0x553869[_0x7a46('0x5d')];_0x266cb6['interface']=_0x553869[_0x7a46('0x49')];_0x266cb6[_0x7a46('0x47')]=_0x553869['uniqueid'];return _0x266cb6;};exports[_0x7a46('0x60')]=function(_0x10607a){var _0x2a2f66=[];for(var _0x39c878 in _0x10607a){if(_0x10607a[_0x7a46('0x2b')](_0x39c878)){if(!_['isNil'](_0x10607a[_0x39c878])&&_0x10607a[_0x39c878][_0x7a46('0x38')]===_0x7a46('0x61')&&_0x10607a[_0x39c878][_0x7a46('0x62')]==='reachable'){_0x2a2f66['push'](_0x10607a[_0x39c878]['id']);}}}return _0x2a2f66;};exports[_0x7a46('0x63')]=function(_0x1546c1){var _0x33b0ea=moment()[_0x7a46('0x8')](0x0);var _0x1eebc8=moment(_0x1546c1)[_0x7a46('0x8')](0x0);return _0x33b0ea[_0x7a46('0x9')](_0x1eebc8,_0x7a46('0xa'));};exports['createBody']=function(_0x20225b){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x20225b['ContactId'],'ListId':_0x20225b['ListId'],'VoiceQueueId':_0x20225b['VoiceQueueId']||undefined,'CampaignId':_0x20225b['CampaignId']||undefined};};exports[_0x7a46('0x64')]=function(_0x385da9){if(_0x385da9===_0x7a46('0x47')||_0x385da9===_0x7a46('0x65')||_0x385da9==='queue'||_0x385da9===_0x7a46('0x66')||_0x385da9===_0x7a46('0x67')||_0x385da9===_0x7a46('0x68')||_0x385da9===_0x7a46('0x40')||_0x385da9===_0x7a46('0x49')||_0x385da9==='calleridname'||_0x385da9===_0x7a46('0x52')||_0x385da9===_0x7a46('0x1b')||_0x385da9===_0x7a46('0x53')||_0x385da9===_0x7a46('0x4c')||_0x385da9===_0x7a46('0x69')||_0x385da9===_0x7a46('0x4d')||_0x385da9==='countglobal'||_0x385da9==='callback'||_0x385da9===_0x7a46('0x6a')||_0x385da9===_0x7a46('0x6b')||_0x385da9===_0x7a46('0x6c')||_0x385da9===_0x7a46('0x1c')||_0x385da9===_0x7a46('0x56')||_0x385da9===_0x7a46('0x41')||_0x385da9==='VoiceQueueId'||_0x385da9===_0x7a46('0x6d')||_0x385da9==='xmd-voicequeueid'||_0x385da9===_0x7a46('0x6e')||_0x385da9===_0x7a46('0x6f')||_0x385da9===_0x7a46('0x70')||_0x385da9==='xmd-dialurl'||_0x385da9===_0x7a46('0x71')||_0x385da9===_0x7a46('0x72')||_0x385da9===_0x7a46('0x73')||_0x385da9===_0x7a46('0x74')||_0x385da9===_0x7a46('0x75')||_0x385da9===_0x7a46('0x76')||_0x385da9===_0x7a46('0x77')||_0x385da9===_0x7a46('0x78')||_0x385da9===_0x7a46('0x79')||_0x385da9==='rtpaudioqos'||_0x385da9===_0x7a46('0x7a')||_0x385da9===_0x7a46('0x7b')||_0x385da9===_0x7a46('0x7c')||_0x385da9===_0x7a46('0x7d')||_0x385da9==='rtpaudioqoslossbridged'||_0x385da9===_0x7a46('0x7e')||_0x385da9==='rtpaudioqosrttbridged'||_0x385da9===_0x7a46('0x7f')||_0x385da9===_0x7a46('0x7a')||_0x385da9===_0x7a46('0x7b')||_0x385da9===_0x7a46('0x7c')||_0x385da9===_0x7a46('0x7d')||_0x385da9===_0x7a46('0x80')||_0x385da9===_0x7a46('0x7e')||_0x385da9==='rtpaudioqosrttbridged'||_0x385da9===_0x7a46('0x81')||_0x385da9==='bridgepvtcallid'||_0x385da9===_0x7a46('0x38')||_0x385da9===_0x7a46('0x39')){return![];}return!![];};exports['getCallerIdRandom']=function(_0x50a2fd,_0x1ede39){var _0x5488fb,_0x1df69d,_0x4c4460;if(_0x1ede39<=0x0){_0x1ede39=0x1;}_0x5488fb=new RegExp(_0x7a46('0x82')+_0x1ede39+'}$');_0x1df69d=Math[_0x7a46('0x83')](0xa,_0x1ede39-0x1);_0x4c4460=Math[_0x7a46('0x83')](0xa,_0x1ede39)-0x1;return util['format']('%s',_[_0x7a46('0x84')](_0x50a2fd,_0x5488fb,_[_0x7a46('0x85')](_0x1df69d,_0x4c4460)));};exports[_0x7a46('0x86')]=function(_0x41f386){var _0x336bee=_0x41f386['match'](/"(.*?)"/);return _0x336bee?_0x336bee[0x1]:_0x41f386;};exports[_0x7a46('0x87')]=function(_0x3b5676){var _0x2fe218=_0x3b5676[_0x7a46('0x88')](/<(.*?)>/);return _0x2fe218?_0x2fe218[0x1]:_0x3b5676;};
\ No newline at end of file
+var _0xa76e=['seconds','inspect','logger','info','error','message','isEmpty','isUndefined','string','\x22%s\x22\x20<%s>','format','isNil','Queue','name','calleridnum','ContactId','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','NONE','dialQueueProject2','\x22agi://%s/square,%s\x22','originatecalleridnum','originatecalleridname','xcally-motion-preview','Call-Type:\x20PREVIEW','monitor_format','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','createdAt','updatedAt','%s%s','XMD-','toUpper','toLowerVariables','hasOwnProperty','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','Blacklist','starttime','responsetime','endtime','ringtime','logLookAgent','membername','UserId','logCustomer','talktime','answertime','isFailure','Failure','variablesAction','RECALL','BOOKED','uniqueid','originate','timeout','totalGlobal','countbusyretry','countcongestionretry','countagentrejectretry','countnosuchnumberretry','clone','Global','active','minutes','ListId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','buildObj','lastevent','queue','interface','motionChannel','mandatoryDisposition','buildAcw','reachable','getDiff','createBody','filterKey','campaigntype','dialAnswer','channelAgent','calleridname','scheduledat','countglobal','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-voicequeueid','xmd-queue','xmd-phone','xmd-listid','xmd-dialoptions','xmd-dialid','xmd-cdrtype','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqoslossbridged','bridgepeer','bridgepvtcallid','pow','replace','random','match','util','../../../../config/logger','preview','XCALLY_IP_AGI','127.0.0.1','milliseconds'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xa76e,0x7d));var _0xea76=function(_0x3cc9d9,_0x69ed38){_0x3cc9d9=_0x3cc9d9-0x0;var _0x1a425d=_0xa76e[_0x3cc9d9];return _0x1a425d;};'use strict';var util=require(_0xea76('0x0'));var _=require('lodash');var moment=require('moment');var logger=require(_0xea76('0x1'))(_0xea76('0x2'));var ipAgi=process['env'][_0xea76('0x3')]||_0xea76('0x4');function getSeconds(_0x4cab3b,_0xcb85a6){var _0x37d587=moment(_0x4cab3b)[_0xea76('0x5')](0x0);var _0x29306d=moment(_0xcb85a6)['milliseconds'](0x0);return _0x37d587['diff'](_0x29306d,_0xea76('0x6'));}exports['loggerCatch']=function(_0x198e9b){return function(_0x340230){logger['error'](_0x198e9b,util[_0xea76('0x7')](_0x340230,{'showHidden':![],'depth':null}));};};exports[_0xea76('0x8')]=function(_0x5c4fde,_0x35682c){logger[_0xea76('0x9')](_0x5c4fde,util['inspect'](_0x35682c,{'showHidden':![],'depth':null}));};exports['loggerError']=function(_0x268c94,_0x7bd8bf){logger[_0xea76('0xa')](_0x268c94,util[_0xea76('0x7')](_0x7bd8bf,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0x272cf0){return function(_0x27fe4d){logger[_0xea76('0x9')](_0x272cf0,util['inspect'](_0x27fe4d,{'showHidden':![],'depth':null}));};};exports[_0xea76('0xb')]=function(_0x229497,_0x3c46,_0x4ea833){return{'message':_0x229497,'unlock':_0x3c46,'active':_0x4ea833};};exports['getCallerId']=function(_0x1beb23,_0x470c4b,_0x3f8937){if(!_['isUndefined'](_0x3f8937)&&'string'===typeof _0x3f8937&&!_[_0xea76('0xc')](_0x3f8937)){if(!_[_0xea76('0xd')](_0x470c4b)&&_0xea76('0xe')===typeof _0x470c4b&&!_[_0xea76('0xc')](_0x470c4b)){return util['format'](_0xea76('0xf'),_0x470c4b,_0x3f8937);}return util[_0xea76('0x10')](_0xea76('0xf'),_0x3f8937,_0x3f8937);}if(!_['isUndefined'](_0x1beb23)&&_0xea76('0xe')===typeof _0x1beb23&&!_['isEmpty'](_0x1beb23)){return _0x1beb23;}return'\x22\x22\x20<>';};exports['isActive']=function(_0x1db1ab){if(_[_0xea76('0x11')](_0x1db1ab)){return![];}return _0x1db1ab;};exports['addVariables']=function(_0x25a1a8,_0x46f91f,_0x33cb12,_0x476ea8,_0x2cda79,_0x332650){var _0xba5e48={'XMD-QUEUE':_0x46f91f[_0xea76('0x12')]?_0x46f91f[_0xea76('0x12')][_0xea76('0x13')]:'','XMD-CALLERID':_0x476ea8,'XMD-CALLERID-PREVIEW':_0x332650?util[_0xea76('0x10')](_0xea76('0xf'),_0x332650['calleridname'],_0x332650[_0xea76('0x14')]):_0x476ea8,'XMD-DIALID':_0x2cda79,'XMD-CONTACTID':_0x46f91f[_0xea76('0x15')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x476ea8,'XMD-VOICEQUEUEID':_0x46f91f[_0xea76('0x16')],'XMD-DIALCHANNEL':_0x33cb12,'XMD-DIALTIMEOUT':_0x25a1a8[_0xea76('0x17')]||0x1e,'XMD-DIALOPTIONS':util[_0xea76('0x10')](_0xea76('0x18'),_0x25a1a8['dialQueueProject2']?'g':'',_[_0xea76('0xc')](_0x25a1a8['monitor_format'])?'':_0xea76('0x19')),'XMD-DIALURL':_0x25a1a8[_0xea76('0x1a')]||'','XMD-AGI':_0x25a1a8[_0xea76('0x1b')]?util[_0xea76('0x10')]('\x22agi://%s/square,%s\x22',ipAgi,_0x25a1a8['dialQueueProject']):_0xea76('0x1c'),'XMD-AGIAFTER':_0x25a1a8[_0xea76('0x1d')]?util[_0xea76('0x10')](_0xea76('0x1e'),ipAgi,_0x25a1a8[_0xea76('0x1d')]):_0xea76('0x1c'),'XMD-ORIGINATECALLERIDNUM':_0x332650?_0x332650[_0xea76('0x1f')]:'','XMD-ORIGINATECALLERIDNAME':_0x332650?_0x332650[_0xea76('0x20')]:'','XMD-DESTINATION':_0xea76('0x21'),'SIPADDHEADER':_0xea76('0x22')};if(!_[_0xea76('0xc')](_0x25a1a8[_0xea76('0x23')])){_0xba5e48[util[_0xea76('0x10')]('%s',_0xea76('0x24'))]=_0x25a1a8[_0xea76('0x23')];_0xba5e48[util[_0xea76('0x10')]('%s',_0xea76('0x25'))]=_0x2cda79;}if(_0x46f91f&&_0x46f91f[_0xea76('0x26')]){for(var _0x55de97 in _0x46f91f[_0xea76('0x26')]){if(_0x46f91f[_0xea76('0x26')]['hasOwnProperty'](_0x55de97)){if(!_[_0xea76('0x11')](_0x46f91f[_0xea76('0x26')][_0x55de97])&&_0x55de97!=='id'&&_0x55de97!=='tags'&&_0x55de97!==_0xea76('0x27')&&_0x55de97!==_0xea76('0x28')){_0xba5e48[util[_0xea76('0x10')](_0xea76('0x29'),_0xea76('0x2a'),_[_0xea76('0x2b')](_0x55de97))]=_0x46f91f[_0xea76('0x26')][_0x55de97];}}}}return _0xba5e48;};exports[_0xea76('0x2c')]=function(_0x1514fe){var _0xde3893={};for(var _0x59ea58 in _0x1514fe){if(_0x1514fe[_0xea76('0x2d')](_0x59ea58)){_0xde3893[util[_0xea76('0x10')]('%s',_['toLower'](_0x59ea58))]=_0x1514fe[_0x59ea58];}}return{'variables':_0xde3893};};exports[_0xea76('0x2e')]=function(_0xa7eb20,_0x164be6){if(!_[_0xea76('0x11')](_0xa7eb20)){if(_0xa7eb20[_0xea76('0x2d')](_0xea76('0x2f'))){if(_0xa7eb20['originated']>0x0){_0xa7eb20[_0xea76('0x2f')]-=0x1;}else{logger[_0xea76('0xa')](_0xea76('0x30'),_0x164be6);}}}else{logger[_0xea76('0xa')](_0xea76('0x31'),_0x164be6);}};exports[_0xea76('0x32')]=function(_0x5b8307){var _0x17107f=moment()[_0xea76('0x10')](_0xea76('0x33'));_0x5b8307[_0xea76('0x34')]=0xd;_0x5b8307[_0xea76('0x35')]=_0xea76('0x36');_0x5b8307[_0xea76('0x37')]=_0x17107f;_0x5b8307[_0xea76('0x38')]=_0x17107f;_0x5b8307[_0xea76('0x39')]=_0x17107f;};exports['logAgent']=function(_0x3d827b,_0x2e9e6b,_0x15d744){var _0x56de60=moment()[_0xea76('0x10')](_0xea76('0x33'));_0x3d827b[_0xea76('0x34')]=_0x2e9e6b;_0x3d827b[_0xea76('0x35')]=_0x15d744;_0x3d827b[_0xea76('0x38')]=_0x56de60;_0x3d827b[_0xea76('0x3a')]=getSeconds(_0x3d827b[_0xea76('0x38')],_0x3d827b[_0xea76('0x37')]);};exports[_0xea76('0x3b')]=function(_0x1a4f4b,_0x171467,_0x726278){_0x1a4f4b[_0xea76('0x3c')]=_0x171467;_0x1a4f4b[_0xea76('0x3d')]=_0x726278;};exports[_0xea76('0x3e')]=function(_0x3cd051,_0x5e20ce,_0xf98cff){var _0x48c9bb=moment()[_0xea76('0x10')]('YYYY-MM-DD\x20HH:mm:ss');_0x3cd051[_0xea76('0x34')]=_0x5e20ce;_0x3cd051['statedesc']=_0xf98cff;_0x3cd051['responsetime']=_0x3cd051[_0xea76('0x38')]?_0x3cd051[_0xea76('0x38')]:_0x48c9bb;_0x3cd051[_0xea76('0x39')]=_0x3cd051[_0xea76('0x39')]?_0x3cd051[_0xea76('0x39')]:_0x48c9bb;_0x3cd051[_0xea76('0x3a')]=getSeconds(_0x3cd051[_0xea76('0x38')]||0x0,_0x3cd051[_0xea76('0x37')]||0x0);_0x3cd051[_0xea76('0x3f')]=_0x3cd051[_0xea76('0x40')]?getSeconds(_0x3cd051[_0xea76('0x39')],_0x3cd051[_0xea76('0x40')]):0x0;};exports[_0xea76('0x41')]=function(_0x104b68){return _0x104b68===_0xea76('0x42');};exports[_0xea76('0x43')]=function(_0x116a90,_0x30c495,_0xa5466d,_0x3a6325,_0x31bbc6){var _0x5cff26=_0x3a6325?_0xea76('0x44'):_0x116a90['calleridname'];_0x5cff26=_0x31bbc6?_0xea76('0x45'):_0x5cff26;return{'actionid':_0x116a90[_0xea76('0x46')],'action':_0xea76('0x47'),'channel':_0x116a90['channelAgent'],'callerid':util[_0xea76('0x10')]('\x22%s\x22\x20<%s>',_0x5cff26,_0x116a90['calleridnum']),'Exten':'xcally-motion-preview','Context':'from-sip','Priority':'1','variable':_0xa5466d,'timeout':(_0x30c495[_0xea76('0x48')]||0x1e)*0x3e8,'async':!![],'channelid':_0x116a90['uniqueid']};};exports[_0xea76('0x49')]=function(_0x54f06e){return _0x54f06e[_0xea76('0x4a')]+_0x54f06e[_0xea76('0x4b')]+_0x54f06e['countnoanswerretry']+_0x54f06e[_0xea76('0x4c')]+_0x54f06e[_0xea76('0x4d')];};exports['cloneAction']=function(_0x2520d6){var _0x51a9d7=_[_0xea76('0x4e')](_0x2520d6);_0x51a9d7['state']=0xf;_0x51a9d7[_0xea76('0x35')]=_0xea76('0x4f');return _0x51a9d7;};exports['scheduledAt']=function(_0x28591a,_0x29d5b2,_0x1c7c4f){var _0xdebe71={};_0xdebe71[_0x29d5b2]=_0x28591a[_0x29d5b2];_0xdebe71[_0xea76('0x50')]=![];_0xdebe71['scheduledat']=moment()['add'](_0x1c7c4f,_0xea76('0x51'))['format'](_0xea76('0x33'));_0xdebe71[_0xea76('0x15')]=_0x28591a['ContactId'];_0xdebe71[_0xea76('0x52')]=_0x28591a['ListId'];_0xdebe71['VoiceQueueId']=_0x28591a[_0xea76('0x16')]||undefined;return _0xdebe71;};exports[_0xea76('0x53')]=function(_0x6de40c,_0x364ad2){if(!_[_0xea76('0x11')](_0x6de40c)){if(_0x6de40c[_0xea76('0x54')]>0x0){_0x6de40c[_0xea76('0x54')]-=0x1;}else{logger['error'](_0x364ad2,_0xea76('0x55'));}}else{logger['error'](_0x364ad2,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0xea76('0x56')]=function(_0x384c33){if(_0x384c33<=0x0){return!![];}return![];};exports[_0xea76('0x57')]=function(_0x448364,_0x5a7ec8,_0x1a46b6){_0x448364[_0xea76('0x58')]=_0x5a7ec8;_0x448364[_0xea76('0x13')]=_0x448364[_0xea76('0x59')];_0x448364[_0xea76('0x5a')]=_0x448364['channelAgent'];_0x448364[_0xea76('0x5b')]='voice';if(_0x1a46b6){_0x448364[_0xea76('0x5c')]=_0x1a46b6['mandatoryDisposition'];}return _0x448364;};exports[_0xea76('0x5d')]=function(_0x5e1d97){var _0x4adb64={};_0x4adb64['queue']=_0x5e1d97[_0xea76('0x59')];_0x4adb64[_0xea76('0x5a')]=_0x5e1d97['channelAgent'];_0x4adb64[_0xea76('0x46')]=_0x5e1d97['uniqueid'];return _0x4adb64;};exports['agentReadyId']=function(_0x2030d0){var _0x5173f6=[];for(var _0x57be01 in _0x2030d0){if(_0x2030d0[_0xea76('0x2d')](_0x57be01)){if(!_[_0xea76('0x11')](_0x2030d0[_0x57be01])&&_0x2030d0[_0x57be01][_0xea76('0x34')]==='not_inuse'&&_0x2030d0[_0x57be01]['status']===_0xea76('0x5e')){_0x5173f6['push'](_0x2030d0[_0x57be01]['id']);}}}return _0x5173f6;};exports[_0xea76('0x5f')]=function(_0x5583a6){var _0x213087=moment()['milliseconds'](0x0);var _0x1a0ac5=moment(_0x5583a6)[_0xea76('0x5')](0x0);return _0x213087['diff'](_0x1a0ac5,'seconds');};exports[_0xea76('0x60')]=function(_0x207a4a){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x207a4a[_0xea76('0x15')],'ListId':_0x207a4a[_0xea76('0x52')],'VoiceQueueId':_0x207a4a[_0xea76('0x16')]||undefined,'CampaignId':_0x207a4a['CampaignId']||undefined};};exports[_0xea76('0x61')]=function(_0x1339da){if(_0x1339da===_0xea76('0x46')||_0x1339da==='idContact'||_0x1339da===_0xea76('0x59')||_0x1339da==='type'||_0x1339da===_0xea76('0x62')||_0x1339da===_0xea76('0x63')||_0x1339da===_0xea76('0x3c')||_0x1339da===_0xea76('0x64')||_0x1339da===_0xea76('0x65')||_0x1339da===_0xea76('0x50')||_0x1339da===_0xea76('0x14')||_0x1339da===_0xea76('0x66')||_0x1339da===_0xea76('0x4a')||_0x1339da===_0xea76('0x4b')||_0x1339da==='countnoanswerretry'||_0x1339da===_0xea76('0x67')||_0x1339da===_0xea76('0x68')||_0x1339da===_0xea76('0x69')||_0x1339da===_0xea76('0x6a')||_0x1339da===_0xea76('0x6b')||_0x1339da===_0xea76('0x15')||_0x1339da==='ListId'||_0x1339da===_0xea76('0x3d')||_0x1339da===_0xea76('0x16')||_0x1339da===_0xea76('0x6c')||_0x1339da===_0xea76('0x6d')||_0x1339da===_0xea76('0x6e')||_0x1339da===_0xea76('0x6f')||_0x1339da===_0xea76('0x70')||_0x1339da==='xmd-dialurl'||_0x1339da==='xmd-dialtimeout'||_0x1339da===_0xea76('0x71')||_0x1339da===_0xea76('0x72')||_0x1339da==='xmd-dialchannel'||_0x1339da==='xmd-contactid'||_0x1339da===_0xea76('0x73')||_0x1339da==='xmd-callerid'||_0x1339da==='xmd-agiafter'||_0x1339da===_0xea76('0x74')||_0x1339da===_0xea76('0x75')||_0x1339da===_0xea76('0x76')||_0x1339da===_0xea76('0x77')||_0x1339da===_0xea76('0x78')||_0x1339da===_0xea76('0x79')||_0x1339da==='rtpaudioqoslossbridged'||_0x1339da===_0xea76('0x7a')||_0x1339da===_0xea76('0x7b')||_0x1339da===_0xea76('0x75')||_0x1339da===_0xea76('0x76')||_0x1339da===_0xea76('0x77')||_0x1339da===_0xea76('0x78')||_0x1339da===_0xea76('0x79')||_0x1339da===_0xea76('0x7c')||_0x1339da==='rtpaudioqosrtt'||_0x1339da==='rtpaudioqosrttbridged'||_0x1339da===_0xea76('0x7d')||_0x1339da===_0xea76('0x7e')||_0x1339da===_0xea76('0x34')||_0x1339da==='statedesc'){return![];}return!![];};exports['getCallerIdRandom']=function(_0x10bd81,_0x979449){var _0x28a40a,_0x1aebf8,_0x369e93;if(_0x979449<=0x0){_0x979449=0x1;}_0x28a40a=new RegExp('\x5cw{0,'+_0x979449+'}$');_0x1aebf8=Math[_0xea76('0x7f')](0xa,_0x979449-0x1);_0x369e93=Math[_0xea76('0x7f')](0xa,_0x979449)-0x1;return util['format']('%s',_[_0xea76('0x80')](_0x10bd81,_0x28a40a,_[_0xea76('0x81')](_0x1aebf8,_0x369e93)));};exports['extractCalleridName']=function(_0x1b3bbe){var _0x1bb353=_0x1b3bbe[_0xea76('0x82')](/"(.*?)"/);return _0x1bb353?_0x1bb353[0x1]:_0x1b3bbe;};exports['extractCalleridNumber']=function(_0x2416eb){var _0x5f0790=_0x2416eb['match'](/<(.*?)>/);return _0x5f0790?_0x5f0790[0x1]:_0x2416eb;};
\ No newline at end of file