557137c5698960cbd798516c4541d1a88a45a9a6
[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 _0x6138=['VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','moment','../utils','state','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countglobal','countnoanswerretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','uniqueid','calleridname','name','number','starttime','responsetime','answertime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','holdtime','talktime','endtime','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId'];(function(_0x4bca67,_0x135bc1){var _0x5bca77=function(_0x346dc3){while(--_0x346dc3){_0x4bca67['push'](_0x4bca67['shift']());}};_0x5bca77(++_0x135bc1);}(_0x6138,0x113));var _0x8613=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x6138[_0x465028];return _0xb783d4;};'use strict';var moment=require(_0x8613('0x0'));var utils=require(_0x8613('0x1'));function AgentComplete(_0x2484ae,_0x55e126){this[_0x8613('0x2')]=0x4;this['statedesc']=_0x8613('0x3');this['scheduledat']=_0x2484ae[_0x8613('0x4')];this[_0x8613('0x5')]=_0x2484ae['type'];this[_0x8613('0x6')]=_0x2484ae[_0x8613('0x5')]===_0x8613('0x7')?_0x8613('0x8'):_0x2484ae[_0x8613('0x5')];this['countbusyretry']=_0x2484ae[_0x8613('0x9')];this['countcongestionretry']=_0x2484ae[_0x8613('0xa')];this['countnoanswerretry']=_0x2484ae['countnoanswerretry'];this[_0x8613('0xb')]=_0x2484ae[_0x8613('0x9')]+_0x2484ae[_0x8613('0xa')]+_0x2484ae[_0x8613('0xc')]+_0x2484ae['countnosuchnumberretry']+_0x2484ae['countdropretry']+_0x2484ae[_0x8613('0xd')]+_0x2484ae[_0x8613('0xe')]+_0x2484ae[_0x8613('0xf')];this[_0x8613('0x10')]=_0x2484ae['countnosuchnumberretry'];this[_0x8613('0x11')]=_0x2484ae[_0x8613('0x11')];this[_0x8613('0xd')]=_0x2484ae[_0x8613('0xd')];this[_0x8613('0xe')]=_0x2484ae[_0x8613('0xe')];this[_0x8613('0xf')]=_0x2484ae[_0x8613('0xf')];this['uniqueid']=_0x55e126[_0x8613('0x12')];this[_0x8613('0x13')]=_0x2484ae[_0x8613('0x14')];this['calleridnum']=_0x2484ae[_0x8613('0x15')];this['starttime']=_0x2484ae[_0x8613('0x16')];this[_0x8613('0x17')]=_0x2484ae['responsetime'];this[_0x8613('0x18')]=_0x2484ae[_0x8613('0x18')];this['endtime']=moment()[_0x8613('0x19')](_0x8613('0x1a'));this[_0x8613('0x1b')]=utils[_0x8613('0x1c')](_0x2484ae['responsetime'],_0x2484ae[_0x8613('0x16')]);this[_0x8613('0x1d')]=utils[_0x8613('0x1c')](_0x2484ae['answertime'],_0x2484ae[_0x8613('0x17')]);this[_0x8613('0x1e')]=utils[_0x8613('0x1c')](this[_0x8613('0x1f')],_0x2484ae[_0x8613('0x18')]);this[_0x8613('0x8')]=_0x55e126[_0x8613('0x8')];this['membername']=_0x55e126['membername'];this[_0x8613('0x20')]=_0x55e126[_0x8613('0x20')];this[_0x8613('0x21')]=_0x2484ae[_0x8613('0x21')];this[_0x8613('0x22')]=_0x2484ae[_0x8613('0x22')];this[_0x8613('0x23')]=_0x2484ae[_0x8613('0x23')];this['recallme']=_0x2484ae[_0x8613('0x24')];this['ContactId']=_0x2484ae[_0x8613('0x25')];this[_0x8613('0x26')]=_0x2484ae[_0x8613('0x26')];this['UserId']=_0x2484ae[_0x8613('0x27')];this[_0x8613('0x28')]=_0x2484ae['VoiceQueueId'];this[_0x8613('0x29')]=_0x2484ae[_0x8613('0x29')];this['originatecalleridnum']=_0x2484ae[_0x8613('0x2a')]||'';this[_0x8613('0x2b')]=_0x2484ae[_0x8613('0x2b')]||'';this['agiafterat']=_0x2484ae[_0x8613('0x2c')];}module['exports']=AgentComplete;