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