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