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