ce56102f20467ca1ec57cf1e86d67195701b8242
[motion-next.git] / server / services / ami / dialer / agentComplete.js
1 const a1221_0x3132=['calleridname','responsetime','reason','queue','countdropretry','YYYY-MM-DD\x20HH:mm:ss','Answer','countmachineretry','UserId','answertime','originatecalleridname','membername','ringtime','ContactId','callbackat','seconds','callback','calleridnum','outbound','countagentrejectretry','originatecalleridnum','uniqueid','CampaignId','endtime','starttime','countnoanswerretry','type','talktime','format','campaigntype','scheduledat','callbackuniqueid','exports','moment','countglobal','ListId','countcongestionretry','countbusyretry','holdtime','state','milliseconds','countabandonedretry','countnosuchnumberretry','recallme'];(function(_0x20a6f5,_0x1d7f46){const _0x3132f2=function(_0x34c1a6){while(--_0x34c1a6){_0x20a6f5['push'](_0x20a6f5['shift']());}};_0x3132f2(++_0x1d7f46);}(a1221_0x3132,0x1d6));const a1221_0x34c1=function(_0x20a6f5,_0x1d7f46){_0x20a6f5=_0x20a6f5-0x19f;let _0x3132f2=a1221_0x3132[_0x20a6f5];return _0x3132f2;};const a1221_0x4d0b41=a1221_0x34c1;'use strict';const moment=require(a1221_0x4d0b41(0x1a2));function getSeconds(_0x1d9ec0,_0x375e66){const _0x1ff13e=a1221_0x4d0b41,_0xf48d04=moment(_0x1d9ec0)[_0x1ff13e(0x1a9)](0x0),_0x2358d5=moment(_0x375e66)[_0x1ff13e(0x1a9)](0x0);return _0xf48d04['diff'](_0x2358d5,_0x1ff13e(0x1bc));}function AgentComplete(_0x3cd0ef,_0x34c4d7){const _0xbaf4da=a1221_0x4d0b41;this[_0xbaf4da(0x1a8)]=0x4,this['statedesc']=_0xbaf4da(0x1b3),this[_0xbaf4da(0x19f)]=_0x3cd0ef[_0xbaf4da(0x19f)],this['type']=_0x3cd0ef['type'],this[_0xbaf4da(0x1ca)]=_0x3cd0ef[_0xbaf4da(0x1c7)]===_0xbaf4da(0x1bf)?_0xbaf4da(0x1b0):_0x3cd0ef[_0xbaf4da(0x1c7)],this[_0xbaf4da(0x1a6)]=_0x3cd0ef['countbusyretry'],this[_0xbaf4da(0x1a5)]=_0x3cd0ef['countcongestionretry'],this[_0xbaf4da(0x1c6)]=_0x3cd0ef['countnoanswerretry'],this[_0xbaf4da(0x1a3)]=_0x3cd0ef['countbusyretry']+_0x3cd0ef['countcongestionretry']+_0x3cd0ef[_0xbaf4da(0x1c6)]+_0x3cd0ef[_0xbaf4da(0x1ab)]+_0x3cd0ef[_0xbaf4da(0x1b1)]+_0x3cd0ef[_0xbaf4da(0x1aa)]+_0x3cd0ef[_0xbaf4da(0x1b4)]+_0x3cd0ef[_0xbaf4da(0x1c0)],this[_0xbaf4da(0x1ab)]=_0x3cd0ef['countnosuchnumberretry'],this[_0xbaf4da(0x1b1)]=_0x3cd0ef[_0xbaf4da(0x1b1)],this[_0xbaf4da(0x1aa)]=_0x3cd0ef['countabandonedretry'],this[_0xbaf4da(0x1b4)]=_0x3cd0ef[_0xbaf4da(0x1b4)],this['countagentrejectretry']=_0x3cd0ef[_0xbaf4da(0x1c0)],this['uniqueid']=_0x34c4d7[_0xbaf4da(0x1c2)],this[_0xbaf4da(0x1ad)]=_0x3cd0ef['name'],this[_0xbaf4da(0x1be)]=_0x3cd0ef['number'],this['starttime']=_0x3cd0ef[_0xbaf4da(0x1c5)],this[_0xbaf4da(0x1ae)]=_0x3cd0ef['responsetime'],this[_0xbaf4da(0x1b6)]=_0x3cd0ef['answertime'],this[_0xbaf4da(0x1c4)]=moment()[_0xbaf4da(0x1c9)](_0xbaf4da(0x1b2)),this[_0xbaf4da(0x1b9)]=getSeconds(_0x3cd0ef['responsetime'],_0x3cd0ef['starttime']),this[_0xbaf4da(0x1a7)]=getSeconds(_0x3cd0ef[_0xbaf4da(0x1b6)],_0x3cd0ef['responsetime']),this[_0xbaf4da(0x1c8)]=getSeconds(this[_0xbaf4da(0x1c4)],_0x3cd0ef[_0xbaf4da(0x1b6)]),this[_0xbaf4da(0x1b0)]=_0x34c4d7[_0xbaf4da(0x1b0)],this[_0xbaf4da(0x1b8)]=_0x34c4d7[_0xbaf4da(0x1b8)],this[_0xbaf4da(0x1af)]=_0x34c4d7['reason'],this[_0xbaf4da(0x1bd)]=_0x3cd0ef[_0xbaf4da(0x1bd)],this[_0xbaf4da(0x1a0)]=_0x3cd0ef[_0xbaf4da(0x1a0)],this[_0xbaf4da(0x1bb)]=_0x3cd0ef[_0xbaf4da(0x1bb)],this[_0xbaf4da(0x1ac)]=_0x3cd0ef[_0xbaf4da(0x1ac)],this[_0xbaf4da(0x1ba)]=_0x3cd0ef[_0xbaf4da(0x1ba)],this['ListId']=_0x3cd0ef[_0xbaf4da(0x1a4)],this[_0xbaf4da(0x1b5)]=_0x3cd0ef[_0xbaf4da(0x1b5)],this['VoiceQueueId']=_0x3cd0ef['VoiceQueueId'],this[_0xbaf4da(0x1c3)]=_0x3cd0ef['CampaignId'],this[_0xbaf4da(0x1c1)]=_0x3cd0ef[_0xbaf4da(0x1c1)]||'',this['originatecalleridname']=_0x3cd0ef[_0xbaf4da(0x1b7)]||'';}module[a1221_0x4d0b41(0x1a1)]=AgentComplete;