887d16f8be02f1c06e99439cac8d729568d6f343
[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 _0x7118=['talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','calleridname','calleridnum','starttime','endtime','responsetime','ringtime','holdtime'];(function(_0x310994,_0x4c5d81){var _0x3c0b9a=function(_0x59b166){while(--_0x59b166){_0x310994['push'](_0x310994['shift']());}};_0x3c0b9a(++_0x4c5d81);}(_0x7118,0x159));var _0x8711=function(_0x2a154b,_0x49f028){_0x2a154b=_0x2a154b-0x0;var _0x26b084=_0x7118[_0x2a154b];return _0x26b084;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x8711('0x0'));function getSeconds(_0xf50b2e,_0x5c64d4){var _0x1758c5=moment(_0xf50b2e)[_0x8711('0x1')](0x0);var _0x348e88=moment(_0x5c64d4)[_0x8711('0x1')](0x0);return _0x1758c5[_0x8711('0x2')](_0x348e88,_0x8711('0x3'));}function Final(_0x206b82){this['uniqueid']=_0x206b82[_0x8711('0x4')];this[_0x8711('0x5')]=_0x206b82[_0x8711('0x5')];this[_0x8711('0x6')]=_0x206b82[_0x8711('0x6')];this[_0x8711('0x7')]=_0x206b82[_0x8711('0x6')]===_0x8711('0x8')?_0x8711('0x9'):_0x206b82[_0x8711('0x6')];this[_0x8711('0xa')]=_0x206b82['countbusyretry'];this['countcongestionretry']=_0x206b82[_0x8711('0xb')];this[_0x8711('0xc')]=_0x206b82[_0x8711('0xc')];this['countglobal']=_0x206b82['countbusyretry']+_0x206b82[_0x8711('0xb')]+_0x206b82[_0x8711('0xc')]+_0x206b82['countnosuchnumberretry']+_0x206b82['countdropretry']+_0x206b82[_0x8711('0xd')]+_0x206b82[_0x8711('0xe')]+_0x206b82[_0x8711('0xf')];this[_0x8711('0x10')]=_0x206b82[_0x8711('0x10')];this[_0x8711('0x11')]=_0x206b82[_0x8711('0x11')];this['countabandonedretry']=_0x206b82[_0x8711('0xd')];this[_0x8711('0xe')]=_0x206b82[_0x8711('0xe')];this[_0x8711('0xf')]=_0x206b82[_0x8711('0xf')];this[_0x8711('0x9')]=_0x206b82['queue'];this[_0x8711('0x12')]=_0x206b82[_0x8711('0x12')];this[_0x8711('0x13')]=_0x206b82[_0x8711('0x13')];this[_0x8711('0x14')]=_0x206b82['starttime'];this['responsetime']=_0x206b82['responsetime'];this[_0x8711('0x15')]=_0x206b82[_0x8711('0x16')];this[_0x8711('0x17')]=_0x206b82['ringtime']||0x0;this['holdtime']=_0x206b82[_0x8711('0x18')]||0x0;this[_0x8711('0x19')]=_0x206b82[_0x8711('0x19')]||0x0;this[_0x8711('0x1a')]=_0x206b82[_0x8711('0x1a')];this[_0x8711('0x1b')]=_0x206b82[_0x8711('0x1b')];this[_0x8711('0x1c')]=_0x206b82[_0x8711('0x1c')];this[_0x8711('0x1d')]=_0x206b82['recallme'];this[_0x8711('0x1e')]=_0x206b82[_0x8711('0x1e')];this[_0x8711('0x1f')]=_0x206b82[_0x8711('0x1f')];this['UserId']=_0x206b82[_0x8711('0x20')];this[_0x8711('0x21')]=_0x206b82[_0x8711('0x21')];this['CampaignId']=_0x206b82[_0x8711('0x22')];this[_0x8711('0x23')]=_0x206b82[_0x8711('0x23')]||'';this[_0x8711('0x24')]=_0x206b82[_0x8711('0x24')]||'';}module['exports']=Final;