Built motion from commit 092f8824.|2.5.49
[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 _0xcb66=['scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','calleridname','calleridnum','starttime','responsetime','holdtime','talktime','callback','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','diff','seconds'];(function(_0x5c2086,_0x3fd3bf){var _0x5e6f04=function(_0x12c440){while(--_0x12c440){_0x5c2086['push'](_0x5c2086['shift']());}};_0x5e6f04(++_0x3fd3bf);}(_0xcb66,0x19f));var _0x6cb6=function(_0x21de89,_0x367053){_0x21de89=_0x21de89-0x0;var _0x290b7e=_0xcb66[_0x21de89];return _0x290b7e;};'use strict';var util=require('util');var _=require(_0x6cb6('0x0'));var moment=require(_0x6cb6('0x1'));function getSeconds(_0x1066ea,_0x3f607b){var _0x205243=moment(_0x1066ea)['milliseconds'](0x0);var _0xe996ed=moment(_0x3f607b)[_0x6cb6('0x2')](0x0);return _0x205243[_0x6cb6('0x3')](_0xe996ed,_0x6cb6('0x4'));}function Final(_0x16bb9d){this['uniqueid']=_0x16bb9d['uniqueid'];this[_0x6cb6('0x5')]=_0x16bb9d[_0x6cb6('0x5')];this[_0x6cb6('0x6')]=_0x16bb9d[_0x6cb6('0x6')];this[_0x6cb6('0x7')]=_0x16bb9d[_0x6cb6('0x6')]===_0x6cb6('0x8')?_0x6cb6('0x9'):_0x16bb9d[_0x6cb6('0x6')];this[_0x6cb6('0xa')]=_0x16bb9d[_0x6cb6('0xa')];this[_0x6cb6('0xb')]=_0x16bb9d[_0x6cb6('0xb')];this['countnoanswerretry']=_0x16bb9d['countnoanswerretry'];this['countglobal']=_0x16bb9d['countbusyretry']+_0x16bb9d[_0x6cb6('0xb')]+_0x16bb9d[_0x6cb6('0xc')]+_0x16bb9d[_0x6cb6('0xd')]+_0x16bb9d[_0x6cb6('0xe')]+_0x16bb9d['countabandonedretry']+_0x16bb9d[_0x6cb6('0xf')]+_0x16bb9d[_0x6cb6('0x10')];this['countnosuchnumberretry']=_0x16bb9d[_0x6cb6('0xd')];this[_0x6cb6('0xe')]=_0x16bb9d['countdropretry'];this[_0x6cb6('0x11')]=_0x16bb9d[_0x6cb6('0x11')];this['countmachineretry']=_0x16bb9d['countmachineretry'];this['countagentrejectretry']=_0x16bb9d['countagentrejectretry'];this[_0x6cb6('0x9')]=_0x16bb9d[_0x6cb6('0x9')];this[_0x6cb6('0x12')]=_0x16bb9d[_0x6cb6('0x12')];this[_0x6cb6('0x13')]=_0x16bb9d[_0x6cb6('0x13')];this['starttime']=_0x16bb9d[_0x6cb6('0x14')];this[_0x6cb6('0x15')]=_0x16bb9d['responsetime'];this['endtime']=_0x16bb9d['responsetime'];this['ringtime']=_0x16bb9d['ringtime']||0x0;this['holdtime']=_0x16bb9d[_0x6cb6('0x16')]||0x0;this[_0x6cb6('0x17')]=_0x16bb9d[_0x6cb6('0x17')]||0x0;this[_0x6cb6('0x18')]=_0x16bb9d[_0x6cb6('0x18')];this['callbackuniqueid']=_0x16bb9d['callbackuniqueid'];this[_0x6cb6('0x19')]=_0x16bb9d[_0x6cb6('0x19')];this[_0x6cb6('0x1a')]=_0x16bb9d[_0x6cb6('0x1a')];this['ContactId']=_0x16bb9d[_0x6cb6('0x1b')];this[_0x6cb6('0x1c')]=_0x16bb9d['ListId'];this['UserId']=_0x16bb9d[_0x6cb6('0x1d')];this['VoiceQueueId']=_0x16bb9d[_0x6cb6('0x1e')];this[_0x6cb6('0x1f')]=_0x16bb9d[_0x6cb6('0x1f')];this[_0x6cb6('0x20')]=_0x16bb9d[_0x6cb6('0x20')]||'';this[_0x6cb6('0x21')]=_0x16bb9d[_0x6cb6('0x21')]||'';}module[_0x6cb6('0x22')]=Final;