Built motion from commit (unavailable).|2.4.4
[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 _0x64e7=['membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','calleridname','name','calleridnum','starttime','responsetime','droptime','endtime','ringtime'];(function(_0x1e3ee7,_0x4d3649){var _0x2ca187=function(_0x15ad73){while(--_0x15ad73){_0x1e3ee7['push'](_0x1e3ee7['shift']());}};_0x2ca187(++_0x4d3649);}(_0x64e7,0x1ef));var _0x764e=function(_0x5c9f15,_0x4a5491){_0x5c9f15=_0x5c9f15-0x0;var _0x535ffc=_0x64e7[_0x5c9f15];return _0x535ffc;};'use strict';var util=require(_0x764e('0x0'));var _=require(_0x764e('0x1'));var moment=require('moment');function getSeconds(_0x410aa8,_0x2a97ea){var _0x1410de=moment(_0x410aa8)[_0x764e('0x2')](0x0);var _0x2625ae=moment(_0x2a97ea)[_0x764e('0x2')](0x0);return _0x1410de[_0x764e('0x3')](_0x2625ae,_0x764e('0x4'));}function QueueCallerAbandon(_0x3338f7,_0x29d032){this[_0x764e('0x5')]=_0x3338f7[_0x764e('0x5')];this[_0x764e('0x6')]=_0x3338f7[_0x764e('0x6')];this[_0x764e('0x7')]=_0x3338f7['type']===_0x764e('0x8')?_0x764e('0x9'):_0x3338f7['type'];this[_0x764e('0xa')]=_0x3338f7[_0x764e('0xa')];this[_0x764e('0xb')]=_0x3338f7[_0x764e('0xb')];this[_0x764e('0xc')]=_0x3338f7[_0x764e('0xc')];this[_0x764e('0xd')]=_0x3338f7[_0x764e('0xa')]+_0x3338f7['countcongestionretry']+_0x3338f7[_0x764e('0xc')];this[_0x764e('0xe')]=_0x29d032[_0x764e('0xe')];this[_0x764e('0xf')]=_0x3338f7[_0x764e('0x10')];this[_0x764e('0x11')]=_0x3338f7['number'];this[_0x764e('0x12')]=_0x3338f7['starttime'];this[_0x764e('0x13')]=_0x3338f7['responsetime'];this[_0x764e('0x14')]=_0x3338f7[_0x764e('0x14')];this[_0x764e('0x15')]=this['droptime'];this[_0x764e('0x16')]=getSeconds(_0x3338f7[_0x764e('0x13')],_0x3338f7['starttime']);this['holdtime']=getSeconds(this[_0x764e('0x14')],_0x3338f7[_0x764e('0x13')]);this['talktime']=0x0;this[_0x764e('0x9')]=_0x29d032[_0x764e('0x9')];this[_0x764e('0x17')]=_0x29d032['connectedlinename'];this[_0x764e('0x18')]=_0x29d032[_0x764e('0x18')];this[_0x764e('0x19')]=_0x3338f7['callback'];this[_0x764e('0x1a')]=_0x3338f7[_0x764e('0x1a')];this[_0x764e('0x1b')]=_0x3338f7[_0x764e('0x1b')];this[_0x764e('0x1c')]=_0x3338f7[_0x764e('0x1c')];this[_0x764e('0x1d')]=_0x3338f7[_0x764e('0x1d')];this[_0x764e('0x1e')]=_0x3338f7['ListId'];this[_0x764e('0x1f')]=_0x3338f7['UserId'];this[_0x764e('0x20')]=_0x3338f7['VoiceQueueId'];this[_0x764e('0x21')]=_0x3338f7[_0x764e('0x21')];this['originatecalleridnum']=_0x3338f7[_0x764e('0x22')]||'';this[_0x764e('0x23')]=_0x3338f7[_0x764e('0x23')]||'';}module[_0x764e('0x24')]=QueueCallerAbandon;