c145cd2d83d1cb68f7fbcfbcb5e956973102d607
[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 _0x80e3=['countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','diff','seconds','scheduledat','type','campaigntype','outbound','queue'];(function(_0x309c4b,_0x5ec084){var _0x1430d7=function(_0x46e349){while(--_0x46e349){_0x309c4b['push'](_0x309c4b['shift']());}};_0x1430d7(++_0x5ec084);}(_0x80e3,0x182));var _0x380e=function(_0x406b1f,_0x15d0bd){_0x406b1f=_0x406b1f-0x0;var _0x4c1b28=_0x80e3[_0x406b1f];return _0x4c1b28;};'use strict';var util=require(_0x380e('0x0'));var _=require(_0x380e('0x1'));var moment=require(_0x380e('0x2'));function getSeconds(_0xcf6506,_0x95c331){var _0x246f62=moment(_0xcf6506)['milliseconds'](0x0);var _0x45609b=moment(_0x95c331)['milliseconds'](0x0);return _0x246f62[_0x380e('0x3')](_0x45609b,_0x380e('0x4'));}function QueueCallerAbandon(_0x5f10fe,_0xac0b76){this[_0x380e('0x5')]=_0x5f10fe['scheduledat'];this[_0x380e('0x6')]=_0x5f10fe['type'];this[_0x380e('0x7')]=_0x5f10fe[_0x380e('0x6')]===_0x380e('0x8')?_0x380e('0x9'):_0x5f10fe[_0x380e('0x6')];this[_0x380e('0xa')]=_0x5f10fe['countbusyretry'];this[_0x380e('0xb')]=_0x5f10fe['countcongestionretry'];this[_0x380e('0xc')]=_0x5f10fe[_0x380e('0xc')];this[_0x380e('0xd')]=_0x5f10fe[_0x380e('0xa')]+_0x5f10fe['countcongestionretry']+_0x5f10fe[_0x380e('0xc')]+_0x5f10fe['countnosuchnumberretry']+_0x5f10fe[_0x380e('0xe')]+_0x5f10fe[_0x380e('0xf')]+_0x5f10fe[_0x380e('0x10')]+_0x5f10fe[_0x380e('0x11')];this[_0x380e('0x12')]=_0x5f10fe[_0x380e('0x12')];this['countdropretry']=_0x5f10fe[_0x380e('0xe')];this[_0x380e('0xf')]=_0x5f10fe[_0x380e('0xf')];this[_0x380e('0x10')]=_0x5f10fe[_0x380e('0x10')];this[_0x380e('0x11')]=_0x5f10fe['countagentrejectretry'];this[_0x380e('0x13')]=_0xac0b76['uniqueid'];this[_0x380e('0x14')]=_0x5f10fe[_0x380e('0x15')];this[_0x380e('0x16')]=_0x5f10fe[_0x380e('0x17')];this[_0x380e('0x18')]=_0x5f10fe[_0x380e('0x18')];this[_0x380e('0x19')]=_0x5f10fe[_0x380e('0x19')];this['droptime']=_0x5f10fe[_0x380e('0x1a')];this[_0x380e('0x1b')]=this[_0x380e('0x1a')];this[_0x380e('0x1c')]=getSeconds(_0x5f10fe['responsetime'],_0x5f10fe[_0x380e('0x18')]);this[_0x380e('0x1d')]=getSeconds(this[_0x380e('0x1a')],_0x5f10fe[_0x380e('0x19')]);this['talktime']=0x0;this[_0x380e('0x9')]=_0xac0b76['queue'];this[_0x380e('0x1e')]=_0xac0b76[_0x380e('0x1f')];this[_0x380e('0x20')]=_0xac0b76['reason'];this[_0x380e('0x21')]=_0x5f10fe[_0x380e('0x21')];this['callbackuniqueid']=_0x5f10fe[_0x380e('0x22')];this[_0x380e('0x23')]=_0x5f10fe[_0x380e('0x23')];this[_0x380e('0x24')]=_0x5f10fe[_0x380e('0x24')];this[_0x380e('0x25')]=_0x5f10fe[_0x380e('0x25')];this['ListId']=_0x5f10fe[_0x380e('0x26')];this[_0x380e('0x27')]=_0x5f10fe[_0x380e('0x27')];this[_0x380e('0x28')]=_0x5f10fe[_0x380e('0x28')];this['CampaignId']=_0x5f10fe['CampaignId'];this[_0x380e('0x29')]=_0x5f10fe[_0x380e('0x29')]||'';this[_0x380e('0x2a')]=_0x5f10fe[_0x380e('0x2a')]||'';}module[_0x380e('0x2b')]=QueueCallerAbandon;