Built motion from commit (unavailable).|2.5.21
[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 _0xd5d0=['campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','seconds','uniqueid','scheduledat','type'];(function(_0x135487,_0x59564f){var _0x2a768d=function(_0x63024d){while(--_0x63024d){_0x135487['push'](_0x135487['shift']());}};_0x2a768d(++_0x59564f);}(_0xd5d0,0x1cd));var _0x0d5d=function(_0x58622c,_0x10d530){_0x58622c=_0x58622c-0x0;var _0x2479a2=_0xd5d0[_0x58622c];return _0x2479a2;};'use strict';var util=require(_0x0d5d('0x0'));var _=require(_0x0d5d('0x1'));var moment=require('moment');function getSeconds(_0x19871c,_0x14a4ad){var _0x53a971=moment(_0x19871c)[_0x0d5d('0x2')](0x0);var _0x502365=moment(_0x14a4ad)['milliseconds'](0x0);return _0x53a971['diff'](_0x502365,_0x0d5d('0x3'));}function Final(_0x3d18ba){this[_0x0d5d('0x4')]=_0x3d18ba[_0x0d5d('0x4')];this[_0x0d5d('0x5')]=_0x3d18ba['scheduledat'];this['type']=_0x3d18ba[_0x0d5d('0x6')];this[_0x0d5d('0x7')]=_0x3d18ba[_0x0d5d('0x6')]===_0x0d5d('0x8')?'queue':_0x3d18ba[_0x0d5d('0x6')];this[_0x0d5d('0x9')]=_0x3d18ba[_0x0d5d('0x9')];this['countcongestionretry']=_0x3d18ba[_0x0d5d('0xa')];this[_0x0d5d('0xb')]=_0x3d18ba[_0x0d5d('0xb')];this[_0x0d5d('0xc')]=_0x3d18ba[_0x0d5d('0x9')]+_0x3d18ba[_0x0d5d('0xa')]+_0x3d18ba[_0x0d5d('0xb')]+_0x3d18ba[_0x0d5d('0xd')]+_0x3d18ba[_0x0d5d('0xe')]+_0x3d18ba[_0x0d5d('0xf')]+_0x3d18ba['countmachineretry']+_0x3d18ba[_0x0d5d('0x10')];this[_0x0d5d('0xd')]=_0x3d18ba[_0x0d5d('0xd')];this[_0x0d5d('0xe')]=_0x3d18ba[_0x0d5d('0xe')];this[_0x0d5d('0xf')]=_0x3d18ba['countabandonedretry'];this[_0x0d5d('0x11')]=_0x3d18ba[_0x0d5d('0x11')];this['countagentrejectretry']=_0x3d18ba[_0x0d5d('0x10')];this['queue']=_0x3d18ba[_0x0d5d('0x12')];this[_0x0d5d('0x13')]=_0x3d18ba['calleridname'];this[_0x0d5d('0x14')]=_0x3d18ba[_0x0d5d('0x14')];this[_0x0d5d('0x15')]=_0x3d18ba[_0x0d5d('0x15')];this['responsetime']=_0x3d18ba[_0x0d5d('0x16')];this[_0x0d5d('0x17')]=_0x3d18ba['responsetime'];this[_0x0d5d('0x18')]=_0x3d18ba['ringtime']||0x0;this[_0x0d5d('0x19')]=_0x3d18ba['holdtime']||0x0;this[_0x0d5d('0x1a')]=_0x3d18ba[_0x0d5d('0x1a')]||0x0;this['callback']=_0x3d18ba[_0x0d5d('0x1b')];this['callbackuniqueid']=_0x3d18ba[_0x0d5d('0x1c')];this[_0x0d5d('0x1d')]=_0x3d18ba['callbackat'];this[_0x0d5d('0x1e')]=_0x3d18ba[_0x0d5d('0x1e')];this[_0x0d5d('0x1f')]=_0x3d18ba['ContactId'];this['ListId']=_0x3d18ba[_0x0d5d('0x20')];this[_0x0d5d('0x21')]=_0x3d18ba[_0x0d5d('0x21')];this[_0x0d5d('0x22')]=_0x3d18ba['VoiceQueueId'];this[_0x0d5d('0x23')]=_0x3d18ba['CampaignId'];this[_0x0d5d('0x24')]=_0x3d18ba[_0x0d5d('0x24')]||'';this[_0x0d5d('0x25')]=_0x3d18ba[_0x0d5d('0x25')]||'';}module[_0x0d5d('0x26')]=Final;