Built motion from commit 936e8062.|2.5.33
[motion2.git] / server / services / ami / dialer / final.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 _0x0207=['countagentrejectretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','lodash','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry'];(function(_0x53b16e,_0x39c561){var _0x246cbd=function(_0xee14d9){while(--_0xee14d9){_0x53b16e['push'](_0x53b16e['shift']());}};_0x246cbd(++_0x39c561);}(_0x0207,0x162));var _0x7020=function(_0x17db01,_0x4e3110){_0x17db01=_0x17db01-0x0;var _0x5b02aa=_0x0207[_0x17db01];return _0x5b02aa;};'use strict';var util=require('util');var _=require(_0x7020('0x0'));var moment=require('moment');function getSeconds(_0x49775a,_0x1a481c){var _0x28ab1d=moment(_0x49775a)[_0x7020('0x1')](0x0);var _0x15db09=moment(_0x1a481c)[_0x7020('0x1')](0x0);return _0x28ab1d[_0x7020('0x2')](_0x15db09,_0x7020('0x3'));}function Final(_0x5b7cf1){this['uniqueid']=_0x5b7cf1[_0x7020('0x4')];this[_0x7020('0x5')]=_0x5b7cf1[_0x7020('0x5')];this[_0x7020('0x6')]=_0x5b7cf1[_0x7020('0x6')];this[_0x7020('0x7')]=_0x5b7cf1[_0x7020('0x6')]==='outbound'?'queue':_0x5b7cf1[_0x7020('0x6')];this[_0x7020('0x8')]=_0x5b7cf1[_0x7020('0x8')];this['countcongestionretry']=_0x5b7cf1[_0x7020('0x9')];this[_0x7020('0xa')]=_0x5b7cf1['countnoanswerretry'];this[_0x7020('0xb')]=_0x5b7cf1[_0x7020('0x8')]+_0x5b7cf1[_0x7020('0x9')]+_0x5b7cf1['countnoanswerretry']+_0x5b7cf1[_0x7020('0xc')]+_0x5b7cf1[_0x7020('0xd')]+_0x5b7cf1[_0x7020('0xe')]+_0x5b7cf1[_0x7020('0xf')]+_0x5b7cf1[_0x7020('0x10')];this['countnosuchnumberretry']=_0x5b7cf1[_0x7020('0xc')];this['countdropretry']=_0x5b7cf1[_0x7020('0xd')];this[_0x7020('0xe')]=_0x5b7cf1[_0x7020('0xe')];this[_0x7020('0xf')]=_0x5b7cf1[_0x7020('0xf')];this[_0x7020('0x10')]=_0x5b7cf1['countagentrejectretry'];this[_0x7020('0x11')]=_0x5b7cf1['queue'];this[_0x7020('0x12')]=_0x5b7cf1[_0x7020('0x12')];this[_0x7020('0x13')]=_0x5b7cf1[_0x7020('0x13')];this['starttime']=_0x5b7cf1[_0x7020('0x14')];this[_0x7020('0x15')]=_0x5b7cf1[_0x7020('0x15')];this[_0x7020('0x16')]=_0x5b7cf1[_0x7020('0x15')];this[_0x7020('0x17')]=_0x5b7cf1['ringtime']||0x0;this['holdtime']=_0x5b7cf1[_0x7020('0x18')]||0x0;this[_0x7020('0x19')]=_0x5b7cf1[_0x7020('0x19')]||0x0;this[_0x7020('0x1a')]=_0x5b7cf1['callback'];this[_0x7020('0x1b')]=_0x5b7cf1[_0x7020('0x1b')];this[_0x7020('0x1c')]=_0x5b7cf1[_0x7020('0x1c')];this['recallme']=_0x5b7cf1[_0x7020('0x1d')];this[_0x7020('0x1e')]=_0x5b7cf1[_0x7020('0x1e')];this[_0x7020('0x1f')]=_0x5b7cf1[_0x7020('0x1f')];this[_0x7020('0x20')]=_0x5b7cf1[_0x7020('0x20')];this[_0x7020('0x21')]=_0x5b7cf1['VoiceQueueId'];this[_0x7020('0x22')]=_0x5b7cf1[_0x7020('0x22')];this[_0x7020('0x23')]=_0x5b7cf1['originatecalleridnum']||'';this[_0x7020('0x24')]=_0x5b7cf1['originatecalleridname']||'';}module['exports']=Final;