Built motion from commit 5b761a7b.|2.5.36
[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 _0xa9b1=['countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','moment','milliseconds','uniqueid','scheduledat','type','campaigntype','outbound','queue'];(function(_0x496800,_0x1d75f0){var _0x4646ed=function(_0x3e0b1f){while(--_0x3e0b1f){_0x496800['push'](_0x496800['shift']());}};_0x4646ed(++_0x1d75f0);}(_0xa9b1,0x133));var _0x1a9b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa9b1[_0x3dd15e];return _0x231fd0;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x1a9b('0x0'));function getSeconds(_0xf563ae,_0x11c1ff){var _0x3f42db=moment(_0xf563ae)[_0x1a9b('0x1')](0x0);var _0x10c90c=moment(_0x11c1ff)['milliseconds'](0x0);return _0x3f42db['diff'](_0x10c90c,'seconds');}function Final(_0x307aba){this[_0x1a9b('0x2')]=_0x307aba[_0x1a9b('0x2')];this[_0x1a9b('0x3')]=_0x307aba[_0x1a9b('0x3')];this[_0x1a9b('0x4')]=_0x307aba[_0x1a9b('0x4')];this[_0x1a9b('0x5')]=_0x307aba[_0x1a9b('0x4')]===_0x1a9b('0x6')?_0x1a9b('0x7'):_0x307aba[_0x1a9b('0x4')];this['countbusyretry']=_0x307aba['countbusyretry'];this[_0x1a9b('0x8')]=_0x307aba[_0x1a9b('0x8')];this[_0x1a9b('0x9')]=_0x307aba['countnoanswerretry'];this['countglobal']=_0x307aba['countbusyretry']+_0x307aba[_0x1a9b('0x8')]+_0x307aba[_0x1a9b('0x9')]+_0x307aba[_0x1a9b('0xa')]+_0x307aba[_0x1a9b('0xb')]+_0x307aba[_0x1a9b('0xc')]+_0x307aba[_0x1a9b('0xd')]+_0x307aba['countagentrejectretry'];this[_0x1a9b('0xa')]=_0x307aba[_0x1a9b('0xa')];this[_0x1a9b('0xb')]=_0x307aba['countdropretry'];this[_0x1a9b('0xc')]=_0x307aba[_0x1a9b('0xc')];this['countmachineretry']=_0x307aba[_0x1a9b('0xd')];this['countagentrejectretry']=_0x307aba[_0x1a9b('0xe')];this[_0x1a9b('0x7')]=_0x307aba[_0x1a9b('0x7')];this[_0x1a9b('0xf')]=_0x307aba[_0x1a9b('0xf')];this[_0x1a9b('0x10')]=_0x307aba[_0x1a9b('0x10')];this[_0x1a9b('0x11')]=_0x307aba[_0x1a9b('0x11')];this[_0x1a9b('0x12')]=_0x307aba['responsetime'];this[_0x1a9b('0x13')]=_0x307aba[_0x1a9b('0x12')];this[_0x1a9b('0x14')]=_0x307aba[_0x1a9b('0x14')]||0x0;this['holdtime']=_0x307aba[_0x1a9b('0x15')]||0x0;this[_0x1a9b('0x16')]=_0x307aba['talktime']||0x0;this[_0x1a9b('0x17')]=_0x307aba[_0x1a9b('0x17')];this[_0x1a9b('0x18')]=_0x307aba[_0x1a9b('0x18')];this[_0x1a9b('0x19')]=_0x307aba['callbackat'];this[_0x1a9b('0x1a')]=_0x307aba[_0x1a9b('0x1a')];this[_0x1a9b('0x1b')]=_0x307aba[_0x1a9b('0x1b')];this[_0x1a9b('0x1c')]=_0x307aba[_0x1a9b('0x1c')];this[_0x1a9b('0x1d')]=_0x307aba['UserId'];this[_0x1a9b('0x1e')]=_0x307aba['VoiceQueueId'];this[_0x1a9b('0x1f')]=_0x307aba[_0x1a9b('0x1f')];this[_0x1a9b('0x20')]=_0x307aba['originatecalleridnum']||'';this[_0x1a9b('0x21')]=_0x307aba[_0x1a9b('0x21')]||'';}module[_0x1a9b('0x22')]=Final;