Built motion from commit 67e5df37.|2.0.66
[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 _0x2547=['outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','queue','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','lodash','moment','milliseconds','seconds','scheduledat','type','campaigntype'];(function(_0x1d1e17,_0x26226a){var _0x463172=function(_0x31a36c){while(--_0x31a36c){_0x1d1e17['push'](_0x1d1e17['shift']());}};_0x463172(++_0x26226a);}(_0x2547,0x1cd));var _0x7254=function(_0x925478,_0x292ee0){_0x925478=_0x925478-0x0;var _0x580692=_0x2547[_0x925478];return _0x580692;};'use strict';var util=require('util');var _=require(_0x7254('0x0'));var moment=require(_0x7254('0x1'));function getSeconds(_0x44b692,_0x3ea6e6){var _0xbbc747=moment(_0x44b692)[_0x7254('0x2')](0x0);var _0x9f3435=moment(_0x3ea6e6)[_0x7254('0x2')](0x0);return _0xbbc747['diff'](_0x9f3435,_0x7254('0x3'));}function QueueCallerAbandon(_0x59705f,_0x67f427){this[_0x7254('0x4')]=_0x59705f['scheduledat'];this[_0x7254('0x5')]=_0x59705f[_0x7254('0x5')];this[_0x7254('0x6')]=_0x59705f['type']===_0x7254('0x7')?'queue':_0x59705f['type'];this['countbusyretry']=_0x59705f[_0x7254('0x8')];this[_0x7254('0x9')]=_0x59705f[_0x7254('0x9')];this[_0x7254('0xa')]=_0x59705f[_0x7254('0xa')];this[_0x7254('0xb')]=_0x59705f['countbusyretry']+_0x59705f[_0x7254('0x9')]+_0x59705f['countnoanswerretry'];this[_0x7254('0xc')]=_0x67f427['uniqueid'];this[_0x7254('0xd')]=_0x59705f[_0x7254('0xe')];this[_0x7254('0xf')]=_0x59705f[_0x7254('0x10')];this[_0x7254('0x11')]=_0x59705f[_0x7254('0x11')];this[_0x7254('0x12')]=_0x59705f[_0x7254('0x12')];this[_0x7254('0x13')]=_0x59705f[_0x7254('0x13')];this[_0x7254('0x14')]=this[_0x7254('0x13')];this[_0x7254('0x15')]=getSeconds(_0x59705f['responsetime'],_0x59705f[_0x7254('0x11')]);this[_0x7254('0x16')]=getSeconds(this[_0x7254('0x13')],_0x59705f[_0x7254('0x12')]);this[_0x7254('0x17')]=0x0;this[_0x7254('0x18')]=_0x67f427[_0x7254('0x18')];this['membername']=_0x67f427[_0x7254('0x19')];this[_0x7254('0x1a')]=_0x67f427[_0x7254('0x1a')];this[_0x7254('0x1b')]=_0x59705f[_0x7254('0x1b')];this[_0x7254('0x1c')]=_0x59705f[_0x7254('0x1c')];this[_0x7254('0x1d')]=_0x59705f[_0x7254('0x1d')];this[_0x7254('0x1e')]=_0x59705f[_0x7254('0x1e')];this[_0x7254('0x1f')]=_0x59705f[_0x7254('0x1f')];this[_0x7254('0x20')]=_0x59705f[_0x7254('0x20')];this[_0x7254('0x21')]=_0x59705f[_0x7254('0x21')];this[_0x7254('0x22')]=_0x59705f[_0x7254('0x22')];this[_0x7254('0x23')]=_0x59705f[_0x7254('0x23')];}module['exports']=QueueCallerAbandon;