Built motion from commit 994c64e1.|2.6.1
[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 _0x2a82=['callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','number','starttime','responsetime','droptime','endtime','ringtime','talktime','membername','connectedlinename','reason'];(function(_0x33686b,_0x1f90f7){var _0x4b99d8=function(_0x520930){while(--_0x520930){_0x33686b['push'](_0x33686b['shift']());}};_0x4b99d8(++_0x1f90f7);}(_0x2a82,0xb3));var _0x22a8=function(_0x404499,_0x1a2fe6){_0x404499=_0x404499-0x0;var _0x43f7cb=_0x2a82[_0x404499];return _0x43f7cb;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x22a8('0x0'));function getSeconds(_0x4c4d19,_0x487b06){var _0x648a7d=moment(_0x4c4d19)['milliseconds'](0x0);var _0x2819b0=moment(_0x487b06)[_0x22a8('0x1')](0x0);return _0x648a7d[_0x22a8('0x2')](_0x2819b0,_0x22a8('0x3'));}function QueueCallerAbandon(_0x55bb12,_0xb6d12a){this[_0x22a8('0x4')]=_0x55bb12[_0x22a8('0x4')];this[_0x22a8('0x5')]=_0x55bb12[_0x22a8('0x5')];this[_0x22a8('0x6')]=_0x55bb12[_0x22a8('0x5')]===_0x22a8('0x7')?_0x22a8('0x8'):_0x55bb12[_0x22a8('0x5')];this[_0x22a8('0x9')]=_0x55bb12['countbusyretry'];this[_0x22a8('0xa')]=_0x55bb12[_0x22a8('0xa')];this[_0x22a8('0xb')]=_0x55bb12[_0x22a8('0xb')];this[_0x22a8('0xc')]=_0x55bb12[_0x22a8('0x9')]+_0x55bb12[_0x22a8('0xa')]+_0x55bb12['countnoanswerretry']+_0x55bb12[_0x22a8('0xd')]+_0x55bb12[_0x22a8('0xe')]+_0x55bb12[_0x22a8('0xf')]+_0x55bb12[_0x22a8('0x10')]+_0x55bb12[_0x22a8('0x11')];this[_0x22a8('0xd')]=_0x55bb12['countnosuchnumberretry'];this[_0x22a8('0xe')]=_0x55bb12[_0x22a8('0xe')];this[_0x22a8('0xf')]=_0x55bb12['countabandonedretry'];this[_0x22a8('0x10')]=_0x55bb12[_0x22a8('0x10')];this['countagentrejectretry']=_0x55bb12['countagentrejectretry'];this['uniqueid']=_0xb6d12a[_0x22a8('0x12')];this[_0x22a8('0x13')]=_0x55bb12[_0x22a8('0x14')];this['calleridnum']=_0x55bb12[_0x22a8('0x15')];this[_0x22a8('0x16')]=_0x55bb12[_0x22a8('0x16')];this[_0x22a8('0x17')]=_0x55bb12[_0x22a8('0x17')];this[_0x22a8('0x18')]=_0x55bb12[_0x22a8('0x18')];this[_0x22a8('0x19')]=this[_0x22a8('0x18')];this[_0x22a8('0x1a')]=getSeconds(_0x55bb12[_0x22a8('0x17')],_0x55bb12[_0x22a8('0x16')]);this['holdtime']=getSeconds(this[_0x22a8('0x18')],_0x55bb12[_0x22a8('0x17')]);this[_0x22a8('0x1b')]=0x0;this['queue']=_0xb6d12a[_0x22a8('0x8')];this[_0x22a8('0x1c')]=_0xb6d12a[_0x22a8('0x1d')];this['reason']=_0xb6d12a[_0x22a8('0x1e')];this[_0x22a8('0x1f')]=_0x55bb12[_0x22a8('0x1f')];this[_0x22a8('0x20')]=_0x55bb12[_0x22a8('0x20')];this[_0x22a8('0x21')]=_0x55bb12[_0x22a8('0x21')];this[_0x22a8('0x22')]=_0x55bb12['recallme'];this['ContactId']=_0x55bb12[_0x22a8('0x23')];this[_0x22a8('0x24')]=_0x55bb12[_0x22a8('0x24')];this[_0x22a8('0x25')]=_0x55bb12[_0x22a8('0x25')];this['VoiceQueueId']=_0x55bb12[_0x22a8('0x26')];this['CampaignId']=_0x55bb12[_0x22a8('0x27')];this[_0x22a8('0x28')]=_0x55bb12[_0x22a8('0x28')]||'';this['originatecalleridname']=_0x55bb12[_0x22a8('0x29')]||'';}module['exports']=QueueCallerAbandon;