Built motion from commit 87cd5f02.|2.5.48
[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 _0xbacd=['talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xbacd,0x1c5));var _0xdbac=function(_0x4da53e,_0x46dd54){_0x4da53e=_0x4da53e-0x0;var _0x5bf60b=_0xbacd[_0x4da53e];return _0x5bf60b;};'use strict';var util=require(_0xdbac('0x0'));var _=require(_0xdbac('0x1'));var moment=require('moment');function getSeconds(_0x2acc37,_0x7068d9){var _0x43f7e4=moment(_0x2acc37)['milliseconds'](0x0);var _0x34099f=moment(_0x7068d9)[_0xdbac('0x2')](0x0);return _0x43f7e4[_0xdbac('0x3')](_0x34099f,_0xdbac('0x4'));}function Final(_0x1b67fc){this[_0xdbac('0x5')]=_0x1b67fc[_0xdbac('0x5')];this[_0xdbac('0x6')]=_0x1b67fc[_0xdbac('0x6')];this[_0xdbac('0x7')]=_0x1b67fc[_0xdbac('0x7')];this[_0xdbac('0x8')]=_0x1b67fc[_0xdbac('0x7')]===_0xdbac('0x9')?_0xdbac('0xa'):_0x1b67fc['type'];this[_0xdbac('0xb')]=_0x1b67fc[_0xdbac('0xb')];this['countcongestionretry']=_0x1b67fc[_0xdbac('0xc')];this['countnoanswerretry']=_0x1b67fc[_0xdbac('0xd')];this[_0xdbac('0xe')]=_0x1b67fc[_0xdbac('0xb')]+_0x1b67fc[_0xdbac('0xc')]+_0x1b67fc[_0xdbac('0xd')]+_0x1b67fc[_0xdbac('0xf')]+_0x1b67fc[_0xdbac('0x10')]+_0x1b67fc[_0xdbac('0x11')]+_0x1b67fc[_0xdbac('0x12')]+_0x1b67fc['countagentrejectretry'];this[_0xdbac('0xf')]=_0x1b67fc[_0xdbac('0xf')];this[_0xdbac('0x10')]=_0x1b67fc[_0xdbac('0x10')];this[_0xdbac('0x11')]=_0x1b67fc[_0xdbac('0x11')];this[_0xdbac('0x12')]=_0x1b67fc[_0xdbac('0x12')];this['countagentrejectretry']=_0x1b67fc[_0xdbac('0x13')];this[_0xdbac('0xa')]=_0x1b67fc[_0xdbac('0xa')];this['calleridname']=_0x1b67fc[_0xdbac('0x14')];this[_0xdbac('0x15')]=_0x1b67fc[_0xdbac('0x15')];this[_0xdbac('0x16')]=_0x1b67fc[_0xdbac('0x16')];this[_0xdbac('0x17')]=_0x1b67fc[_0xdbac('0x17')];this[_0xdbac('0x18')]=_0x1b67fc[_0xdbac('0x17')];this[_0xdbac('0x19')]=_0x1b67fc[_0xdbac('0x19')]||0x0;this[_0xdbac('0x1a')]=_0x1b67fc['holdtime']||0x0;this[_0xdbac('0x1b')]=_0x1b67fc[_0xdbac('0x1b')]||0x0;this['callback']=_0x1b67fc[_0xdbac('0x1c')];this['callbackuniqueid']=_0x1b67fc[_0xdbac('0x1d')];this['callbackat']=_0x1b67fc[_0xdbac('0x1e')];this[_0xdbac('0x1f')]=_0x1b67fc[_0xdbac('0x1f')];this[_0xdbac('0x20')]=_0x1b67fc[_0xdbac('0x20')];this[_0xdbac('0x21')]=_0x1b67fc[_0xdbac('0x21')];this['UserId']=_0x1b67fc[_0xdbac('0x22')];this[_0xdbac('0x23')]=_0x1b67fc[_0xdbac('0x23')];this[_0xdbac('0x24')]=_0x1b67fc[_0xdbac('0x24')];this[_0xdbac('0x25')]=_0x1b67fc[_0xdbac('0x25')]||'';this[_0xdbac('0x26')]=_0x1b67fc[_0xdbac('0x26')]||'';}module[_0xdbac('0x27')]=Final;