Built motion from commit e6806ed6.|2.6.0
[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 _0xc830=['callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','milliseconds','diff','seconds','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countagentrejectretry','countabandonedretry','countmachineretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','membername','connectedlinename','reason','callback','callbackuniqueid'];(function(_0x3446af,_0x3b2f92){var _0x252b14=function(_0x1caaca){while(--_0x1caaca){_0x3446af['push'](_0x3446af['shift']());}};_0x252b14(++_0x3b2f92);}(_0xc830,0x85));var _0x0c83=function(_0x33d534,_0x13aa85){_0x33d534=_0x33d534-0x0;var _0xb07093=_0xc830[_0x33d534];return _0xb07093;};'use strict';var util=require(_0x0c83('0x0'));var _=require('lodash');var moment=require('moment');function getSeconds(_0x32874e,_0x872e2){var _0xbcef1c=moment(_0x32874e)[_0x0c83('0x1')](0x0);var _0x3efd05=moment(_0x872e2)[_0x0c83('0x1')](0x0);return _0xbcef1c[_0x0c83('0x2')](_0x3efd05,_0x0c83('0x3'));}function QueueCallerAbandon(_0x10a7f8,_0x2d61a3){this['scheduledat']=_0x10a7f8[_0x0c83('0x4')];this[_0x0c83('0x5')]=_0x10a7f8[_0x0c83('0x5')];this['campaigntype']=_0x10a7f8[_0x0c83('0x5')]===_0x0c83('0x6')?_0x0c83('0x7'):_0x10a7f8[_0x0c83('0x5')];this[_0x0c83('0x8')]=_0x10a7f8[_0x0c83('0x8')];this[_0x0c83('0x9')]=_0x10a7f8[_0x0c83('0x9')];this['countnoanswerretry']=_0x10a7f8[_0x0c83('0xa')];this[_0x0c83('0xb')]=_0x10a7f8[_0x0c83('0x8')]+_0x10a7f8[_0x0c83('0x9')]+_0x10a7f8[_0x0c83('0xa')]+_0x10a7f8[_0x0c83('0xc')]+_0x10a7f8[_0x0c83('0xd')]+_0x10a7f8['countabandonedretry']+_0x10a7f8['countmachineretry']+_0x10a7f8[_0x0c83('0xe')];this[_0x0c83('0xc')]=_0x10a7f8[_0x0c83('0xc')];this[_0x0c83('0xd')]=_0x10a7f8[_0x0c83('0xd')];this[_0x0c83('0xf')]=_0x10a7f8[_0x0c83('0xf')];this['countmachineretry']=_0x10a7f8[_0x0c83('0x10')];this[_0x0c83('0xe')]=_0x10a7f8[_0x0c83('0xe')];this[_0x0c83('0x11')]=_0x2d61a3['uniqueid'];this[_0x0c83('0x12')]=_0x10a7f8[_0x0c83('0x13')];this[_0x0c83('0x14')]=_0x10a7f8[_0x0c83('0x15')];this['starttime']=_0x10a7f8[_0x0c83('0x16')];this[_0x0c83('0x17')]=_0x10a7f8[_0x0c83('0x17')];this[_0x0c83('0x18')]=_0x10a7f8[_0x0c83('0x18')];this[_0x0c83('0x19')]=this[_0x0c83('0x18')];this['ringtime']=getSeconds(_0x10a7f8[_0x0c83('0x17')],_0x10a7f8[_0x0c83('0x16')]);this['holdtime']=getSeconds(this[_0x0c83('0x18')],_0x10a7f8['responsetime']);this['talktime']=0x0;this['queue']=_0x2d61a3[_0x0c83('0x7')];this[_0x0c83('0x1a')]=_0x2d61a3[_0x0c83('0x1b')];this[_0x0c83('0x1c')]=_0x2d61a3[_0x0c83('0x1c')];this[_0x0c83('0x1d')]=_0x10a7f8['callback'];this[_0x0c83('0x1e')]=_0x10a7f8['callbackuniqueid'];this['callbackat']=_0x10a7f8[_0x0c83('0x1f')];this['recallme']=_0x10a7f8[_0x0c83('0x20')];this[_0x0c83('0x21')]=_0x10a7f8[_0x0c83('0x21')];this[_0x0c83('0x22')]=_0x10a7f8['ListId'];this[_0x0c83('0x23')]=_0x10a7f8[_0x0c83('0x23')];this[_0x0c83('0x24')]=_0x10a7f8[_0x0c83('0x24')];this['CampaignId']=_0x10a7f8[_0x0c83('0x25')];this[_0x0c83('0x26')]=_0x10a7f8['originatecalleridnum']||'';this[_0x0c83('0x27')]=_0x10a7f8[_0x0c83('0x27')]||'';}module[_0x0c83('0x28')]=QueueCallerAbandon;