Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / ami / dialer / queueCallerAbandon.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 _0x598b=['starttime','responsetime','endtime','ringtime','holdtime','droptime','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','moment','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','name','calleridnum','number'];(function(_0x45af22,_0x15e0c7){var _0x2dc472=function(_0xa6a4a2){while(--_0xa6a4a2){_0x45af22['push'](_0x45af22['shift']());}};_0x2dc472(++_0x15e0c7);}(_0x598b,0x11e));var _0xb598=function(_0x18afaf,_0x2e65c3){_0x18afaf=_0x18afaf-0x0;var _0x28e323=_0x598b[_0x18afaf];return _0x28e323;};'use strict';var util=require(_0xb598('0x0'));var _=require('lodash');var moment=require(_0xb598('0x1'));function getSeconds(_0x17e30a,_0x1e3e60){var _0xea59b2=moment(_0x17e30a)['milliseconds'](0x0);var _0x53c11f=moment(_0x1e3e60)['milliseconds'](0x0);return _0xea59b2[_0xb598('0x2')](_0x53c11f,_0xb598('0x3'));}function QueueCallerAbandon(_0x72c4bf,_0x3b6e2c){this[_0xb598('0x4')]=_0x72c4bf[_0xb598('0x4')];this['type']=_0x72c4bf[_0xb598('0x5')];this[_0xb598('0x6')]=_0x72c4bf['type']===_0xb598('0x7')?_0xb598('0x8'):_0x72c4bf[_0xb598('0x5')];this[_0xb598('0x9')]=_0x72c4bf['countbusyretry'];this[_0xb598('0xa')]=_0x72c4bf[_0xb598('0xa')];this[_0xb598('0xb')]=_0x72c4bf[_0xb598('0xb')];this[_0xb598('0xc')]=_0x72c4bf['countbusyretry']+_0x72c4bf['countcongestionretry']+_0x72c4bf[_0xb598('0xb')]+_0x72c4bf[_0xb598('0xd')]+_0x72c4bf[_0xb598('0xe')]+_0x72c4bf[_0xb598('0xf')]+_0x72c4bf[_0xb598('0x10')]+_0x72c4bf[_0xb598('0x11')];this['countnosuchnumberretry']=_0x72c4bf[_0xb598('0xd')];this[_0xb598('0xe')]=_0x72c4bf[_0xb598('0xe')];this[_0xb598('0xf')]=_0x72c4bf[_0xb598('0xf')];this[_0xb598('0x10')]=_0x72c4bf[_0xb598('0x10')];this[_0xb598('0x11')]=_0x72c4bf['countagentrejectretry'];this[_0xb598('0x12')]=_0x3b6e2c[_0xb598('0x12')];this['calleridname']=_0x72c4bf[_0xb598('0x13')];this[_0xb598('0x14')]=_0x72c4bf[_0xb598('0x15')];this[_0xb598('0x16')]=_0x72c4bf[_0xb598('0x16')];this[_0xb598('0x17')]=_0x72c4bf[_0xb598('0x17')];this['droptime']=_0x72c4bf['droptime'];this[_0xb598('0x18')]=this['droptime'];this[_0xb598('0x19')]=getSeconds(_0x72c4bf['responsetime'],_0x72c4bf['starttime']);this[_0xb598('0x1a')]=getSeconds(this[_0xb598('0x1b')],_0x72c4bf[_0xb598('0x17')]);this[_0xb598('0x1c')]=0x0;this[_0xb598('0x8')]=_0x3b6e2c[_0xb598('0x8')];this[_0xb598('0x1d')]=_0x3b6e2c[_0xb598('0x1e')];this[_0xb598('0x1f')]=_0x3b6e2c['reason'];this[_0xb598('0x20')]=_0x72c4bf[_0xb598('0x20')];this['callbackuniqueid']=_0x72c4bf[_0xb598('0x21')];this[_0xb598('0x22')]=_0x72c4bf[_0xb598('0x22')];this[_0xb598('0x23')]=_0x72c4bf[_0xb598('0x23')];this['ContactId']=_0x72c4bf[_0xb598('0x24')];this[_0xb598('0x25')]=_0x72c4bf[_0xb598('0x25')];this[_0xb598('0x26')]=_0x72c4bf['UserId'];this[_0xb598('0x27')]=_0x72c4bf['VoiceQueueId'];this[_0xb598('0x28')]=_0x72c4bf[_0xb598('0x28')];this[_0xb598('0x29')]=_0x72c4bf[_0xb598('0x29')]||'';this[_0xb598('0x2a')]=_0x72c4bf['originatecalleridname']||'';}module[_0xb598('0x2b')]=QueueCallerAbandon;