Built motion from commit 47436d59.|2.6.7
[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 _0x9fd8=['moment','milliseconds','diff','seconds','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','number','starttime','responsetime','droptime','ringtime','talktime','reason','callback','callbackuniqueid','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','lodash'];(function(_0xae8db9,_0x5c93c7){var _0x164249=function(_0x565882){while(--_0x565882){_0xae8db9['push'](_0xae8db9['shift']());}};_0x164249(++_0x5c93c7);}(_0x9fd8,0x18b));var _0x89fd=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x9fd8[_0x432682];return _0x463d05;};'use strict';var util=require('util');var _=require(_0x89fd('0x0'));var moment=require(_0x89fd('0x1'));function getSeconds(_0x35372c,_0x5573ab){var _0x5026eb=moment(_0x35372c)[_0x89fd('0x2')](0x0);var _0x4d0563=moment(_0x5573ab)[_0x89fd('0x2')](0x0);return _0x5026eb[_0x89fd('0x3')](_0x4d0563,_0x89fd('0x4'));}function QueueCallerAbandon(_0x481e6f,_0x3effda){this['scheduledat']=_0x481e6f['scheduledat'];this[_0x89fd('0x5')]=_0x481e6f[_0x89fd('0x5')];this[_0x89fd('0x6')]=_0x481e6f['type']===_0x89fd('0x7')?_0x89fd('0x8'):_0x481e6f[_0x89fd('0x5')];this[_0x89fd('0x9')]=_0x481e6f[_0x89fd('0x9')];this[_0x89fd('0xa')]=_0x481e6f['countcongestionretry'];this[_0x89fd('0xb')]=_0x481e6f['countnoanswerretry'];this['countglobal']=_0x481e6f['countbusyretry']+_0x481e6f[_0x89fd('0xa')]+_0x481e6f[_0x89fd('0xb')]+_0x481e6f[_0x89fd('0xc')]+_0x481e6f[_0x89fd('0xd')]+_0x481e6f[_0x89fd('0xe')]+_0x481e6f[_0x89fd('0xf')]+_0x481e6f['countagentrejectretry'];this[_0x89fd('0xc')]=_0x481e6f[_0x89fd('0xc')];this['countdropretry']=_0x481e6f['countdropretry'];this[_0x89fd('0xe')]=_0x481e6f[_0x89fd('0xe')];this[_0x89fd('0xf')]=_0x481e6f[_0x89fd('0xf')];this[_0x89fd('0x10')]=_0x481e6f['countagentrejectretry'];this[_0x89fd('0x11')]=_0x3effda['uniqueid'];this[_0x89fd('0x12')]=_0x481e6f[_0x89fd('0x13')];this['calleridnum']=_0x481e6f[_0x89fd('0x14')];this['starttime']=_0x481e6f[_0x89fd('0x15')];this[_0x89fd('0x16')]=_0x481e6f[_0x89fd('0x16')];this[_0x89fd('0x17')]=_0x481e6f['droptime'];this['endtime']=this[_0x89fd('0x17')];this[_0x89fd('0x18')]=getSeconds(_0x481e6f[_0x89fd('0x16')],_0x481e6f[_0x89fd('0x15')]);this['holdtime']=getSeconds(this[_0x89fd('0x17')],_0x481e6f[_0x89fd('0x16')]);this[_0x89fd('0x19')]=0x0;this['queue']=_0x3effda[_0x89fd('0x8')];this['membername']=_0x3effda['connectedlinename'];this[_0x89fd('0x1a')]=_0x3effda[_0x89fd('0x1a')];this[_0x89fd('0x1b')]=_0x481e6f[_0x89fd('0x1b')];this[_0x89fd('0x1c')]=_0x481e6f['callbackuniqueid'];this['callbackat']=_0x481e6f['callbackat'];this['recallme']=_0x481e6f['recallme'];this[_0x89fd('0x1d')]=_0x481e6f[_0x89fd('0x1d')];this['ListId']=_0x481e6f[_0x89fd('0x1e')];this[_0x89fd('0x1f')]=_0x481e6f[_0x89fd('0x1f')];this[_0x89fd('0x20')]=_0x481e6f[_0x89fd('0x20')];this[_0x89fd('0x21')]=_0x481e6f[_0x89fd('0x21')];this[_0x89fd('0x22')]=_0x481e6f[_0x89fd('0x22')]||'';this[_0x89fd('0x23')]=_0x481e6f[_0x89fd('0x23')]||'';}module['exports']=QueueCallerAbandon;