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