Built motion from commit (unavailable).|2.5.3
[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 _0x3eae=['talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countglobal','countnoanswerretry','countdropretry','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','starttime','responsetime','endtime','droptime','ringtime'];(function(_0x110c3d,_0x12ee06){var _0x226d67=function(_0x1fb6e1){while(--_0x1fb6e1){_0x110c3d['push'](_0x110c3d['shift']());}};_0x226d67(++_0x12ee06);}(_0x3eae,0xeb));var _0xe3ea=function(_0x59befa,_0x4af99b){_0x59befa=_0x59befa-0x0;var _0x1dd63d=_0x3eae[_0x59befa];return _0x1dd63d;};'use strict';var util=require(_0xe3ea('0x0'));var _=require(_0xe3ea('0x1'));var moment=require(_0xe3ea('0x2'));function getSeconds(_0x26fda1,_0x13c4f0){var _0x4224cc=moment(_0x26fda1)[_0xe3ea('0x3')](0x0);var _0x194fa0=moment(_0x13c4f0)[_0xe3ea('0x3')](0x0);return _0x4224cc[_0xe3ea('0x4')](_0x194fa0,_0xe3ea('0x5'));}function QueueCallerAbandon(_0x341e5,_0x5283a3){this[_0xe3ea('0x6')]=_0x341e5[_0xe3ea('0x6')];this[_0xe3ea('0x7')]=_0x341e5['type'];this[_0xe3ea('0x8')]=_0x341e5['type']===_0xe3ea('0x9')?_0xe3ea('0xa'):_0x341e5[_0xe3ea('0x7')];this[_0xe3ea('0xb')]=_0x341e5[_0xe3ea('0xb')];this[_0xe3ea('0xc')]=_0x341e5[_0xe3ea('0xc')];this['countnoanswerretry']=_0x341e5['countnoanswerretry'];this[_0xe3ea('0xd')]=_0x341e5[_0xe3ea('0xb')]+_0x341e5['countcongestionretry']+_0x341e5[_0xe3ea('0xe')]+_0x341e5['countnosuchnumberretry']+_0x341e5[_0xe3ea('0xf')]+_0x341e5['countabandonedretry']+_0x341e5['countmachineretry']+_0x341e5['countagentrejectretry'];this['countnosuchnumberretry']=_0x341e5[_0xe3ea('0x10')];this[_0xe3ea('0xf')]=_0x341e5[_0xe3ea('0xf')];this[_0xe3ea('0x11')]=_0x341e5[_0xe3ea('0x11')];this['countmachineretry']=_0x341e5[_0xe3ea('0x12')];this[_0xe3ea('0x13')]=_0x341e5[_0xe3ea('0x13')];this[_0xe3ea('0x14')]=_0x5283a3[_0xe3ea('0x14')];this[_0xe3ea('0x15')]=_0x341e5[_0xe3ea('0x16')];this[_0xe3ea('0x17')]=_0x341e5['number'];this[_0xe3ea('0x18')]=_0x341e5['starttime'];this[_0xe3ea('0x19')]=_0x341e5[_0xe3ea('0x19')];this['droptime']=_0x341e5['droptime'];this[_0xe3ea('0x1a')]=this[_0xe3ea('0x1b')];this[_0xe3ea('0x1c')]=getSeconds(_0x341e5[_0xe3ea('0x19')],_0x341e5['starttime']);this['holdtime']=getSeconds(this[_0xe3ea('0x1b')],_0x341e5['responsetime']);this[_0xe3ea('0x1d')]=0x0;this[_0xe3ea('0xa')]=_0x5283a3[_0xe3ea('0xa')];this[_0xe3ea('0x1e')]=_0x5283a3[_0xe3ea('0x1f')];this[_0xe3ea('0x20')]=_0x5283a3[_0xe3ea('0x20')];this[_0xe3ea('0x21')]=_0x341e5[_0xe3ea('0x21')];this[_0xe3ea('0x22')]=_0x341e5['callbackuniqueid'];this[_0xe3ea('0x23')]=_0x341e5[_0xe3ea('0x23')];this[_0xe3ea('0x24')]=_0x341e5[_0xe3ea('0x24')];this[_0xe3ea('0x25')]=_0x341e5[_0xe3ea('0x25')];this['ListId']=_0x341e5[_0xe3ea('0x26')];this[_0xe3ea('0x27')]=_0x341e5['UserId'];this[_0xe3ea('0x28')]=_0x341e5[_0xe3ea('0x28')];this['CampaignId']=_0x341e5['CampaignId'];this[_0xe3ea('0x29')]=_0x341e5[_0xe3ea('0x29')]||'';this[_0xe3ea('0x2a')]=_0x341e5[_0xe3ea('0x2a')]||'';}module[_0xe3ea('0x2b')]=QueueCallerAbandon;