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