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