Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / services / ami / preview / util / util.js
index d6544e5..46eba5e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8785=['lodash','moment','../../../../config/logger','XCALLY_IP_AGI','127.0.0.1','milliseconds','seconds','loggerCatch','error','logger','info','loggerError','inspect','logger2','message','isUndefined','isEmpty','string','format','\x22%s\x22\x20<%s>','isActive','isNil','addVariables','Queue','name','calleridname','ContactId','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','dialQueueProject2','originatecalleridnum','originatecalleridname','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','createdAt','updatedAt','XMD-','toUpper','hasOwnProperty','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','state','statedesc','Blacklist','starttime','YYYY-MM-DD\x20HH:mm:ss','responsetime','ringtime','logLookAgent','UserId','logCustomer','endtime','talktime','answertime','isFailure','Failure','variablesAction','RECALL','BOOKED','originate','channelAgent','xcally-motion-preview','from-sip','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','countagentrejectretry','countnosuchnumberretry','clone','Global','active','scheduledat','add','minutes','ListId','VoiceQueueId','decrementTalkink','pTalking','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','buildObj','lastevent','queue','interface','mandatoryDisposition','uniqueid','agentReadyId','not_inuse','status','reachable','getDiff','createBody','CampaignId','filterKey','type','campaigntype','membername','countglobal','callback','callbackat','recallme','sipcallid','xmd-voicequeueid','xmd-phone','xmd-listid','xmd-dialtimeout','xmd-dialid','xmd-dialchannel','xmd-cdrtype','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','bridgepeer','bridgepvtcallid','getCallerIdRandom','\x5cw{0,','pow','replace','random','extractCalleridName','extractCalleridNumber','match','util'];(function(_0x3c5e53,_0x461bee){var _0x3cd4b0=function(_0x3b55fd){while(--_0x3b55fd){_0x3c5e53['push'](_0x3c5e53['shift']());}};_0x3cd4b0(++_0x461bee);}(_0x8785,0x117));var _0x5878=function(_0x317fcf,_0x1f72ca){_0x317fcf=_0x317fcf-0x0;var _0x45c16d=_0x8785[_0x317fcf];return _0x45c16d;};'use strict';var util=require(_0x5878('0x0'));var _=require(_0x5878('0x1'));var moment=require(_0x5878('0x2'));var logger=require(_0x5878('0x3'))('preview');var ipAgi=process['env'][_0x5878('0x4')]||_0x5878('0x5');function getSeconds(_0x8cd43,_0x13a179){var _0xb74b27=moment(_0x8cd43)['milliseconds'](0x0);var _0xdf350e=moment(_0x13a179)[_0x5878('0x6')](0x0);return _0xb74b27['diff'](_0xdf350e,_0x5878('0x7'));}exports[_0x5878('0x8')]=function(_0x114c82){return function(_0x493bf9){logger[_0x5878('0x9')](_0x114c82,util['inspect'](_0x493bf9,{'showHidden':![],'depth':null}));};};exports[_0x5878('0xa')]=function(_0x1b147a,_0x3f9a4c){logger[_0x5878('0xb')](_0x1b147a,util['inspect'](_0x3f9a4c,{'showHidden':![],'depth':null}));};exports[_0x5878('0xc')]=function(_0x21c507,_0x1f094b){logger[_0x5878('0x9')](_0x21c507,util[_0x5878('0xd')](_0x1f094b,{'showHidden':![],'depth':null}));};exports[_0x5878('0xe')]=function(_0x46ee44){return function(_0x5f2a58){logger['info'](_0x46ee44,util['inspect'](_0x5f2a58,{'showHidden':![],'depth':null}));};};exports[_0x5878('0xf')]=function(_0x1d885d,_0x3a03c9,_0x3aae2d){return{'message':_0x1d885d,'unlock':_0x3a03c9,'active':_0x3aae2d};};exports['getCallerId']=function(_0x65cdc9,_0x497d1e,_0x2d47bd){if(!_[_0x5878('0x10')](_0x2d47bd)&&'string'===typeof _0x2d47bd&&!_[_0x5878('0x11')](_0x2d47bd)){if(!_[_0x5878('0x10')](_0x497d1e)&&_0x5878('0x12')===typeof _0x497d1e&&!_[_0x5878('0x11')](_0x497d1e)){return util[_0x5878('0x13')](_0x5878('0x14'),_0x497d1e,_0x2d47bd);}return util[_0x5878('0x13')](_0x5878('0x14'),_0x2d47bd,_0x2d47bd);}if(!_[_0x5878('0x10')](_0x65cdc9)&&_0x5878('0x12')===typeof _0x65cdc9&&!_[_0x5878('0x11')](_0x65cdc9)){return _0x65cdc9;}return'\x22\x22\x20<>';};exports[_0x5878('0x15')]=function(_0x3dd562){if(_[_0x5878('0x16')](_0x3dd562)){return![];}return _0x3dd562;};exports[_0x5878('0x17')]=function(_0x9064cf,_0x3ad9f4,_0x4cbaa2,_0x4c8784,_0x1f02d4,_0x512ebd){var _0x469834={'XMD-QUEUE':_0x3ad9f4[_0x5878('0x18')]?_0x3ad9f4[_0x5878('0x18')][_0x5878('0x19')]:'','XMD-CALLERID':_0x4c8784,'XMD-CALLERID-PREVIEW':_0x512ebd?util[_0x5878('0x13')]('\x22%s\x22\x20<%s>',_0x512ebd[_0x5878('0x1a')],_0x512ebd['calleridnum']):_0x4c8784,'XMD-DIALID':_0x1f02d4,'XMD-CONTACTID':_0x3ad9f4[_0x5878('0x1b')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x4c8784,'XMD-VOICEQUEUEID':_0x3ad9f4['VoiceQueueId'],'XMD-DIALCHANNEL':_0x4cbaa2,'XMD-DIALTIMEOUT':_0x9064cf['dialOriginateTimeout']||0x1e,'XMD-DIALOPTIONS':util[_0x5878('0x13')]('\x22rtTxX%s%s\x22',_0x9064cf['dialQueueProject2']?'g':'',_[_0x5878('0x11')](_0x9064cf[_0x5878('0x1c')])?'':_0x5878('0x1d')),'XMD-DIALURL':_0x9064cf[_0x5878('0x1e')]||'','XMD-AGI':_0x9064cf[_0x5878('0x1f')]?util[_0x5878('0x13')](_0x5878('0x20'),ipAgi,_0x9064cf[_0x5878('0x1f')]):_0x5878('0x21'),'XMD-AGIAFTER':_0x9064cf[_0x5878('0x22')]?util[_0x5878('0x13')]('\x22agi://%s/square,%s\x22',ipAgi,_0x9064cf[_0x5878('0x22')]):_0x5878('0x21'),'XMD-ORIGINATECALLERIDNUM':_0x512ebd?_0x512ebd[_0x5878('0x23')]:'','XMD-ORIGINATECALLERIDNAME':_0x512ebd?_0x512ebd[_0x5878('0x24')]:'','XMD-DESTINATION':'xcally-motion-preview'};if(!_[_0x5878('0x11')](_0x9064cf[_0x5878('0x1c')])){_0x469834[util[_0x5878('0x13')]('%s',_0x5878('0x25'))]=_0x9064cf[_0x5878('0x1c')];_0x469834[util[_0x5878('0x13')]('%s',_0x5878('0x26'))]=_0x1f02d4;}if(_0x3ad9f4&&_0x3ad9f4['Contact']){for(var _0x22144d in _0x3ad9f4[_0x5878('0x27')]){if(_0x3ad9f4[_0x5878('0x27')]['hasOwnProperty'](_0x22144d)){if(!_[_0x5878('0x16')](_0x3ad9f4[_0x5878('0x27')][_0x22144d])&&_0x22144d!=='id'&&_0x22144d!=='tags'&&_0x22144d!==_0x5878('0x28')&&_0x22144d!==_0x5878('0x29')){_0x469834[util[_0x5878('0x13')]('%s%s',_0x5878('0x2a'),_[_0x5878('0x2b')](_0x22144d))]=_0x3ad9f4[_0x5878('0x27')][_0x22144d];}}}}return _0x469834;};exports['toLowerVariables']=function(_0x576b05){var _0x3b124e={};for(var _0x46515f in _0x576b05){if(_0x576b05[_0x5878('0x2c')](_0x46515f)){_0x3b124e[util[_0x5878('0x13')]('%s',_[_0x5878('0x2d')](_0x46515f))]=_0x576b05[_0x46515f];}}return{'variables':_0x3b124e};};exports[_0x5878('0x2e')]=function(_0x3cbd60,_0x35d533){if(!_['isNil'](_0x3cbd60)){if(_0x3cbd60[_0x5878('0x2c')](_0x5878('0x2f'))){if(_0x3cbd60[_0x5878('0x2f')]>0x0){_0x3cbd60[_0x5878('0x2f')]-=0x1;}else{logger[_0x5878('0x9')](_0x5878('0x30'),_0x35d533);}}}else{logger[_0x5878('0x9')](_0x5878('0x31'),_0x35d533);}};exports[_0x5878('0x32')]=function(_0x261b49){var _0x259488=moment()[_0x5878('0x13')]('YYYY-MM-DD\x20HH:mm:ss');_0x261b49[_0x5878('0x33')]=0xd;_0x261b49[_0x5878('0x34')]=_0x5878('0x35');_0x261b49[_0x5878('0x36')]=_0x259488;_0x261b49['responsetime']=_0x259488;_0x261b49['endtime']=_0x259488;};exports['logAgent']=function(_0x31d310,_0x342d2d,_0x276eb4){var _0xc7fc27=moment()[_0x5878('0x13')](_0x5878('0x37'));_0x31d310[_0x5878('0x33')]=_0x342d2d;_0x31d310['statedesc']=_0x276eb4;_0x31d310[_0x5878('0x38')]=_0xc7fc27;_0x31d310[_0x5878('0x39')]=getSeconds(_0x31d310[_0x5878('0x38')],_0x31d310[_0x5878('0x36')]);};exports[_0x5878('0x3a')]=function(_0x37849d,_0x8c9393,_0x28751a){_0x37849d['membername']=_0x8c9393;_0x37849d[_0x5878('0x3b')]=_0x28751a;};exports[_0x5878('0x3c')]=function(_0x266662,_0x34bdbb,_0x1ed907){var _0x30d5c3=moment()[_0x5878('0x13')](_0x5878('0x37'));_0x266662[_0x5878('0x33')]=_0x34bdbb;_0x266662[_0x5878('0x34')]=_0x1ed907;_0x266662[_0x5878('0x38')]=_0x266662[_0x5878('0x38')]?_0x266662[_0x5878('0x38')]:_0x30d5c3;_0x266662[_0x5878('0x3d')]=_0x266662[_0x5878('0x3d')]?_0x266662[_0x5878('0x3d')]:_0x30d5c3;_0x266662[_0x5878('0x39')]=getSeconds(_0x266662[_0x5878('0x38')]||0x0,_0x266662['starttime']||0x0);_0x266662[_0x5878('0x3e')]=_0x266662[_0x5878('0x3f')]?getSeconds(_0x266662[_0x5878('0x3d')],_0x266662[_0x5878('0x3f')]):0x0;};exports[_0x5878('0x40')]=function(_0x502d6c){return _0x502d6c===_0x5878('0x41');};exports[_0x5878('0x42')]=function(_0x424f00,_0x175332,_0x4a5558,_0x5b8416,_0x523515){var _0x2964b1=_0x5b8416?_0x5878('0x43'):_0x424f00[_0x5878('0x1a')];_0x2964b1=_0x523515?_0x5878('0x44'):_0x2964b1;return{'actionid':_0x424f00['uniqueid'],'action':_0x5878('0x45'),'channel':_0x424f00[_0x5878('0x46')],'callerid':util[_0x5878('0x13')](_0x5878('0x14'),_0x2964b1,_0x424f00['calleridnum']),'Exten':_0x5878('0x47'),'Context':_0x5878('0x48'),'Priority':'1','variable':_0x4a5558,'timeout':(_0x175332['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x424f00['uniqueid']};};exports[_0x5878('0x49')]=function(_0xe6cd44){return _0xe6cd44[_0x5878('0x4a')]+_0xe6cd44[_0x5878('0x4b')]+_0xe6cd44[_0x5878('0x4c')]+_0xe6cd44[_0x5878('0x4d')]+_0xe6cd44[_0x5878('0x4e')];};exports['cloneAction']=function(_0x176a1f){var _0x414fd1=_[_0x5878('0x4f')](_0x176a1f);_0x414fd1[_0x5878('0x33')]=0xf;_0x414fd1[_0x5878('0x34')]=_0x5878('0x50');return _0x414fd1;};exports['scheduledAt']=function(_0x2d4767,_0x178dbb,_0x2388a0){var _0x1c29ad={};_0x1c29ad[_0x178dbb]=_0x2d4767[_0x178dbb];_0x1c29ad[_0x5878('0x51')]=![];_0x1c29ad[_0x5878('0x52')]=moment()[_0x5878('0x53')](_0x2388a0,_0x5878('0x54'))[_0x5878('0x13')]('YYYY-MM-DD\x20HH:mm:ss');_0x1c29ad[_0x5878('0x1b')]=_0x2d4767[_0x5878('0x1b')];_0x1c29ad[_0x5878('0x55')]=_0x2d4767[_0x5878('0x55')];_0x1c29ad[_0x5878('0x56')]=_0x2d4767[_0x5878('0x56')]||undefined;return _0x1c29ad;};exports[_0x5878('0x57')]=function(_0x3fb38d,_0x563b51){if(!_[_0x5878('0x16')](_0x3fb38d)){if(_0x3fb38d[_0x5878('0x58')]>0x0){_0x3fb38d[_0x5878('0x58')]-=0x1;}else{logger['error'](_0x563b51,'[decrementTalkink]\x20object\x20talking\x20is\x20negative');}}else{logger['error'](_0x563b51,_0x5878('0x59'));}};exports[_0x5878('0x5a')]=function(_0x81539d){if(_0x81539d<=0x0){return!![];}return![];};exports[_0x5878('0x5b')]=function(_0x414772,_0x5414ed,_0x5358f6){_0x414772[_0x5878('0x5c')]=_0x5414ed;_0x414772[_0x5878('0x19')]=_0x414772[_0x5878('0x5d')];_0x414772[_0x5878('0x5e')]=_0x414772[_0x5878('0x46')];if(_0x5358f6){_0x414772['mandatoryDisposition']=_0x5358f6[_0x5878('0x5f')];}return _0x414772;};exports['buildAcw']=function(_0x10423a){var _0x59a437={};_0x59a437[_0x5878('0x5d')]=_0x10423a['queue'];_0x59a437[_0x5878('0x5e')]=_0x10423a[_0x5878('0x46')];_0x59a437[_0x5878('0x60')]=_0x10423a[_0x5878('0x60')];return _0x59a437;};exports[_0x5878('0x61')]=function(_0x442698){var _0x278bd1=[];for(var _0x5d12c4 in _0x442698){if(_0x442698[_0x5878('0x2c')](_0x5d12c4)){if(!_[_0x5878('0x16')](_0x442698[_0x5d12c4])&&_0x442698[_0x5d12c4][_0x5878('0x33')]===_0x5878('0x62')&&_0x442698[_0x5d12c4][_0x5878('0x63')]===_0x5878('0x64')){_0x278bd1['push'](_0x442698[_0x5d12c4]['id']);}}}return _0x278bd1;};exports[_0x5878('0x65')]=function(_0x17954d){var _0x2e9dd1=moment()[_0x5878('0x6')](0x0);var _0x5d2028=moment(_0x17954d)['milliseconds'](0x0);return _0x2e9dd1['diff'](_0x5d2028,_0x5878('0x7'));};exports[_0x5878('0x66')]=function(_0x44c672){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x44c672['ContactId'],'ListId':_0x44c672[_0x5878('0x55')],'VoiceQueueId':_0x44c672[_0x5878('0x56')]||undefined,'CampaignId':_0x44c672[_0x5878('0x67')]||undefined};};exports[_0x5878('0x68')]=function(_0x46fd70){if(_0x46fd70===_0x5878('0x60')||_0x46fd70==='idContact'||_0x46fd70===_0x5878('0x5d')||_0x46fd70===_0x5878('0x69')||_0x46fd70===_0x5878('0x6a')||_0x46fd70==='dialAnswer'||_0x46fd70===_0x5878('0x6b')||_0x46fd70===_0x5878('0x46')||_0x46fd70==='calleridname'||_0x46fd70==='active'||_0x46fd70==='calleridnum'||_0x46fd70===_0x5878('0x52')||_0x46fd70==='countbusyretry'||_0x46fd70==='countcongestionretry'||_0x46fd70==='countnoanswerretry'||_0x46fd70===_0x5878('0x6c')||_0x46fd70===_0x5878('0x6d')||_0x46fd70==='callbackuniqueid'||_0x46fd70===_0x5878('0x6e')||_0x46fd70===_0x5878('0x6f')||_0x46fd70===_0x5878('0x1b')||_0x46fd70===_0x5878('0x55')||_0x46fd70===_0x5878('0x3b')||_0x46fd70===_0x5878('0x56')||_0x46fd70===_0x5878('0x70')||_0x46fd70===_0x5878('0x71')||_0x46fd70==='xmd-queue'||_0x46fd70===_0x5878('0x72')||_0x46fd70===_0x5878('0x73')||_0x46fd70==='xmd-dialurl'||_0x46fd70===_0x5878('0x74')||_0x46fd70==='xmd-dialoptions'||_0x46fd70===_0x5878('0x75')||_0x46fd70===_0x5878('0x76')||_0x46fd70==='xmd-contactid'||_0x46fd70===_0x5878('0x77')||_0x46fd70===_0x5878('0x78')||_0x46fd70===_0x5878('0x79')||_0x46fd70===_0x5878('0x7a')||_0x46fd70===_0x5878('0x7b')||_0x46fd70==='rtpaudioqosbridged'||_0x46fd70===_0x5878('0x7c')||_0x46fd70===_0x5878('0x7d')||_0x46fd70===_0x5878('0x7e')||_0x46fd70===_0x5878('0x7f')||_0x46fd70===_0x5878('0x80')||_0x46fd70==='rtpaudioqosrttbridged'||_0x46fd70===_0x5878('0x7b')||_0x46fd70==='rtpaudioqosbridged'||_0x46fd70==='rtpaudioqosjitter'||_0x46fd70===_0x5878('0x7d')||_0x46fd70===_0x5878('0x7e')||_0x46fd70===_0x5878('0x7f')||_0x46fd70==='rtpaudioqosrtt'||_0x46fd70===_0x5878('0x81')||_0x46fd70===_0x5878('0x82')||_0x46fd70===_0x5878('0x83')||_0x46fd70===_0x5878('0x33')||_0x46fd70===_0x5878('0x34')){return![];}return!![];};exports[_0x5878('0x84')]=function(_0xa1d5f4,_0x3d5062){var _0x2566d2,_0x1ec165,_0x541efb;if(_0x3d5062<=0x0){_0x3d5062=0x1;}_0x2566d2=new RegExp(_0x5878('0x85')+_0x3d5062+'}$');_0x1ec165=Math[_0x5878('0x86')](0xa,_0x3d5062-0x1);_0x541efb=Math[_0x5878('0x86')](0xa,_0x3d5062)-0x1;return util[_0x5878('0x13')]('%s',_[_0x5878('0x87')](_0xa1d5f4,_0x2566d2,_[_0x5878('0x88')](_0x1ec165,_0x541efb)));};exports[_0x5878('0x89')]=function(_0x18e43f){var _0xe3cd51=_0x18e43f['match'](/"(.*?)"/);return _0xe3cd51?_0xe3cd51[0x1]:_0x18e43f;};exports[_0x5878('0x8a')]=function(_0x219b8a){var _0x44c92f=_0x219b8a[_0x5878('0x8b')](/<(.*?)>/);return _0x44c92f?_0x44c92f[0x1]:_0x219b8a;};
\ No newline at end of file
+var _0xd65e=['callback','callbackat','recallme','sipcallid','xmd-voicequeueid','xmd-queue','xmd-phone','xmd-dialtimeout','xmd-dialoptions','xmd-dialchannel','xmd-contactid','xmd-cdrtype','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrttbridged','rtpaudioqosloss','bridgepeer','bridgepvtcallid','pow','replace','random','match','extractCalleridNumber','util','moment','../../../../config/logger','preview','env','127.0.0.1','milliseconds','diff','loggerCatch','error','inspect','logger2','info','message','getCallerId','isUndefined','string','isEmpty','\x22%s\x22\x20<%s>','format','isActive','isNil','addVariables','Queue','name','calleridname','ContactId','dialer','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','monitor_format','dialPreviewUrl','dialQueueProject','NONE','dialQueueProject2','originatecalleridnum','originatecalleridname','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','tags','XMD-','toUpper','toLowerVariables','originated','[updateOriginated]\x20is\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','Blacklist','starttime','responsetime','endtime','ringtime','membername','UserId','logCustomer','answertime','isFailure','Failure','variablesAction','RECALL','BOOKED','originate','channelAgent','from-sip','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','countagentrejectretry','countnosuchnumberretry','cloneAction','clone','Global','scheduledAt','active','add','minutes','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','interface','mandatoryDisposition','queue','uniqueid','agentReadyId','not_inuse','status','reachable','push','getDiff','seconds','createBody','CampaignId','filterKey','idContact','campaigntype','calleridnum','scheduledat','countglobal'];(function(_0x2b888c,_0x799a8c){var _0x9263b6=function(_0x3ccac9){while(--_0x3ccac9){_0x2b888c['push'](_0x2b888c['shift']());}};_0x9263b6(++_0x799a8c);}(_0xd65e,0xa2));var _0xed65=function(_0x26adbb,_0x3462c7){_0x26adbb=_0x26adbb-0x0;var _0x4e9a1b=_0xd65e[_0x26adbb];return _0x4e9a1b;};'use strict';var util=require(_0xed65('0x0'));var _=require('lodash');var moment=require(_0xed65('0x1'));var logger=require(_0xed65('0x2'))(_0xed65('0x3'));var ipAgi=process[_0xed65('0x4')]['XCALLY_IP_AGI']||_0xed65('0x5');function getSeconds(_0x46e583,_0x2a3f1c){var _0x2b7bf1=moment(_0x46e583)[_0xed65('0x6')](0x0);var _0x4fcd76=moment(_0x2a3f1c)[_0xed65('0x6')](0x0);return _0x2b7bf1[_0xed65('0x7')](_0x4fcd76,'seconds');}exports[_0xed65('0x8')]=function(_0x1be0a9){return function(_0x447053){logger[_0xed65('0x9')](_0x1be0a9,util[_0xed65('0xa')](_0x447053,{'showHidden':![],'depth':null}));};};exports['logger']=function(_0x2f5828,_0x1f2168){logger['info'](_0x2f5828,util[_0xed65('0xa')](_0x1f2168,{'showHidden':![],'depth':null}));};exports['loggerError']=function(_0x1d00ba,_0x2cbb45){logger[_0xed65('0x9')](_0x1d00ba,util[_0xed65('0xa')](_0x2cbb45,{'showHidden':![],'depth':null}));};exports[_0xed65('0xb')]=function(_0xc66b0d){return function(_0x1e1d36){logger[_0xed65('0xc')](_0xc66b0d,util[_0xed65('0xa')](_0x1e1d36,{'showHidden':![],'depth':null}));};};exports[_0xed65('0xd')]=function(_0x3c3a9f,_0x1ac037,_0x7928a4){return{'message':_0x3c3a9f,'unlock':_0x1ac037,'active':_0x7928a4};};exports[_0xed65('0xe')]=function(_0x5c7a02,_0x26bfd9,_0x5dd818){if(!_[_0xed65('0xf')](_0x5dd818)&&_0xed65('0x10')===typeof _0x5dd818&&!_['isEmpty'](_0x5dd818)){if(!_[_0xed65('0xf')](_0x26bfd9)&&'string'===typeof _0x26bfd9&&!_[_0xed65('0x11')](_0x26bfd9)){return util['format'](_0xed65('0x12'),_0x26bfd9,_0x5dd818);}return util[_0xed65('0x13')](_0xed65('0x12'),_0x5dd818,_0x5dd818);}if(!_[_0xed65('0xf')](_0x5c7a02)&&_0xed65('0x10')===typeof _0x5c7a02&&!_[_0xed65('0x11')](_0x5c7a02)){return _0x5c7a02;}return'\x22\x22\x20<>';};exports[_0xed65('0x14')]=function(_0x1cdf9d){if(_[_0xed65('0x15')](_0x1cdf9d)){return![];}return _0x1cdf9d;};exports[_0xed65('0x16')]=function(_0x67f2e6,_0x4e5e7f,_0x59a1c7,_0xe5090f,_0x2ec244,_0x41b681){var _0x22559f={'XMD-QUEUE':_0x4e5e7f[_0xed65('0x17')]?_0x4e5e7f[_0xed65('0x17')][_0xed65('0x18')]:'','XMD-CALLERID':_0xe5090f,'XMD-CALLERID-PREVIEW':_0x41b681?util['format']('\x22%s\x22\x20<%s>',_0x41b681[_0xed65('0x19')],_0x41b681['calleridnum']):_0xe5090f,'XMD-DIALID':_0x2ec244,'XMD-CONTACTID':_0x4e5e7f[_0xed65('0x1a')],'XMD-CDRTYPE':_0xed65('0x1b'),'CALLERID(all)':_0xe5090f,'XMD-VOICEQUEUEID':_0x4e5e7f[_0xed65('0x1c')],'XMD-DIALCHANNEL':_0x59a1c7,'XMD-DIALTIMEOUT':_0x67f2e6[_0xed65('0x1d')]||0x1e,'XMD-DIALOPTIONS':util['format'](_0xed65('0x1e'),_0x67f2e6['dialQueueProject2']?'g':'',_['isEmpty'](_0x67f2e6[_0xed65('0x1f')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x67f2e6[_0xed65('0x20')]||'','XMD-AGI':_0x67f2e6[_0xed65('0x21')]?util['format']('\x22agi://%s/square,%s\x22',ipAgi,_0x67f2e6['dialQueueProject']):_0xed65('0x22'),'XMD-AGIAFTER':_0x67f2e6[_0xed65('0x23')]?util[_0xed65('0x13')]('\x22agi://%s/square,%s\x22',ipAgi,_0x67f2e6[_0xed65('0x23')]):_0xed65('0x22'),'XMD-ORIGINATECALLERIDNUM':_0x41b681?_0x41b681[_0xed65('0x24')]:'','XMD-ORIGINATECALLERIDNAME':_0x41b681?_0x41b681[_0xed65('0x25')]:'','XMD-DESTINATION':_0xed65('0x26')};if(!_['isEmpty'](_0x67f2e6[_0xed65('0x1f')])){_0x22559f[util[_0xed65('0x13')]('%s',_0xed65('0x27'))]=_0x67f2e6[_0xed65('0x1f')];_0x22559f[util[_0xed65('0x13')]('%s',_0xed65('0x28'))]=_0x2ec244;}if(_0x4e5e7f&&_0x4e5e7f[_0xed65('0x29')]){for(var _0x5033d0 in _0x4e5e7f[_0xed65('0x29')]){if(_0x4e5e7f[_0xed65('0x29')][_0xed65('0x2a')](_0x5033d0)){if(!_[_0xed65('0x15')](_0x4e5e7f[_0xed65('0x29')][_0x5033d0])&&_0x5033d0!=='id'&&_0x5033d0!==_0xed65('0x2b')&&_0x5033d0!=='createdAt'&&_0x5033d0!=='updatedAt'){_0x22559f[util[_0xed65('0x13')]('%s%s',_0xed65('0x2c'),_[_0xed65('0x2d')](_0x5033d0))]=_0x4e5e7f[_0xed65('0x29')][_0x5033d0];}}}}return _0x22559f;};exports[_0xed65('0x2e')]=function(_0x77450a){var _0x146b9c={};for(var _0x3591ed in _0x77450a){if(_0x77450a['hasOwnProperty'](_0x3591ed)){_0x146b9c[util[_0xed65('0x13')]('%s',_['toLower'](_0x3591ed))]=_0x77450a[_0x3591ed];}}return{'variables':_0x146b9c};};exports['updateOriginated']=function(_0x6cefe6,_0x23c4af){if(!_[_0xed65('0x15')](_0x6cefe6)){if(_0x6cefe6[_0xed65('0x2a')](_0xed65('0x2f'))){if(_0x6cefe6[_0xed65('0x2f')]>0x0){_0x6cefe6['originated']-=0x1;}else{logger[_0xed65('0x9')]('[updateOriginated]\x20object\x20originated\x20is\x20negative',_0x23c4af);}}}else{logger[_0xed65('0x9')](_0xed65('0x30'),_0x23c4af);}};exports['logBlacklist']=function(_0xf7de49){var _0x5da4d6=moment()[_0xed65('0x13')](_0xed65('0x31'));_0xf7de49[_0xed65('0x32')]=0xd;_0xf7de49[_0xed65('0x33')]=_0xed65('0x34');_0xf7de49[_0xed65('0x35')]=_0x5da4d6;_0xf7de49[_0xed65('0x36')]=_0x5da4d6;_0xf7de49[_0xed65('0x37')]=_0x5da4d6;};exports['logAgent']=function(_0x1a2944,_0x3a6f66,_0x49dd09){var _0x142323=moment()[_0xed65('0x13')](_0xed65('0x31'));_0x1a2944[_0xed65('0x32')]=_0x3a6f66;_0x1a2944[_0xed65('0x33')]=_0x49dd09;_0x1a2944[_0xed65('0x36')]=_0x142323;_0x1a2944[_0xed65('0x38')]=getSeconds(_0x1a2944['responsetime'],_0x1a2944['starttime']);};exports['logLookAgent']=function(_0x1581ad,_0xa8378b,_0x3cc656){_0x1581ad[_0xed65('0x39')]=_0xa8378b;_0x1581ad[_0xed65('0x3a')]=_0x3cc656;};exports[_0xed65('0x3b')]=function(_0x4e49c0,_0x1bd71d,_0x35efa3){var _0x4373ec=moment()['format'](_0xed65('0x31'));_0x4e49c0['state']=_0x1bd71d;_0x4e49c0[_0xed65('0x33')]=_0x35efa3;_0x4e49c0['responsetime']=_0x4e49c0[_0xed65('0x36')]?_0x4e49c0[_0xed65('0x36')]:_0x4373ec;_0x4e49c0['endtime']=_0x4e49c0['endtime']?_0x4e49c0[_0xed65('0x37')]:_0x4373ec;_0x4e49c0['ringtime']=getSeconds(_0x4e49c0[_0xed65('0x36')]||0x0,_0x4e49c0[_0xed65('0x35')]||0x0);_0x4e49c0['talktime']=_0x4e49c0[_0xed65('0x3c')]?getSeconds(_0x4e49c0[_0xed65('0x37')],_0x4e49c0['answertime']):0x0;};exports[_0xed65('0x3d')]=function(_0x2aeb2e){return _0x2aeb2e===_0xed65('0x3e');};exports[_0xed65('0x3f')]=function(_0x37902f,_0x2cfdc1,_0x17abe9,_0x4bf6f3,_0x5651da){var _0x10e5b5=_0x4bf6f3?_0xed65('0x40'):_0x37902f[_0xed65('0x19')];_0x10e5b5=_0x5651da?_0xed65('0x41'):_0x10e5b5;return{'actionid':_0x37902f['uniqueid'],'action':_0xed65('0x42'),'channel':_0x37902f[_0xed65('0x43')],'callerid':util[_0xed65('0x13')](_0xed65('0x12'),_0x10e5b5,_0x37902f['calleridnum']),'Exten':_0xed65('0x26'),'Context':_0xed65('0x44'),'Priority':'1','variable':_0x17abe9,'timeout':(_0x2cfdc1['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x37902f['uniqueid']};};exports[_0xed65('0x45')]=function(_0x179da2){return _0x179da2[_0xed65('0x46')]+_0x179da2[_0xed65('0x47')]+_0x179da2[_0xed65('0x48')]+_0x179da2[_0xed65('0x49')]+_0x179da2[_0xed65('0x4a')];};exports[_0xed65('0x4b')]=function(_0x430a6b){var _0x3ad628=_[_0xed65('0x4c')](_0x430a6b);_0x3ad628['state']=0xf;_0x3ad628['statedesc']=_0xed65('0x4d');return _0x3ad628;};exports[_0xed65('0x4e')]=function(_0x2a6a51,_0x3e7292,_0x24338e){var _0x1bde91={};_0x1bde91[_0x3e7292]=_0x2a6a51[_0x3e7292];_0x1bde91[_0xed65('0x4f')]=![];_0x1bde91['scheduledat']=moment()[_0xed65('0x50')](_0x24338e,_0xed65('0x51'))[_0xed65('0x13')](_0xed65('0x31'));_0x1bde91[_0xed65('0x1a')]=_0x2a6a51[_0xed65('0x1a')];_0x1bde91['ListId']=_0x2a6a51['ListId'];_0x1bde91[_0xed65('0x1c')]=_0x2a6a51[_0xed65('0x1c')]||undefined;return _0x1bde91;};exports[_0xed65('0x52')]=function(_0x108c11,_0x3a86b4){if(!_[_0xed65('0x15')](_0x108c11)){if(_0x108c11['pTalking']>0x0){_0x108c11[_0xed65('0x53')]-=0x1;}else{logger[_0xed65('0x9')](_0x3a86b4,_0xed65('0x54'));}}else{logger['error'](_0x3a86b4,_0xed65('0x55'));}};exports[_0xed65('0x56')]=function(_0x36fcb8){if(_0x36fcb8<=0x0){return!![];}return![];};exports['buildObj']=function(_0x2a2506,_0x427e4a,_0x25f9cb){_0x2a2506['lastevent']=_0x427e4a;_0x2a2506['name']=_0x2a2506['queue'];_0x2a2506[_0xed65('0x57')]=_0x2a2506[_0xed65('0x43')];if(_0x25f9cb){_0x2a2506[_0xed65('0x58')]=_0x25f9cb['mandatoryDisposition'];}return _0x2a2506;};exports['buildAcw']=function(_0x9f4767){var _0x325592={};_0x325592[_0xed65('0x59')]=_0x9f4767[_0xed65('0x59')];_0x325592[_0xed65('0x57')]=_0x9f4767[_0xed65('0x43')];_0x325592['uniqueid']=_0x9f4767[_0xed65('0x5a')];return _0x325592;};exports[_0xed65('0x5b')]=function(_0x2b47ec){var _0x2c3370=[];for(var _0x4d1a68 in _0x2b47ec){if(_0x2b47ec[_0xed65('0x2a')](_0x4d1a68)){if(!_[_0xed65('0x15')](_0x2b47ec[_0x4d1a68])&&_0x2b47ec[_0x4d1a68][_0xed65('0x32')]===_0xed65('0x5c')&&_0x2b47ec[_0x4d1a68][_0xed65('0x5d')]===_0xed65('0x5e')){_0x2c3370[_0xed65('0x5f')](_0x2b47ec[_0x4d1a68]['id']);}}}return _0x2c3370;};exports[_0xed65('0x60')]=function(_0x25f990){var _0x7d2d7a=moment()[_0xed65('0x6')](0x0);var _0x1c5477=moment(_0x25f990)[_0xed65('0x6')](0x0);return _0x7d2d7a['diff'](_0x1c5477,_0xed65('0x61'));};exports[_0xed65('0x62')]=function(_0xbb2a75){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0xbb2a75[_0xed65('0x1a')],'ListId':_0xbb2a75['ListId'],'VoiceQueueId':_0xbb2a75[_0xed65('0x1c')]||undefined,'CampaignId':_0xbb2a75[_0xed65('0x63')]||undefined};};exports[_0xed65('0x64')]=function(_0x3f01b6){if(_0x3f01b6===_0xed65('0x5a')||_0x3f01b6===_0xed65('0x65')||_0x3f01b6==='queue'||_0x3f01b6==='type'||_0x3f01b6===_0xed65('0x66')||_0x3f01b6==='dialAnswer'||_0x3f01b6===_0xed65('0x39')||_0x3f01b6===_0xed65('0x43')||_0x3f01b6===_0xed65('0x19')||_0x3f01b6===_0xed65('0x4f')||_0x3f01b6===_0xed65('0x67')||_0x3f01b6===_0xed65('0x68')||_0x3f01b6===_0xed65('0x46')||_0x3f01b6===_0xed65('0x47')||_0x3f01b6==='countnoanswerretry'||_0x3f01b6===_0xed65('0x69')||_0x3f01b6===_0xed65('0x6a')||_0x3f01b6==='callbackuniqueid'||_0x3f01b6===_0xed65('0x6b')||_0x3f01b6===_0xed65('0x6c')||_0x3f01b6===_0xed65('0x1a')||_0x3f01b6==='ListId'||_0x3f01b6===_0xed65('0x3a')||_0x3f01b6===_0xed65('0x1c')||_0x3f01b6===_0xed65('0x6d')||_0x3f01b6===_0xed65('0x6e')||_0x3f01b6===_0xed65('0x6f')||_0x3f01b6===_0xed65('0x70')||_0x3f01b6==='xmd-listid'||_0x3f01b6==='xmd-dialurl'||_0x3f01b6===_0xed65('0x71')||_0x3f01b6===_0xed65('0x72')||_0x3f01b6==='xmd-dialid'||_0x3f01b6===_0xed65('0x73')||_0x3f01b6===_0xed65('0x74')||_0x3f01b6===_0xed65('0x75')||_0x3f01b6==='xmd-callerid'||_0x3f01b6===_0xed65('0x76')||_0x3f01b6===_0xed65('0x77')||_0x3f01b6===_0xed65('0x78')||_0x3f01b6===_0xed65('0x79')||_0x3f01b6===_0xed65('0x7a')||_0x3f01b6===_0xed65('0x7b')||_0x3f01b6==='rtpaudioqosloss'||_0x3f01b6===_0xed65('0x7c')||_0x3f01b6==='rtpaudioqosrtt'||_0x3f01b6===_0xed65('0x7d')||_0x3f01b6===_0xed65('0x78')||_0x3f01b6===_0xed65('0x79')||_0x3f01b6===_0xed65('0x7a')||_0x3f01b6===_0xed65('0x7b')||_0x3f01b6===_0xed65('0x7e')||_0x3f01b6===_0xed65('0x7c')||_0x3f01b6==='rtpaudioqosrtt'||_0x3f01b6===_0xed65('0x7d')||_0x3f01b6===_0xed65('0x7f')||_0x3f01b6===_0xed65('0x80')||_0x3f01b6===_0xed65('0x32')||_0x3f01b6===_0xed65('0x33')){return![];}return!![];};exports['getCallerIdRandom']=function(_0x14a17c,_0x33014c){var _0xe8cb89,_0x3e376a,_0x4cb34e;if(_0x33014c<=0x0){_0x33014c=0x1;}_0xe8cb89=new RegExp('\x5cw{0,'+_0x33014c+'}$');_0x3e376a=Math[_0xed65('0x81')](0xa,_0x33014c-0x1);_0x4cb34e=Math['pow'](0xa,_0x33014c)-0x1;return util['format']('%s',_[_0xed65('0x82')](_0x14a17c,_0xe8cb89,_[_0xed65('0x83')](_0x3e376a,_0x4cb34e)));};exports['extractCalleridName']=function(_0x22abe1){var _0x3d3f98=_0x22abe1[_0xed65('0x84')](/"(.*?)"/);return _0x3d3f98?_0x3d3f98[0x1]:_0x22abe1;};exports[_0xed65('0x85')]=function(_0xa53ef3){var _0x1757f4=_0xa53ef3[_0xed65('0x84')](/<(.*?)>/);return _0x1757f4?_0x1757f4[0x1]:_0xa53ef3;};
\ No newline at end of file