Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / services / ami / preview / util / util.js
index 5299c83..c81b0eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4643=['loggerCatch','error','logger','info','loggerError','inspect','logger2','message','getCallerId','isUndefined','isEmpty','\x22%s\x22\x20<%s>','format','string','\x22\x22\x20<>','isActive','isNil','addVariables','Queue','calleridname','calleridnum','ContactId','dialer','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridnum','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','updatedAt','%s%s','XMD-','toUpper','toLower','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','state','statedesc','starttime','endtime','YYYY-MM-DD\x20HH:mm:ss','responsetime','logLookAgent','ringtime','talktime','answertime','isFailure','Failure','variablesAction','RECALL','BOOKED','uniqueid','channelAgent','xcally-motion-preview','from-sip','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','clone','Global','active','scheduledat','add','minutes','ListId','decrementTalkink','pTalking','buildObj','name','queue','mandatoryDisposition','buildAcw','interface','agentReadyId','not_inuse','status','push','createBody','CampaignId','filterKey','idContact','type','campaigntype','dialAnswer','membername','callback','callbackuniqueid','callbackat','UserId','sipcallid','xmd-phone','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialchannel','xmd-cdrtype','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqos','bridgepeer','bridgepvtcallid','getCallerIdRandom','\x5cw{0,','pow','replace','extractCalleridName','match','extractCalleridNumber','util','../../../../config/logger','preview','XCALLY_IP_AGI','127.0.0.1','milliseconds','diff','seconds'];(function(_0x5511a4,_0xb62bf3){var _0x8563aa=function(_0x5104bf){while(--_0x5104bf){_0x5511a4['push'](_0x5511a4['shift']());}};_0x8563aa(++_0xb62bf3);}(_0x4643,0x10a));var _0x3464=function(_0x51020b,_0x38c2c7){_0x51020b=_0x51020b-0x0;var _0x371e47=_0x4643[_0x51020b];return _0x371e47;};'use strict';var util=require(_0x3464('0x0'));var _=require('lodash');var moment=require('moment');var logger=require(_0x3464('0x1'))(_0x3464('0x2'));var ipAgi=process['env'][_0x3464('0x3')]||_0x3464('0x4');function getSeconds(_0x36b67e,_0x21bf34){var _0x475dd7=moment(_0x36b67e)[_0x3464('0x5')](0x0);var _0x132c98=moment(_0x21bf34)[_0x3464('0x5')](0x0);return _0x475dd7[_0x3464('0x6')](_0x132c98,_0x3464('0x7'));}exports[_0x3464('0x8')]=function(_0x7d543f){return function(_0x4bafb0){logger[_0x3464('0x9')](_0x7d543f,util['inspect'](_0x4bafb0,{'showHidden':![],'depth':null}));};};exports[_0x3464('0xa')]=function(_0x2d62eb,_0x297efe){logger[_0x3464('0xb')](_0x2d62eb,util['inspect'](_0x297efe,{'showHidden':![],'depth':null}));};exports[_0x3464('0xc')]=function(_0xfc7797,_0x13fcc5){logger[_0x3464('0x9')](_0xfc7797,util[_0x3464('0xd')](_0x13fcc5,{'showHidden':![],'depth':null}));};exports[_0x3464('0xe')]=function(_0xcf7409){return function(_0x1ec329){logger[_0x3464('0xb')](_0xcf7409,util['inspect'](_0x1ec329,{'showHidden':![],'depth':null}));};};exports[_0x3464('0xf')]=function(_0x1db374,_0x5beb82,_0x5730f9){return{'message':_0x1db374,'unlock':_0x5beb82,'active':_0x5730f9};};exports[_0x3464('0x10')]=function(_0x15aef9,_0x321a6c,_0x7d05e0){if(!_[_0x3464('0x11')](_0x7d05e0)&&'string'===typeof _0x7d05e0&&!_[_0x3464('0x12')](_0x7d05e0)){if(!_[_0x3464('0x11')](_0x321a6c)&&'string'===typeof _0x321a6c&&!_[_0x3464('0x12')](_0x321a6c)){return util['format'](_0x3464('0x13'),_0x321a6c,_0x7d05e0);}return util[_0x3464('0x14')](_0x3464('0x13'),_0x7d05e0,_0x7d05e0);}if(!_[_0x3464('0x11')](_0x15aef9)&&_0x3464('0x15')===typeof _0x15aef9&&!_[_0x3464('0x12')](_0x15aef9)){return _0x15aef9;}return _0x3464('0x16');};exports[_0x3464('0x17')]=function(_0x1b3ed5){if(_[_0x3464('0x18')](_0x1b3ed5)){return![];}return _0x1b3ed5;};exports[_0x3464('0x19')]=function(_0xc6a699,_0x373cd3,_0x2119f3,_0x457a4a,_0x502873,_0x2fd518){var _0x2a1d5a={'XMD-QUEUE':_0x373cd3[_0x3464('0x1a')]?_0x373cd3[_0x3464('0x1a')]['name']:'','XMD-CALLERID':_0x457a4a,'XMD-CALLERID-PREVIEW':_0x2fd518?util[_0x3464('0x14')](_0x3464('0x13'),_0x2fd518[_0x3464('0x1b')],_0x2fd518[_0x3464('0x1c')]):_0x457a4a,'XMD-DIALID':_0x502873,'XMD-CONTACTID':_0x373cd3[_0x3464('0x1d')],'XMD-CDRTYPE':_0x3464('0x1e'),'CALLERID(all)':_0x457a4a,'XMD-VOICEQUEUEID':_0x373cd3[_0x3464('0x1f')],'XMD-DIALCHANNEL':_0x2119f3,'XMD-DIALTIMEOUT':_0xc6a699[_0x3464('0x20')]||0x1e,'XMD-DIALOPTIONS':util[_0x3464('0x14')](_0x3464('0x21'),_0xc6a699[_0x3464('0x22')]?'g':'',_[_0x3464('0x12')](_0xc6a699[_0x3464('0x23')])?'':_0x3464('0x24')),'XMD-DIALURL':_0xc6a699[_0x3464('0x25')]||'','XMD-AGI':_0xc6a699[_0x3464('0x26')]?util[_0x3464('0x14')](_0x3464('0x27'),ipAgi,_0xc6a699[_0x3464('0x26')]):'NONE','XMD-AGIAFTER':_0xc6a699['dialQueueProject2']?util[_0x3464('0x14')](_0x3464('0x27'),ipAgi,_0xc6a699['dialQueueProject2']):_0x3464('0x28'),'XMD-ORIGINATECALLERIDNUM':_0x2fd518?_0x2fd518[_0x3464('0x29')]:'','XMD-ORIGINATECALLERIDNAME':_0x2fd518?_0x2fd518['originatecalleridname']:'','XMD-DESTINATION':'xcally-motion-preview'};if(!_[_0x3464('0x12')](_0xc6a699['monitor_format'])){_0x2a1d5a[util[_0x3464('0x14')]('%s',_0x3464('0x2a'))]=_0xc6a699['monitor_format'];_0x2a1d5a[util[_0x3464('0x14')]('%s',_0x3464('0x2b'))]=_0x502873;}if(_0x373cd3&&_0x373cd3[_0x3464('0x2c')]){for(var _0x112100 in _0x373cd3[_0x3464('0x2c')]){if(_0x373cd3[_0x3464('0x2c')][_0x3464('0x2d')](_0x112100)){if(!_[_0x3464('0x18')](_0x373cd3[_0x3464('0x2c')][_0x112100])&&_0x112100!=='id'&&_0x112100!=='tags'&&_0x112100!=='createdAt'&&_0x112100!==_0x3464('0x2e')){_0x2a1d5a[util[_0x3464('0x14')](_0x3464('0x2f'),_0x3464('0x30'),_[_0x3464('0x31')](_0x112100))]=_0x373cd3[_0x3464('0x2c')][_0x112100];}}}}return _0x2a1d5a;};exports['toLowerVariables']=function(_0x1ccb53){var _0x578a3d={};for(var _0x4e91e6 in _0x1ccb53){if(_0x1ccb53['hasOwnProperty'](_0x4e91e6)){_0x578a3d[util[_0x3464('0x14')]('%s',_[_0x3464('0x32')](_0x4e91e6))]=_0x1ccb53[_0x4e91e6];}}return{'variables':_0x578a3d};};exports['updateOriginated']=function(_0xc00212,_0x6674dd){if(!_[_0x3464('0x18')](_0xc00212)){if(_0xc00212[_0x3464('0x2d')]('originated')){if(_0xc00212[_0x3464('0x33')]>0x0){_0xc00212[_0x3464('0x33')]-=0x1;}else{logger[_0x3464('0x9')](_0x3464('0x34'),_0x6674dd);}}}else{logger[_0x3464('0x9')](_0x3464('0x35'),_0x6674dd);}};exports[_0x3464('0x36')]=function(_0x1faec6){var _0x13f416=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x1faec6[_0x3464('0x37')]=0xd;_0x1faec6[_0x3464('0x38')]='Blacklist';_0x1faec6[_0x3464('0x39')]=_0x13f416;_0x1faec6['responsetime']=_0x13f416;_0x1faec6[_0x3464('0x3a')]=_0x13f416;};exports['logAgent']=function(_0x15aedf,_0xca8288,_0x485e25){var _0x1a662b=moment()[_0x3464('0x14')](_0x3464('0x3b'));_0x15aedf['state']=_0xca8288;_0x15aedf[_0x3464('0x38')]=_0x485e25;_0x15aedf[_0x3464('0x3c')]=_0x1a662b;_0x15aedf['ringtime']=getSeconds(_0x15aedf[_0x3464('0x3c')],_0x15aedf[_0x3464('0x39')]);};exports[_0x3464('0x3d')]=function(_0x2cb02a,_0x29d4e4,_0x5727b8){_0x2cb02a['membername']=_0x29d4e4;_0x2cb02a['UserId']=_0x5727b8;};exports['logCustomer']=function(_0x256765,_0x58374a,_0x4cdf1d){var _0x1fdfff=moment()[_0x3464('0x14')](_0x3464('0x3b'));_0x256765['state']=_0x58374a;_0x256765[_0x3464('0x38')]=_0x4cdf1d;_0x256765['responsetime']=_0x256765[_0x3464('0x3c')]?_0x256765[_0x3464('0x3c')]:_0x1fdfff;_0x256765[_0x3464('0x3a')]=_0x256765[_0x3464('0x3a')]?_0x256765[_0x3464('0x3a')]:_0x1fdfff;_0x256765[_0x3464('0x3e')]=getSeconds(_0x256765[_0x3464('0x3c')]||0x0,_0x256765[_0x3464('0x39')]||0x0);_0x256765[_0x3464('0x3f')]=_0x256765[_0x3464('0x40')]?getSeconds(_0x256765[_0x3464('0x3a')],_0x256765[_0x3464('0x40')]):0x0;};exports[_0x3464('0x41')]=function(_0x19b651){return _0x19b651===_0x3464('0x42');};exports[_0x3464('0x43')]=function(_0x380223,_0x3e518e,_0x33dba2,_0x19568a,_0x502763){var _0x53f184=_0x19568a?_0x3464('0x44'):_0x380223['calleridname'];_0x53f184=_0x502763?_0x3464('0x45'):_0x53f184;return{'actionid':_0x380223[_0x3464('0x46')],'action':'originate','channel':_0x380223[_0x3464('0x47')],'callerid':util['format'](_0x3464('0x13'),_0x53f184,_0x380223[_0x3464('0x1c')]),'Exten':_0x3464('0x48'),'Context':_0x3464('0x49'),'Priority':'1','variable':_0x33dba2,'timeout':(_0x3e518e['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x380223[_0x3464('0x46')]};};exports['totalGlobal']=function(_0x428bcf){return _0x428bcf[_0x3464('0x4a')]+_0x428bcf[_0x3464('0x4b')]+_0x428bcf[_0x3464('0x4c')]+_0x428bcf['countagentrejectretry']+_0x428bcf[_0x3464('0x4d')];};exports['cloneAction']=function(_0x1f4509){var _0x2c7931=_[_0x3464('0x4e')](_0x1f4509);_0x2c7931[_0x3464('0x37')]=0xf;_0x2c7931[_0x3464('0x38')]=_0x3464('0x4f');return _0x2c7931;};exports['scheduledAt']=function(_0x253751,_0x42eab5,_0xb081cc){var _0x2c481e={};_0x2c481e[_0x42eab5]=_0x253751[_0x42eab5];_0x2c481e[_0x3464('0x50')]=![];_0x2c481e[_0x3464('0x51')]=moment()[_0x3464('0x52')](_0xb081cc,_0x3464('0x53'))['format'](_0x3464('0x3b'));_0x2c481e[_0x3464('0x1d')]=_0x253751[_0x3464('0x1d')];_0x2c481e[_0x3464('0x54')]=_0x253751['ListId'];_0x2c481e[_0x3464('0x1f')]=_0x253751[_0x3464('0x1f')]||undefined;return _0x2c481e;};exports[_0x3464('0x55')]=function(_0x440b98,_0x4c9cdf){if(!_[_0x3464('0x18')](_0x440b98)){if(_0x440b98['pTalking']>0x0){_0x440b98[_0x3464('0x56')]-=0x1;}else{logger['error'](_0x4c9cdf,'[decrementTalkink]\x20object\x20talking\x20is\x20negative');}}else{logger[_0x3464('0x9')](_0x4c9cdf,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports['IsNotLoggedIn']=function(_0x1c3c3d){if(_0x1c3c3d<=0x0){return!![];}return![];};exports[_0x3464('0x57')]=function(_0x4309c3,_0x48e636,_0x45fa60){_0x4309c3['lastevent']=_0x48e636;_0x4309c3[_0x3464('0x58')]=_0x4309c3[_0x3464('0x59')];_0x4309c3['interface']=_0x4309c3[_0x3464('0x47')];if(_0x45fa60){_0x4309c3[_0x3464('0x5a')]=_0x45fa60[_0x3464('0x5a')];}return _0x4309c3;};exports[_0x3464('0x5b')]=function(_0x37a82d){var _0x4160ba={};_0x4160ba[_0x3464('0x59')]=_0x37a82d[_0x3464('0x59')];_0x4160ba[_0x3464('0x5c')]=_0x37a82d[_0x3464('0x47')];_0x4160ba[_0x3464('0x46')]=_0x37a82d['uniqueid'];return _0x4160ba;};exports[_0x3464('0x5d')]=function(_0x1e3c9c){var _0x3ff84f=[];for(var _0x13028c in _0x1e3c9c){if(_0x1e3c9c[_0x3464('0x2d')](_0x13028c)){if(!_[_0x3464('0x18')](_0x1e3c9c[_0x13028c])&&_0x1e3c9c[_0x13028c][_0x3464('0x37')]===_0x3464('0x5e')&&_0x1e3c9c[_0x13028c][_0x3464('0x5f')]==='reachable'){_0x3ff84f[_0x3464('0x60')](_0x1e3c9c[_0x13028c]['id']);}}}return _0x3ff84f;};exports['getDiff']=function(_0x4f351c){var _0x193b63=moment()[_0x3464('0x5')](0x0);var _0x52691f=moment(_0x4f351c)['milliseconds'](0x0);return _0x193b63['diff'](_0x52691f,'seconds');};exports[_0x3464('0x61')]=function(_0x5b7158){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x5b7158[_0x3464('0x1d')],'ListId':_0x5b7158[_0x3464('0x54')],'VoiceQueueId':_0x5b7158['VoiceQueueId']||undefined,'CampaignId':_0x5b7158[_0x3464('0x62')]||undefined};};exports[_0x3464('0x63')]=function(_0x36f934){if(_0x36f934===_0x3464('0x46')||_0x36f934===_0x3464('0x64')||_0x36f934===_0x3464('0x59')||_0x36f934===_0x3464('0x65')||_0x36f934===_0x3464('0x66')||_0x36f934===_0x3464('0x67')||_0x36f934===_0x3464('0x68')||_0x36f934===_0x3464('0x47')||_0x36f934===_0x3464('0x1b')||_0x36f934===_0x3464('0x50')||_0x36f934===_0x3464('0x1c')||_0x36f934===_0x3464('0x51')||_0x36f934==='countbusyretry'||_0x36f934===_0x3464('0x4b')||_0x36f934===_0x3464('0x4c')||_0x36f934==='countglobal'||_0x36f934===_0x3464('0x69')||_0x36f934===_0x3464('0x6a')||_0x36f934===_0x3464('0x6b')||_0x36f934==='recallme'||_0x36f934===_0x3464('0x1d')||_0x36f934===_0x3464('0x54')||_0x36f934===_0x3464('0x6c')||_0x36f934==='VoiceQueueId'||_0x36f934===_0x3464('0x6d')||_0x36f934==='xmd-voicequeueid'||_0x36f934==='xmd-queue'||_0x36f934===_0x3464('0x6e')||_0x36f934===_0x3464('0x6f')||_0x36f934===_0x3464('0x70')||_0x36f934===_0x3464('0x71')||_0x36f934===_0x3464('0x72')||_0x36f934==='xmd-dialid'||_0x36f934===_0x3464('0x73')||_0x36f934==='xmd-contactid'||_0x36f934===_0x3464('0x74')||_0x36f934===_0x3464('0x75')||_0x36f934===_0x3464('0x76')||_0x36f934===_0x3464('0x77')||_0x36f934==='rtpaudioqos'||_0x36f934===_0x3464('0x78')||_0x36f934===_0x3464('0x79')||_0x36f934===_0x3464('0x7a')||_0x36f934===_0x3464('0x7b')||_0x36f934===_0x3464('0x7c')||_0x36f934===_0x3464('0x7d')||_0x36f934===_0x3464('0x7e')||_0x36f934===_0x3464('0x7f')||_0x36f934===_0x3464('0x78')||_0x36f934==='rtpaudioqosjitter'||_0x36f934==='rtpaudioqosjitterbridged'||_0x36f934===_0x3464('0x7b')||_0x36f934===_0x3464('0x7c')||_0x36f934==='rtpaudioqosrtt'||_0x36f934==='rtpaudioqosrttbridged'||_0x36f934===_0x3464('0x80')||_0x36f934===_0x3464('0x81')||_0x36f934===_0x3464('0x37')||_0x36f934===_0x3464('0x38')){return![];}return!![];};exports[_0x3464('0x82')]=function(_0x3ea6e0,_0xf71188){var _0x3e974c,_0x40083a,_0x2293d3;if(_0xf71188<=0x0){_0xf71188=0x1;}_0x3e974c=new RegExp(_0x3464('0x83')+_0xf71188+'}$');_0x40083a=Math[_0x3464('0x84')](0xa,_0xf71188-0x1);_0x2293d3=Math[_0x3464('0x84')](0xa,_0xf71188)-0x1;return util[_0x3464('0x14')]('%s',_[_0x3464('0x85')](_0x3ea6e0,_0x3e974c,_['random'](_0x40083a,_0x2293d3)));};exports[_0x3464('0x86')]=function(_0x41d53e){var _0x50349c=_0x41d53e[_0x3464('0x87')](/"(.*?)"/);return _0x50349c?_0x50349c[0x1]:_0x41d53e;};exports[_0x3464('0x88')]=function(_0x4cca05){var _0x2e497d=_0x4cca05[_0x3464('0x87')](/<(.*?)>/);return _0x2e497d?_0x2e497d[0x1]:_0x4cca05;};
\ No newline at end of file
+var _0x5074=['rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqosbridged','bridgepeer','getCallerIdRandom','\x5cw{0,','pow','replace','random','extractCalleridName','match','extractCalleridNumber','util','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','milliseconds','diff','seconds','error','logger','info','inspect','logger2','message','getCallerId','isUndefined','isEmpty','string','format','\x22%s\x22\x20<%s>','isActive','isNil','addVariables','Queue','calleridname','calleridnum','ContactId','dialer','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','U(xcally-mixmonitor-context)','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridname','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','tags','updatedAt','%s%s','XMD-','toUpper','toLowerVariables','hasOwnProperty','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','state','Blacklist','starttime','responsetime','endtime','logAgent','statedesc','ringtime','logLookAgent','UserId','logCustomer','answertime','isFailure','Failure','variablesAction','RECALL','BOOKED','originate','channelAgent','from-sip','timeout','uniqueid','countbusyretry','countcongestionretry','countnoanswerretry','countagentrejectretry','cloneAction','Global','active','scheduledat','add','minutes','ListId','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','buildObj','lastevent','name','mandatoryDisposition','buildAcw','queue','interface','not_inuse','reachable','push','createBody','CampaignId','filterKey','campaigntype','dialAnswer','membername','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-phone','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agi','rtpaudioqos','rtpaudioqosjitter'];(function(_0x57b913,_0x48b176){var _0x466aaa=function(_0x4df7aa){while(--_0x4df7aa){_0x57b913['push'](_0x57b913['shift']());}};_0x466aaa(++_0x48b176);}(_0x5074,0x98));var _0x4507=function(_0x2d486b,_0x5f213c){_0x2d486b=_0x2d486b-0x0;var _0x4291d1=_0x5074[_0x2d486b];return _0x4291d1;};'use strict';var util=require(_0x4507('0x0'));var _=require('lodash');var moment=require(_0x4507('0x1'));var logger=require(_0x4507('0x2'))(_0x4507('0x3'));var ipAgi=process[_0x4507('0x4')][_0x4507('0x5')]||'127.0.0.1';function getSeconds(_0x488058,_0x57fcf2){var _0x3dc8e2=moment(_0x488058)[_0x4507('0x6')](0x0);var _0x431039=moment(_0x57fcf2)['milliseconds'](0x0);return _0x3dc8e2[_0x4507('0x7')](_0x431039,_0x4507('0x8'));}exports['loggerCatch']=function(_0x4eeb12){return function(_0x17d19d){logger[_0x4507('0x9')](_0x4eeb12,util['inspect'](_0x17d19d,{'showHidden':![],'depth':null}));};};exports[_0x4507('0xa')]=function(_0x44bd26,_0x3bd533){logger[_0x4507('0xb')](_0x44bd26,util['inspect'](_0x3bd533,{'showHidden':![],'depth':null}));};exports['loggerError']=function(_0x2c87d6,_0x3db4d){logger[_0x4507('0x9')](_0x2c87d6,util[_0x4507('0xc')](_0x3db4d,{'showHidden':![],'depth':null}));};exports[_0x4507('0xd')]=function(_0x1c3b6b){return function(_0x239627){logger[_0x4507('0xb')](_0x1c3b6b,util['inspect'](_0x239627,{'showHidden':![],'depth':null}));};};exports[_0x4507('0xe')]=function(_0x27d933,_0x2c3e47,_0x201b5d){return{'message':_0x27d933,'unlock':_0x2c3e47,'active':_0x201b5d};};exports[_0x4507('0xf')]=function(_0x323a5f,_0x6e0e29,_0x2279fa){if(!_[_0x4507('0x10')](_0x2279fa)&&'string'===typeof _0x2279fa&&!_[_0x4507('0x11')](_0x2279fa)){if(!_[_0x4507('0x10')](_0x6e0e29)&&_0x4507('0x12')===typeof _0x6e0e29&&!_['isEmpty'](_0x6e0e29)){return util[_0x4507('0x13')](_0x4507('0x14'),_0x6e0e29,_0x2279fa);}return util[_0x4507('0x13')](_0x4507('0x14'),_0x2279fa,_0x2279fa);}if(!_[_0x4507('0x10')](_0x323a5f)&&_0x4507('0x12')===typeof _0x323a5f&&!_[_0x4507('0x11')](_0x323a5f)){return _0x323a5f;}return'\x22\x22\x20<>';};exports[_0x4507('0x15')]=function(_0x7bdb2d){if(_[_0x4507('0x16')](_0x7bdb2d)){return![];}return _0x7bdb2d;};exports[_0x4507('0x17')]=function(_0x3c13d8,_0x547fe5,_0x36ec85,_0x26db82,_0x1c600a,_0x179cc5){var _0x1e474e={'XMD-QUEUE':_0x547fe5['Queue']?_0x547fe5[_0x4507('0x18')]['name']:'','XMD-CALLERID':_0x26db82,'XMD-CALLERID-PREVIEW':_0x179cc5?util[_0x4507('0x13')]('\x22%s\x22\x20<%s>',_0x179cc5[_0x4507('0x19')],_0x179cc5[_0x4507('0x1a')]):_0x26db82,'XMD-DIALID':_0x1c600a,'XMD-CONTACTID':_0x547fe5[_0x4507('0x1b')],'XMD-CDRTYPE':_0x4507('0x1c'),'CALLERID(all)':_0x26db82,'XMD-VOICEQUEUEID':_0x547fe5[_0x4507('0x1d')],'XMD-DIALCHANNEL':_0x36ec85,'XMD-DIALTIMEOUT':_0x3c13d8[_0x4507('0x1e')]||0x1e,'XMD-DIALOPTIONS':util['format'](_0x4507('0x1f'),_0x3c13d8[_0x4507('0x20')]?'g':'',_['isEmpty'](_0x3c13d8[_0x4507('0x21')])?'':_0x4507('0x22')),'XMD-DIALURL':_0x3c13d8['dialPreviewUrl']||'','XMD-AGI':_0x3c13d8[_0x4507('0x23')]?util[_0x4507('0x13')](_0x4507('0x24'),ipAgi,_0x3c13d8['dialQueueProject']):_0x4507('0x25'),'XMD-AGIAFTER':_0x3c13d8[_0x4507('0x20')]?util[_0x4507('0x13')]('\x22agi://%s/square,%s\x22',ipAgi,_0x3c13d8['dialQueueProject2']):'NONE','XMD-ORIGINATECALLERIDNUM':_0x179cc5?_0x179cc5['originatecalleridnum']:'','XMD-ORIGINATECALLERIDNAME':_0x179cc5?_0x179cc5[_0x4507('0x26')]:'','XMD-DESTINATION':_0x4507('0x27')};if(!_[_0x4507('0x11')](_0x3c13d8[_0x4507('0x21')])){_0x1e474e[util[_0x4507('0x13')]('%s',_0x4507('0x28'))]=_0x3c13d8[_0x4507('0x21')];_0x1e474e[util[_0x4507('0x13')]('%s',_0x4507('0x29'))]=_0x1c600a;}if(_0x547fe5&&_0x547fe5[_0x4507('0x2a')]){for(var _0x14f613 in _0x547fe5['Contact']){if(_0x547fe5['Contact']['hasOwnProperty'](_0x14f613)){if(!_['isNil'](_0x547fe5['Contact'][_0x14f613])&&_0x14f613!=='id'&&_0x14f613!==_0x4507('0x2b')&&_0x14f613!=='createdAt'&&_0x14f613!==_0x4507('0x2c')){_0x1e474e[util[_0x4507('0x13')](_0x4507('0x2d'),_0x4507('0x2e'),_[_0x4507('0x2f')](_0x14f613))]=_0x547fe5[_0x4507('0x2a')][_0x14f613];}}}}return _0x1e474e;};exports[_0x4507('0x30')]=function(_0x2d1146){var _0x5c2c27={};for(var _0x29b98f in _0x2d1146){if(_0x2d1146[_0x4507('0x31')](_0x29b98f)){_0x5c2c27[util['format']('%s',_[_0x4507('0x32')](_0x29b98f))]=_0x2d1146[_0x29b98f];}}return{'variables':_0x5c2c27};};exports[_0x4507('0x33')]=function(_0x34d567,_0x381934){if(!_[_0x4507('0x16')](_0x34d567)){if(_0x34d567['hasOwnProperty'](_0x4507('0x34'))){if(_0x34d567[_0x4507('0x34')]>0x0){_0x34d567[_0x4507('0x34')]-=0x1;}else{logger[_0x4507('0x9')](_0x4507('0x35'),_0x381934);}}}else{logger[_0x4507('0x9')](_0x4507('0x36'),_0x381934);}};exports['logBlacklist']=function(_0x1e8463){var _0x20fcd3=moment()[_0x4507('0x13')](_0x4507('0x37'));_0x1e8463[_0x4507('0x38')]=0xd;_0x1e8463['statedesc']=_0x4507('0x39');_0x1e8463[_0x4507('0x3a')]=_0x20fcd3;_0x1e8463[_0x4507('0x3b')]=_0x20fcd3;_0x1e8463[_0x4507('0x3c')]=_0x20fcd3;};exports[_0x4507('0x3d')]=function(_0x2d8212,_0x3bf41c,_0x15b355){var _0x280643=moment()[_0x4507('0x13')](_0x4507('0x37'));_0x2d8212[_0x4507('0x38')]=_0x3bf41c;_0x2d8212[_0x4507('0x3e')]=_0x15b355;_0x2d8212[_0x4507('0x3b')]=_0x280643;_0x2d8212[_0x4507('0x3f')]=getSeconds(_0x2d8212['responsetime'],_0x2d8212[_0x4507('0x3a')]);};exports[_0x4507('0x40')]=function(_0x288be0,_0x36b760,_0x2180fb){_0x288be0['membername']=_0x36b760;_0x288be0[_0x4507('0x41')]=_0x2180fb;};exports[_0x4507('0x42')]=function(_0x583818,_0x27b02b,_0x2ece13){var _0x3e47d8=moment()[_0x4507('0x13')](_0x4507('0x37'));_0x583818[_0x4507('0x38')]=_0x27b02b;_0x583818[_0x4507('0x3e')]=_0x2ece13;_0x583818[_0x4507('0x3b')]=_0x583818[_0x4507('0x3b')]?_0x583818[_0x4507('0x3b')]:_0x3e47d8;_0x583818[_0x4507('0x3c')]=_0x583818[_0x4507('0x3c')]?_0x583818['endtime']:_0x3e47d8;_0x583818[_0x4507('0x3f')]=getSeconds(_0x583818[_0x4507('0x3b')]||0x0,_0x583818['starttime']||0x0);_0x583818['talktime']=_0x583818[_0x4507('0x43')]?getSeconds(_0x583818[_0x4507('0x3c')],_0x583818[_0x4507('0x43')]):0x0;};exports[_0x4507('0x44')]=function(_0x44cafb){return _0x44cafb===_0x4507('0x45');};exports[_0x4507('0x46')]=function(_0x408d40,_0x377a57,_0x3eedb2,_0x58fe33,_0xb9581f){var _0x579b15=_0x58fe33?_0x4507('0x47'):_0x408d40[_0x4507('0x19')];_0x579b15=_0xb9581f?_0x4507('0x48'):_0x579b15;return{'actionid':_0x408d40['uniqueid'],'action':_0x4507('0x49'),'channel':_0x408d40[_0x4507('0x4a')],'callerid':util[_0x4507('0x13')](_0x4507('0x14'),_0x579b15,_0x408d40[_0x4507('0x1a')]),'Exten':_0x4507('0x27'),'Context':_0x4507('0x4b'),'Priority':'1','variable':_0x3eedb2,'timeout':(_0x377a57[_0x4507('0x4c')]||0x1e)*0x3e8,'async':!![],'channelid':_0x408d40[_0x4507('0x4d')]};};exports['totalGlobal']=function(_0xf32325){return _0xf32325[_0x4507('0x4e')]+_0xf32325[_0x4507('0x4f')]+_0xf32325[_0x4507('0x50')]+_0xf32325[_0x4507('0x51')]+_0xf32325['countnosuchnumberretry'];};exports[_0x4507('0x52')]=function(_0x365e2c){var _0x3c7e80=_['clone'](_0x365e2c);_0x3c7e80[_0x4507('0x38')]=0xf;_0x3c7e80['statedesc']=_0x4507('0x53');return _0x3c7e80;};exports['scheduledAt']=function(_0x2869ab,_0x5f0a22,_0x1dc983){var _0xa6298c={};_0xa6298c[_0x5f0a22]=_0x2869ab[_0x5f0a22];_0xa6298c[_0x4507('0x54')]=![];_0xa6298c[_0x4507('0x55')]=moment()[_0x4507('0x56')](_0x1dc983,_0x4507('0x57'))[_0x4507('0x13')](_0x4507('0x37'));_0xa6298c['ContactId']=_0x2869ab[_0x4507('0x1b')];_0xa6298c[_0x4507('0x58')]=_0x2869ab[_0x4507('0x58')];_0xa6298c[_0x4507('0x1d')]=_0x2869ab['VoiceQueueId']||undefined;return _0xa6298c;};exports['decrementTalkink']=function(_0xe9e7d7,_0x9d53c3){if(!_[_0x4507('0x16')](_0xe9e7d7)){if(_0xe9e7d7[_0x4507('0x59')]>0x0){_0xe9e7d7[_0x4507('0x59')]-=0x1;}else{logger[_0x4507('0x9')](_0x9d53c3,_0x4507('0x5a'));}}else{logger[_0x4507('0x9')](_0x9d53c3,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports['IsNotLoggedIn']=function(_0x18e96e){if(_0x18e96e<=0x0){return!![];}return![];};exports[_0x4507('0x5b')]=function(_0x112e35,_0x50860e,_0xd1a228){_0x112e35[_0x4507('0x5c')]=_0x50860e;_0x112e35[_0x4507('0x5d')]=_0x112e35['queue'];_0x112e35['interface']=_0x112e35['channelAgent'];if(_0xd1a228){_0x112e35['mandatoryDisposition']=_0xd1a228[_0x4507('0x5e')];}return _0x112e35;};exports[_0x4507('0x5f')]=function(_0x30747d){var _0x132268={};_0x132268['queue']=_0x30747d[_0x4507('0x60')];_0x132268[_0x4507('0x61')]=_0x30747d['channelAgent'];_0x132268[_0x4507('0x4d')]=_0x30747d['uniqueid'];return _0x132268;};exports['agentReadyId']=function(_0x5b0adf){var _0x3f51df=[];for(var _0x4f651f in _0x5b0adf){if(_0x5b0adf[_0x4507('0x31')](_0x4f651f)){if(!_[_0x4507('0x16')](_0x5b0adf[_0x4f651f])&&_0x5b0adf[_0x4f651f][_0x4507('0x38')]===_0x4507('0x62')&&_0x5b0adf[_0x4f651f]['status']===_0x4507('0x63')){_0x3f51df[_0x4507('0x64')](_0x5b0adf[_0x4f651f]['id']);}}}return _0x3f51df;};exports['getDiff']=function(_0x5c50c6){var _0xe36e41=moment()['milliseconds'](0x0);var _0xb33c2a=moment(_0x5c50c6)[_0x4507('0x6')](0x0);return _0xe36e41['diff'](_0xb33c2a,'seconds');};exports[_0x4507('0x65')]=function(_0x3be7a7){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x3be7a7[_0x4507('0x1b')],'ListId':_0x3be7a7[_0x4507('0x58')],'VoiceQueueId':_0x3be7a7['VoiceQueueId']||undefined,'CampaignId':_0x3be7a7[_0x4507('0x66')]||undefined};};exports[_0x4507('0x67')]=function(_0x591655){if(_0x591655===_0x4507('0x4d')||_0x591655==='idContact'||_0x591655===_0x4507('0x60')||_0x591655==='type'||_0x591655===_0x4507('0x68')||_0x591655===_0x4507('0x69')||_0x591655===_0x4507('0x6a')||_0x591655===_0x4507('0x4a')||_0x591655===_0x4507('0x19')||_0x591655===_0x4507('0x54')||_0x591655===_0x4507('0x1a')||_0x591655===_0x4507('0x55')||_0x591655===_0x4507('0x4e')||_0x591655===_0x4507('0x4f')||_0x591655===_0x4507('0x50')||_0x591655==='countglobal'||_0x591655===_0x4507('0x6b')||_0x591655===_0x4507('0x6c')||_0x591655===_0x4507('0x6d')||_0x591655===_0x4507('0x6e')||_0x591655==='ContactId'||_0x591655===_0x4507('0x58')||_0x591655===_0x4507('0x41')||_0x591655===_0x4507('0x1d')||_0x591655===_0x4507('0x6f')||_0x591655==='xmd-voicequeueid'||_0x591655==='xmd-queue'||_0x591655===_0x4507('0x70')||_0x591655==='xmd-listid'||_0x591655==='xmd-dialurl'||_0x591655===_0x4507('0x71')||_0x591655===_0x4507('0x72')||_0x591655===_0x4507('0x73')||_0x591655==='xmd-dialchannel'||_0x591655===_0x4507('0x74')||_0x591655===_0x4507('0x75')||_0x591655===_0x4507('0x76')||_0x591655==='xmd-agiafter'||_0x591655===_0x4507('0x77')||_0x591655===_0x4507('0x78')||_0x591655==='rtpaudioqosbridged'||_0x591655===_0x4507('0x79')||_0x591655===_0x4507('0x7a')||_0x591655===_0x4507('0x7b')||_0x591655===_0x4507('0x7c')||_0x591655===_0x4507('0x7d')||_0x591655===_0x4507('0x7e')||_0x591655===_0x4507('0x78')||_0x591655===_0x4507('0x7f')||_0x591655==='rtpaudioqosjitter'||_0x591655==='rtpaudioqosjitterbridged'||_0x591655===_0x4507('0x7b')||_0x591655==='rtpaudioqoslossbridged'||_0x591655===_0x4507('0x7d')||_0x591655==='rtpaudioqosrttbridged'||_0x591655===_0x4507('0x80')||_0x591655==='bridgepvtcallid'||_0x591655===_0x4507('0x38')||_0x591655===_0x4507('0x3e')){return![];}return!![];};exports[_0x4507('0x81')]=function(_0x16ab1e,_0x20e0e5){var _0x13368f,_0x161258,_0x35db3a;if(_0x20e0e5<=0x0){_0x20e0e5=0x1;}_0x13368f=new RegExp(_0x4507('0x82')+_0x20e0e5+'}$');_0x161258=Math['pow'](0xa,_0x20e0e5-0x1);_0x35db3a=Math[_0x4507('0x83')](0xa,_0x20e0e5)-0x1;return util['format']('%s',_[_0x4507('0x84')](_0x16ab1e,_0x13368f,_[_0x4507('0x85')](_0x161258,_0x35db3a)));};exports[_0x4507('0x86')]=function(_0x4e4b60){var _0x21fe97=_0x4e4b60[_0x4507('0x87')](/"(.*?)"/);return _0x21fe97?_0x21fe97[0x1]:_0x4e4b60;};exports[_0x4507('0x88')]=function(_0x57dabf){var _0x192639=_0x57dabf[_0x4507('0x87')](/<(.*?)>/);return _0x192639?_0x192639[0x1]:_0x57dabf;};
\ No newline at end of file