Built motion from commit (unavailable).|2.5.4
[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 _0x95e9=['VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countdropretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x95e9,0x108));var _0x995e=function(_0x31ade7,_0x4a2dab){_0x31ade7=_0x31ade7-0x0;var _0x1b20ad=_0x95e9[_0x31ade7];return _0x1b20ad;};'use strict';var util=require(_0x995e('0x0'));var _=require(_0x995e('0x1'));var moment=require('moment');function getSeconds(_0x25bd99,_0x5b801d){var _0x283cdb=moment(_0x25bd99)[_0x995e('0x2')](0x0);var _0x56a6e7=moment(_0x5b801d)['milliseconds'](0x0);return _0x283cdb['diff'](_0x56a6e7,_0x995e('0x3'));}function Final(_0x2526c2){this[_0x995e('0x4')]=_0x2526c2[_0x995e('0x4')];this[_0x995e('0x5')]=_0x2526c2['scheduledat'];this['type']=_0x2526c2[_0x995e('0x6')];this[_0x995e('0x7')]=_0x2526c2[_0x995e('0x6')]===_0x995e('0x8')?'queue':_0x2526c2[_0x995e('0x6')];this['countbusyretry']=_0x2526c2[_0x995e('0x9')];this[_0x995e('0xa')]=_0x2526c2['countcongestionretry'];this[_0x995e('0xb')]=_0x2526c2[_0x995e('0xb')];this[_0x995e('0xc')]=_0x2526c2[_0x995e('0x9')]+_0x2526c2[_0x995e('0xa')]+_0x2526c2['countnoanswerretry']+_0x2526c2[_0x995e('0xd')]+_0x2526c2['countdropretry']+_0x2526c2[_0x995e('0xe')]+_0x2526c2[_0x995e('0xf')]+_0x2526c2['countagentrejectretry'];this['countnosuchnumberretry']=_0x2526c2[_0x995e('0xd')];this[_0x995e('0x10')]=_0x2526c2[_0x995e('0x10')];this['countabandonedretry']=_0x2526c2[_0x995e('0xe')];this['countmachineretry']=_0x2526c2[_0x995e('0xf')];this[_0x995e('0x11')]=_0x2526c2[_0x995e('0x11')];this['queue']=_0x2526c2['queue'];this['calleridname']=_0x2526c2[_0x995e('0x12')];this[_0x995e('0x13')]=_0x2526c2[_0x995e('0x13')];this[_0x995e('0x14')]=_0x2526c2[_0x995e('0x14')];this[_0x995e('0x15')]=_0x2526c2[_0x995e('0x15')];this['endtime']=_0x2526c2[_0x995e('0x15')];this[_0x995e('0x16')]=_0x2526c2[_0x995e('0x16')]||0x0;this[_0x995e('0x17')]=_0x2526c2[_0x995e('0x17')]||0x0;this[_0x995e('0x18')]=_0x2526c2[_0x995e('0x18')]||0x0;this['callback']=_0x2526c2[_0x995e('0x19')];this[_0x995e('0x1a')]=_0x2526c2['callbackuniqueid'];this[_0x995e('0x1b')]=_0x2526c2[_0x995e('0x1b')];this[_0x995e('0x1c')]=_0x2526c2['recallme'];this[_0x995e('0x1d')]=_0x2526c2[_0x995e('0x1d')];this[_0x995e('0x1e')]=_0x2526c2[_0x995e('0x1e')];this['UserId']=_0x2526c2[_0x995e('0x1f')];this[_0x995e('0x20')]=_0x2526c2[_0x995e('0x20')];this[_0x995e('0x21')]=_0x2526c2['CampaignId'];this[_0x995e('0x22')]=_0x2526c2[_0x995e('0x22')]||'';this[_0x995e('0x23')]=_0x2526c2[_0x995e('0x23')]||'';}module[_0x995e('0x24')]=Final;