a2fec8ba3e3ade8e6d52a813f7972fa67815eb00
[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 _0x5f07=['queue','countbusyretry','countcongestionretry','countglobal','countnoanswerretry','countdropretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countabandonedretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','uniqueid','scheduledat','type','campaigntype','outbound'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x5f07,0x96));var _0x75f0=function(_0x1abb09,_0x18ee91){_0x1abb09=_0x1abb09-0x0;var _0xea1c07=_0x5f07[_0x1abb09];return _0xea1c07;};'use strict';var util=require(_0x75f0('0x0'));var _=require(_0x75f0('0x1'));var moment=require(_0x75f0('0x2'));function getSeconds(_0x38bdd9,_0x5ee2da){var _0x4e2ff5=moment(_0x38bdd9)[_0x75f0('0x3')](0x0);var _0x24487d=moment(_0x5ee2da)['milliseconds'](0x0);return _0x4e2ff5[_0x75f0('0x4')](_0x24487d,'seconds');}function Final(_0x4cc4af){this[_0x75f0('0x5')]=_0x4cc4af[_0x75f0('0x5')];this[_0x75f0('0x6')]=_0x4cc4af[_0x75f0('0x6')];this[_0x75f0('0x7')]=_0x4cc4af[_0x75f0('0x7')];this[_0x75f0('0x8')]=_0x4cc4af[_0x75f0('0x7')]===_0x75f0('0x9')?_0x75f0('0xa'):_0x4cc4af[_0x75f0('0x7')];this['countbusyretry']=_0x4cc4af[_0x75f0('0xb')];this[_0x75f0('0xc')]=_0x4cc4af[_0x75f0('0xc')];this['countnoanswerretry']=_0x4cc4af['countnoanswerretry'];this[_0x75f0('0xd')]=_0x4cc4af[_0x75f0('0xb')]+_0x4cc4af[_0x75f0('0xc')]+_0x4cc4af[_0x75f0('0xe')]+_0x4cc4af['countnosuchnumberretry']+_0x4cc4af[_0x75f0('0xf')]+_0x4cc4af['countabandonedretry']+_0x4cc4af[_0x75f0('0x10')]+_0x4cc4af[_0x75f0('0x11')];this['countnosuchnumberretry']=_0x4cc4af[_0x75f0('0x12')];this[_0x75f0('0xf')]=_0x4cc4af['countdropretry'];this[_0x75f0('0x13')]=_0x4cc4af[_0x75f0('0x13')];this[_0x75f0('0x10')]=_0x4cc4af[_0x75f0('0x10')];this['countagentrejectretry']=_0x4cc4af[_0x75f0('0x11')];this[_0x75f0('0xa')]=_0x4cc4af[_0x75f0('0xa')];this[_0x75f0('0x14')]=_0x4cc4af['calleridname'];this[_0x75f0('0x15')]=_0x4cc4af[_0x75f0('0x15')];this[_0x75f0('0x16')]=_0x4cc4af[_0x75f0('0x16')];this[_0x75f0('0x17')]=_0x4cc4af['responsetime'];this[_0x75f0('0x18')]=_0x4cc4af[_0x75f0('0x17')];this[_0x75f0('0x19')]=_0x4cc4af['ringtime']||0x0;this[_0x75f0('0x1a')]=_0x4cc4af[_0x75f0('0x1a')]||0x0;this[_0x75f0('0x1b')]=_0x4cc4af[_0x75f0('0x1b')]||0x0;this['callback']=_0x4cc4af[_0x75f0('0x1c')];this[_0x75f0('0x1d')]=_0x4cc4af['callbackuniqueid'];this[_0x75f0('0x1e')]=_0x4cc4af[_0x75f0('0x1e')];this[_0x75f0('0x1f')]=_0x4cc4af[_0x75f0('0x1f')];this['ContactId']=_0x4cc4af[_0x75f0('0x20')];this['ListId']=_0x4cc4af[_0x75f0('0x21')];this[_0x75f0('0x22')]=_0x4cc4af[_0x75f0('0x22')];this[_0x75f0('0x23')]=_0x4cc4af[_0x75f0('0x23')];this[_0x75f0('0x24')]=_0x4cc4af[_0x75f0('0x24')];this[_0x75f0('0x25')]=_0x4cc4af[_0x75f0('0x25')]||'';this[_0x75f0('0x26')]=_0x4cc4af[_0x75f0('0x26')]||'';}module[_0x75f0('0x27')]=Final;