0fa838ad33c836036d8858f2d13c2592dceb3a3a
[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 _0xece7=['countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','starttime','responsetime','droptime','endtime','ringtime','talktime','membername','reason','callback','callbackuniqueid','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal'];(function(_0x3de26b,_0x3a4e1c){var _0x19a0b0=function(_0x5714e0){while(--_0x5714e0){_0x3de26b['push'](_0x3de26b['shift']());}};_0x19a0b0(++_0x3a4e1c);}(_0xece7,0x1ed));var _0x7ece=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xece7[_0x4565bf];return _0x5610ba;};'use strict';var util=require(_0x7ece('0x0'));var _=require(_0x7ece('0x1'));var moment=require('moment');function getSeconds(_0x569a71,_0x2851af){var _0x406f25=moment(_0x569a71)[_0x7ece('0x2')](0x0);var _0x23a687=moment(_0x2851af)['milliseconds'](0x0);return _0x406f25[_0x7ece('0x3')](_0x23a687,_0x7ece('0x4'));}function QueueCallerAbandon(_0x497868,_0x533fb7){this[_0x7ece('0x5')]=_0x497868[_0x7ece('0x5')];this[_0x7ece('0x6')]=_0x497868['type'];this[_0x7ece('0x7')]=_0x497868[_0x7ece('0x6')]===_0x7ece('0x8')?_0x7ece('0x9'):_0x497868['type'];this[_0x7ece('0xa')]=_0x497868[_0x7ece('0xa')];this[_0x7ece('0xb')]=_0x497868['countcongestionretry'];this[_0x7ece('0xc')]=_0x497868[_0x7ece('0xc')];this[_0x7ece('0xd')]=_0x497868[_0x7ece('0xa')]+_0x497868[_0x7ece('0xb')]+_0x497868[_0x7ece('0xc')]+_0x497868[_0x7ece('0xe')]+_0x497868[_0x7ece('0xf')]+_0x497868[_0x7ece('0x10')]+_0x497868[_0x7ece('0x11')]+_0x497868[_0x7ece('0x12')];this['countnosuchnumberretry']=_0x497868[_0x7ece('0xe')];this['countdropretry']=_0x497868['countdropretry'];this[_0x7ece('0x10')]=_0x497868[_0x7ece('0x10')];this[_0x7ece('0x11')]=_0x497868[_0x7ece('0x11')];this[_0x7ece('0x12')]=_0x497868['countagentrejectretry'];this['uniqueid']=_0x533fb7[_0x7ece('0x13')];this[_0x7ece('0x14')]=_0x497868['name'];this['calleridnum']=_0x497868['number'];this[_0x7ece('0x15')]=_0x497868[_0x7ece('0x15')];this[_0x7ece('0x16')]=_0x497868[_0x7ece('0x16')];this[_0x7ece('0x17')]=_0x497868[_0x7ece('0x17')];this[_0x7ece('0x18')]=this['droptime'];this[_0x7ece('0x19')]=getSeconds(_0x497868[_0x7ece('0x16')],_0x497868[_0x7ece('0x15')]);this['holdtime']=getSeconds(this[_0x7ece('0x17')],_0x497868[_0x7ece('0x16')]);this[_0x7ece('0x1a')]=0x0;this[_0x7ece('0x9')]=_0x533fb7[_0x7ece('0x9')];this[_0x7ece('0x1b')]=_0x533fb7['connectedlinename'];this[_0x7ece('0x1c')]=_0x533fb7['reason'];this['callback']=_0x497868[_0x7ece('0x1d')];this[_0x7ece('0x1e')]=_0x497868[_0x7ece('0x1e')];this['callbackat']=_0x497868['callbackat'];this[_0x7ece('0x1f')]=_0x497868[_0x7ece('0x1f')];this['ContactId']=_0x497868[_0x7ece('0x20')];this[_0x7ece('0x21')]=_0x497868[_0x7ece('0x21')];this[_0x7ece('0x22')]=_0x497868[_0x7ece('0x22')];this[_0x7ece('0x23')]=_0x497868[_0x7ece('0x23')];this[_0x7ece('0x24')]=_0x497868[_0x7ece('0x24')];this[_0x7ece('0x25')]=_0x497868['originatecalleridnum']||'';this[_0x7ece('0x26')]=_0x497868[_0x7ece('0x26')]||'';}module['exports']=QueueCallerAbandon;