481c099dcfac0386419cfb2febe47552d6f2e117
[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 _0xd6d6=['util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','calleridname','starttime','responsetime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports'];(function(_0x4169d5,_0x20c845){var _0x10f11f=function(_0x3e8196){while(--_0x3e8196){_0x4169d5['push'](_0x4169d5['shift']());}};_0x10f11f(++_0x20c845);}(_0xd6d6,0xbe));var _0x6d6d=function(_0x49cdb6,_0x304ae8){_0x49cdb6=_0x49cdb6-0x0;var _0x33a5e2=_0xd6d6[_0x49cdb6];return _0x33a5e2;};'use strict';var util=require(_0x6d6d('0x0'));var _=require(_0x6d6d('0x1'));var moment=require(_0x6d6d('0x2'));function getSeconds(_0x33226e,_0x536523){var _0x2e1aed=moment(_0x33226e)[_0x6d6d('0x3')](0x0);var _0x1b8610=moment(_0x536523)[_0x6d6d('0x3')](0x0);return _0x2e1aed[_0x6d6d('0x4')](_0x1b8610,_0x6d6d('0x5'));}function Final(_0x35a813){this['uniqueid']=_0x35a813[_0x6d6d('0x6')];this[_0x6d6d('0x7')]=_0x35a813[_0x6d6d('0x7')];this[_0x6d6d('0x8')]=_0x35a813[_0x6d6d('0x8')];this[_0x6d6d('0x9')]=_0x35a813[_0x6d6d('0x8')]==='outbound'?'queue':_0x35a813[_0x6d6d('0x8')];this[_0x6d6d('0xa')]=_0x35a813[_0x6d6d('0xa')];this[_0x6d6d('0xb')]=_0x35a813[_0x6d6d('0xb')];this['countnoanswerretry']=_0x35a813[_0x6d6d('0xc')];this[_0x6d6d('0xd')]=_0x35a813['countbusyretry']+_0x35a813['countcongestionretry']+_0x35a813[_0x6d6d('0xc')]+_0x35a813[_0x6d6d('0xe')]+_0x35a813[_0x6d6d('0xf')]+_0x35a813[_0x6d6d('0x10')]+_0x35a813[_0x6d6d('0x11')]+_0x35a813[_0x6d6d('0x12')];this[_0x6d6d('0xe')]=_0x35a813[_0x6d6d('0xe')];this['countdropretry']=_0x35a813[_0x6d6d('0xf')];this[_0x6d6d('0x10')]=_0x35a813[_0x6d6d('0x10')];this[_0x6d6d('0x11')]=_0x35a813[_0x6d6d('0x11')];this['countagentrejectretry']=_0x35a813[_0x6d6d('0x12')];this['queue']=_0x35a813[_0x6d6d('0x13')];this[_0x6d6d('0x14')]=_0x35a813[_0x6d6d('0x14')];this['calleridnum']=_0x35a813['calleridnum'];this[_0x6d6d('0x15')]=_0x35a813[_0x6d6d('0x15')];this[_0x6d6d('0x16')]=_0x35a813[_0x6d6d('0x16')];this['endtime']=_0x35a813['responsetime'];this[_0x6d6d('0x17')]=_0x35a813['ringtime']||0x0;this[_0x6d6d('0x18')]=_0x35a813[_0x6d6d('0x18')]||0x0;this[_0x6d6d('0x19')]=_0x35a813[_0x6d6d('0x19')]||0x0;this[_0x6d6d('0x1a')]=_0x35a813[_0x6d6d('0x1a')];this[_0x6d6d('0x1b')]=_0x35a813[_0x6d6d('0x1b')];this[_0x6d6d('0x1c')]=_0x35a813[_0x6d6d('0x1c')];this[_0x6d6d('0x1d')]=_0x35a813[_0x6d6d('0x1d')];this[_0x6d6d('0x1e')]=_0x35a813[_0x6d6d('0x1e')];this[_0x6d6d('0x1f')]=_0x35a813[_0x6d6d('0x1f')];this[_0x6d6d('0x20')]=_0x35a813['UserId'];this[_0x6d6d('0x21')]=_0x35a813[_0x6d6d('0x21')];this[_0x6d6d('0x22')]=_0x35a813[_0x6d6d('0x22')];this[_0x6d6d('0x23')]=_0x35a813[_0x6d6d('0x23')]||'';this['originatecalleridname']=_0x35a813[_0x6d6d('0x24')]||'';}module[_0x6d6d('0x25')]=Final;