855865e4fb963031d833178ba8ab900ecf0ae1ee
[motion2.git] / server / services / ami / dialer / models / agentComplete.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x99f2=['countglobal','countdropretry','countabandonedretry','countnosuchnumberretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','answertime','endtime','format','ringtime','getSeconds','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','exports','moment','../utils','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry'];(function(_0x41e6b8,_0x20b578){var _0x1574d1=function(_0x1639de){while(--_0x1639de){_0x41e6b8['push'](_0x41e6b8['shift']());}};_0x1574d1(++_0x20b578);}(_0x99f2,0xab));var _0x299f=function(_0x1d734f,_0x2f2d3a){_0x1d734f=_0x1d734f-0x0;var _0x4bf9ca=_0x99f2[_0x1d734f];return _0x4bf9ca;};'use strict';var moment=require(_0x299f('0x0'));var utils=require(_0x299f('0x1'));function AgentComplete(_0xd1919c,_0x1f937e){this[_0x299f('0x2')]=0x4;this[_0x299f('0x3')]=_0x299f('0x4');this[_0x299f('0x5')]=_0xd1919c[_0x299f('0x5')];this[_0x299f('0x6')]=_0xd1919c[_0x299f('0x6')];this[_0x299f('0x7')]=_0xd1919c[_0x299f('0x6')]===_0x299f('0x8')?_0x299f('0x9'):_0xd1919c[_0x299f('0x6')];this[_0x299f('0xa')]=_0xd1919c['countbusyretry'];this['countcongestionretry']=_0xd1919c[_0x299f('0xb')];this[_0x299f('0xc')]=_0xd1919c['countnoanswerretry'];this[_0x299f('0xd')]=_0xd1919c[_0x299f('0xa')]+_0xd1919c[_0x299f('0xb')]+_0xd1919c[_0x299f('0xc')]+_0xd1919c['countnosuchnumberretry']+_0xd1919c[_0x299f('0xe')]+_0xd1919c[_0x299f('0xf')]+_0xd1919c['countmachineretry']+_0xd1919c['countagentrejectretry'];this[_0x299f('0x10')]=_0xd1919c[_0x299f('0x10')];this[_0x299f('0xe')]=_0xd1919c[_0x299f('0xe')];this[_0x299f('0xf')]=_0xd1919c[_0x299f('0xf')];this[_0x299f('0x11')]=_0xd1919c[_0x299f('0x11')];this[_0x299f('0x12')]=_0xd1919c[_0x299f('0x12')];this[_0x299f('0x13')]=_0x1f937e[_0x299f('0x13')];this[_0x299f('0x14')]=_0xd1919c['name'];this[_0x299f('0x15')]=_0xd1919c[_0x299f('0x16')];this[_0x299f('0x17')]=_0xd1919c[_0x299f('0x17')];this[_0x299f('0x18')]=_0xd1919c['responsetime'];this[_0x299f('0x19')]=_0xd1919c[_0x299f('0x19')];this[_0x299f('0x1a')]=moment()[_0x299f('0x1b')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x299f('0x1c')]=utils[_0x299f('0x1d')](_0xd1919c[_0x299f('0x18')],_0xd1919c[_0x299f('0x17')]);this[_0x299f('0x1e')]=utils['getSeconds'](_0xd1919c[_0x299f('0x19')],_0xd1919c['responsetime']);this[_0x299f('0x1f')]=utils[_0x299f('0x1d')](this['endtime'],_0xd1919c[_0x299f('0x19')]);this[_0x299f('0x9')]=_0x1f937e[_0x299f('0x9')];this[_0x299f('0x20')]=_0x1f937e['membername'];this[_0x299f('0x21')]=_0x1f937e[_0x299f('0x21')];this['callback']=_0xd1919c[_0x299f('0x22')];this[_0x299f('0x23')]=_0xd1919c[_0x299f('0x23')];this[_0x299f('0x24')]=_0xd1919c['callbackat'];this[_0x299f('0x25')]=_0xd1919c[_0x299f('0x25')];this[_0x299f('0x26')]=_0xd1919c[_0x299f('0x26')];this[_0x299f('0x27')]=_0xd1919c[_0x299f('0x27')];this['UserId']=_0xd1919c['UserId'];this['VoiceQueueId']=_0xd1919c[_0x299f('0x28')];this[_0x299f('0x29')]=_0xd1919c[_0x299f('0x29')];this[_0x299f('0x2a')]=_0xd1919c[_0x299f('0x2a')]||'';this[_0x299f('0x2b')]=_0xd1919c[_0x299f('0x2b')]||'';this['agiafterat']=_0xd1919c[_0x299f('0x2c')];}module[_0x299f('0x2d')]=AgentComplete;