967e04867d7d6d6377e41cf6ac0f0a718a6da822
[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 _0x693b=['countabandonedretry','countmachineretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','exports','lodash','milliseconds','diff','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countagentrejectretry'];(function(_0x46b840,_0x2fa5b8){var _0x5b8190=function(_0x4277c6){while(--_0x4277c6){_0x46b840['push'](_0x46b840['shift']());}};_0x5b8190(++_0x2fa5b8);}(_0x693b,0x17d));var _0xb693=function(_0x114b3f,_0x554c66){_0x114b3f=_0x114b3f-0x0;var _0x21560d=_0x693b[_0x114b3f];return _0x21560d;};'use strict';var util=require('util');var _=require(_0xb693('0x0'));var moment=require('moment');function getSeconds(_0x6b6099,_0x54185d){var _0x3596eb=moment(_0x6b6099)[_0xb693('0x1')](0x0);var _0x3f8322=moment(_0x54185d)['milliseconds'](0x0);return _0x3596eb[_0xb693('0x2')](_0x3f8322,'seconds');}function Final(_0x511b59){this[_0xb693('0x3')]=_0x511b59['uniqueid'];this[_0xb693('0x4')]=_0x511b59[_0xb693('0x4')];this[_0xb693('0x5')]=_0x511b59[_0xb693('0x5')];this[_0xb693('0x6')]=_0x511b59[_0xb693('0x5')]===_0xb693('0x7')?'queue':_0x511b59[_0xb693('0x5')];this[_0xb693('0x8')]=_0x511b59[_0xb693('0x8')];this['countcongestionretry']=_0x511b59['countcongestionretry'];this[_0xb693('0x9')]=_0x511b59['countnoanswerretry'];this[_0xb693('0xa')]=_0x511b59[_0xb693('0x8')]+_0x511b59[_0xb693('0xb')]+_0x511b59[_0xb693('0x9')]+_0x511b59[_0xb693('0xc')]+_0x511b59[_0xb693('0xd')]+_0x511b59['countabandonedretry']+_0x511b59['countmachineretry']+_0x511b59[_0xb693('0xe')];this[_0xb693('0xc')]=_0x511b59[_0xb693('0xc')];this[_0xb693('0xd')]=_0x511b59[_0xb693('0xd')];this[_0xb693('0xf')]=_0x511b59[_0xb693('0xf')];this[_0xb693('0x10')]=_0x511b59[_0xb693('0x10')];this[_0xb693('0xe')]=_0x511b59[_0xb693('0xe')];this['queue']=_0x511b59['queue'];this[_0xb693('0x11')]=_0x511b59[_0xb693('0x11')];this[_0xb693('0x12')]=_0x511b59['calleridnum'];this[_0xb693('0x13')]=_0x511b59['starttime'];this[_0xb693('0x14')]=_0x511b59['responsetime'];this[_0xb693('0x15')]=_0x511b59[_0xb693('0x14')];this[_0xb693('0x16')]=_0x511b59[_0xb693('0x16')]||0x0;this['holdtime']=_0x511b59[_0xb693('0x17')]||0x0;this[_0xb693('0x18')]=_0x511b59[_0xb693('0x18')]||0x0;this[_0xb693('0x19')]=_0x511b59[_0xb693('0x19')];this['callbackuniqueid']=_0x511b59[_0xb693('0x1a')];this[_0xb693('0x1b')]=_0x511b59['callbackat'];this[_0xb693('0x1c')]=_0x511b59[_0xb693('0x1c')];this[_0xb693('0x1d')]=_0x511b59[_0xb693('0x1d')];this[_0xb693('0x1e')]=_0x511b59[_0xb693('0x1e')];this['UserId']=_0x511b59[_0xb693('0x1f')];this[_0xb693('0x20')]=_0x511b59[_0xb693('0x20')];this[_0xb693('0x21')]=_0x511b59[_0xb693('0x21')];this[_0xb693('0x22')]=_0x511b59['originatecalleridnum']||'';this['originatecalleridname']=_0x511b59['originatecalleridname']||'';}module[_0xb693('0x23')]=Final;