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