Built motion from commit 9d1906d1.|2.5.40
[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 _0xe953=['callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','name','number','starttime','droptime','responsetime','holdtime','queue','membername','reason','callback','callbackuniqueid'];(function(_0x5df82a,_0x4d4d2e){var _0x3178dc=function(_0x5024f5){while(--_0x5024f5){_0x5df82a['push'](_0x5df82a['shift']());}};_0x3178dc(++_0x4d4d2e);}(_0xe953,0xf9));var _0x3e95=function(_0x872b02,_0x4f4458){_0x872b02=_0x872b02-0x0;var _0x1a6b24=_0xe953[_0x872b02];return _0x1a6b24;};'use strict';var util=require(_0x3e95('0x0'));var _=require(_0x3e95('0x1'));var moment=require(_0x3e95('0x2'));function getSeconds(_0x4ab01c,_0x8dbd4f){var _0x1762e9=moment(_0x4ab01c)[_0x3e95('0x3')](0x0);var _0x30e34e=moment(_0x8dbd4f)[_0x3e95('0x3')](0x0);return _0x1762e9[_0x3e95('0x4')](_0x30e34e,_0x3e95('0x5'));}function QueueCallerAbandon(_0x57fc59,_0x4ec1b2){this[_0x3e95('0x6')]=_0x57fc59['scheduledat'];this[_0x3e95('0x7')]=_0x57fc59['type'];this[_0x3e95('0x8')]=_0x57fc59[_0x3e95('0x7')]==='outbound'?'queue':_0x57fc59[_0x3e95('0x7')];this['countbusyretry']=_0x57fc59[_0x3e95('0x9')];this['countcongestionretry']=_0x57fc59['countcongestionretry'];this[_0x3e95('0xa')]=_0x57fc59[_0x3e95('0xa')];this[_0x3e95('0xb')]=_0x57fc59['countbusyretry']+_0x57fc59[_0x3e95('0xc')]+_0x57fc59[_0x3e95('0xa')]+_0x57fc59[_0x3e95('0xd')]+_0x57fc59[_0x3e95('0xe')]+_0x57fc59[_0x3e95('0xf')]+_0x57fc59['countmachineretry']+_0x57fc59[_0x3e95('0x10')];this[_0x3e95('0xd')]=_0x57fc59[_0x3e95('0xd')];this['countdropretry']=_0x57fc59[_0x3e95('0xe')];this[_0x3e95('0xf')]=_0x57fc59[_0x3e95('0xf')];this[_0x3e95('0x11')]=_0x57fc59[_0x3e95('0x11')];this[_0x3e95('0x10')]=_0x57fc59[_0x3e95('0x10')];this['uniqueid']=_0x4ec1b2[_0x3e95('0x12')];this[_0x3e95('0x13')]=_0x57fc59[_0x3e95('0x14')];this['calleridnum']=_0x57fc59[_0x3e95('0x15')];this[_0x3e95('0x16')]=_0x57fc59[_0x3e95('0x16')];this['responsetime']=_0x57fc59['responsetime'];this[_0x3e95('0x17')]=_0x57fc59['droptime'];this['endtime']=this[_0x3e95('0x17')];this['ringtime']=getSeconds(_0x57fc59[_0x3e95('0x18')],_0x57fc59[_0x3e95('0x16')]);this[_0x3e95('0x19')]=getSeconds(this['droptime'],_0x57fc59[_0x3e95('0x18')]);this['talktime']=0x0;this[_0x3e95('0x1a')]=_0x4ec1b2[_0x3e95('0x1a')];this[_0x3e95('0x1b')]=_0x4ec1b2['connectedlinename'];this['reason']=_0x4ec1b2[_0x3e95('0x1c')];this['callback']=_0x57fc59[_0x3e95('0x1d')];this[_0x3e95('0x1e')]=_0x57fc59['callbackuniqueid'];this[_0x3e95('0x1f')]=_0x57fc59['callbackat'];this[_0x3e95('0x20')]=_0x57fc59[_0x3e95('0x20')];this[_0x3e95('0x21')]=_0x57fc59[_0x3e95('0x21')];this[_0x3e95('0x22')]=_0x57fc59[_0x3e95('0x22')];this[_0x3e95('0x23')]=_0x57fc59[_0x3e95('0x23')];this['VoiceQueueId']=_0x57fc59['VoiceQueueId'];this[_0x3e95('0x24')]=_0x57fc59[_0x3e95('0x24')];this['originatecalleridnum']=_0x57fc59[_0x3e95('0x25')]||'';this[_0x3e95('0x26')]=_0x57fc59[_0x3e95('0x26')]||'';}module[_0x3e95('0x27')]=QueueCallerAbandon;