Built motion from commit 9e1399f3.|2.5.37
[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 _0x81bd=['CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countdropretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId'];(function(_0x1a3243,_0x201872){var _0x33f2ca=function(_0x59d32e){while(--_0x59d32e){_0x1a3243['push'](_0x1a3243['shift']());}};_0x33f2ca(++_0x201872);}(_0x81bd,0x7c));var _0xd81b=function(_0x594821,_0x153b6c){_0x594821=_0x594821-0x0;var _0x139112=_0x81bd[_0x594821];return _0x139112;};'use strict';var util=require(_0xd81b('0x0'));var _=require(_0xd81b('0x1'));var moment=require(_0xd81b('0x2'));function getSeconds(_0x2337b1,_0x2d27cb){var _0x2ec03a=moment(_0x2337b1)[_0xd81b('0x3')](0x0);var _0x54e096=moment(_0x2d27cb)[_0xd81b('0x3')](0x0);return _0x2ec03a[_0xd81b('0x4')](_0x54e096,_0xd81b('0x5'));}function Final(_0x4d8e7e){this[_0xd81b('0x6')]=_0x4d8e7e[_0xd81b('0x6')];this[_0xd81b('0x7')]=_0x4d8e7e['scheduledat'];this['type']=_0x4d8e7e[_0xd81b('0x8')];this['campaigntype']=_0x4d8e7e[_0xd81b('0x8')]===_0xd81b('0x9')?_0xd81b('0xa'):_0x4d8e7e[_0xd81b('0x8')];this[_0xd81b('0xb')]=_0x4d8e7e[_0xd81b('0xb')];this[_0xd81b('0xc')]=_0x4d8e7e[_0xd81b('0xc')];this[_0xd81b('0xd')]=_0x4d8e7e[_0xd81b('0xd')];this[_0xd81b('0xe')]=_0x4d8e7e[_0xd81b('0xb')]+_0x4d8e7e[_0xd81b('0xc')]+_0x4d8e7e['countnoanswerretry']+_0x4d8e7e[_0xd81b('0xf')]+_0x4d8e7e['countdropretry']+_0x4d8e7e[_0xd81b('0x10')]+_0x4d8e7e[_0xd81b('0x11')]+_0x4d8e7e['countagentrejectretry'];this[_0xd81b('0xf')]=_0x4d8e7e['countnosuchnumberretry'];this[_0xd81b('0x12')]=_0x4d8e7e[_0xd81b('0x12')];this[_0xd81b('0x10')]=_0x4d8e7e[_0xd81b('0x10')];this[_0xd81b('0x11')]=_0x4d8e7e['countmachineretry'];this[_0xd81b('0x13')]=_0x4d8e7e[_0xd81b('0x13')];this['queue']=_0x4d8e7e[_0xd81b('0xa')];this[_0xd81b('0x14')]=_0x4d8e7e[_0xd81b('0x14')];this[_0xd81b('0x15')]=_0x4d8e7e[_0xd81b('0x15')];this[_0xd81b('0x16')]=_0x4d8e7e[_0xd81b('0x16')];this[_0xd81b('0x17')]=_0x4d8e7e[_0xd81b('0x17')];this[_0xd81b('0x18')]=_0x4d8e7e[_0xd81b('0x17')];this[_0xd81b('0x19')]=_0x4d8e7e[_0xd81b('0x19')]||0x0;this[_0xd81b('0x1a')]=_0x4d8e7e[_0xd81b('0x1a')]||0x0;this[_0xd81b('0x1b')]=_0x4d8e7e['talktime']||0x0;this['callback']=_0x4d8e7e[_0xd81b('0x1c')];this[_0xd81b('0x1d')]=_0x4d8e7e[_0xd81b('0x1d')];this['callbackat']=_0x4d8e7e[_0xd81b('0x1e')];this[_0xd81b('0x1f')]=_0x4d8e7e['recallme'];this[_0xd81b('0x20')]=_0x4d8e7e[_0xd81b('0x20')];this[_0xd81b('0x21')]=_0x4d8e7e[_0xd81b('0x21')];this[_0xd81b('0x22')]=_0x4d8e7e[_0xd81b('0x22')];this[_0xd81b('0x23')]=_0x4d8e7e[_0xd81b('0x23')];this[_0xd81b('0x24')]=_0x4d8e7e[_0xd81b('0x24')];this[_0xd81b('0x25')]=_0x4d8e7e[_0xd81b('0x25')]||'';this['originatecalleridname']=_0x4d8e7e[_0xd81b('0x26')]||'';}module[_0xd81b('0x27')]=Final;