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