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