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