2e273f93fe14d18c17d6b137f437ec1908b23644
[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 _0x6f64=['ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','diff','seconds','scheduledat','type','outbound','queue','countcongestionretry','countglobal','countbusyretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','droptime','ringtime','holdtime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId'];(function(_0x5aba03,_0x161ec6){var _0x24d080=function(_0x4aef52){while(--_0x4aef52){_0x5aba03['push'](_0x5aba03['shift']());}};_0x24d080(++_0x161ec6);}(_0x6f64,0xab));var _0x46f6=function(_0x21ef85,_0x2d9f4f){_0x21ef85=_0x21ef85-0x0;var _0x5b9a7d=_0x6f64[_0x21ef85];return _0x5b9a7d;};'use strict';var util=require('util');var _=require(_0x46f6('0x0'));var moment=require(_0x46f6('0x1'));function getSeconds(_0x2f3638,_0x417c04){var _0x50fad0=moment(_0x2f3638)[_0x46f6('0x2')](0x0);var _0x482267=moment(_0x417c04)[_0x46f6('0x2')](0x0);return _0x50fad0[_0x46f6('0x3')](_0x482267,_0x46f6('0x4'));}function QueueCallerAbandon(_0x20c450,_0x594296){this[_0x46f6('0x5')]=_0x20c450[_0x46f6('0x5')];this['type']=_0x20c450['type'];this['campaigntype']=_0x20c450[_0x46f6('0x6')]===_0x46f6('0x7')?_0x46f6('0x8'):_0x20c450[_0x46f6('0x6')];this['countbusyretry']=_0x20c450['countbusyretry'];this['countcongestionretry']=_0x20c450[_0x46f6('0x9')];this['countnoanswerretry']=_0x20c450['countnoanswerretry'];this[_0x46f6('0xa')]=_0x20c450[_0x46f6('0xb')]+_0x20c450[_0x46f6('0x9')]+_0x20c450[_0x46f6('0xc')]+_0x20c450[_0x46f6('0xd')]+_0x20c450[_0x46f6('0xe')]+_0x20c450['countabandonedretry']+_0x20c450[_0x46f6('0xf')]+_0x20c450['countagentrejectretry'];this['countnosuchnumberretry']=_0x20c450['countnosuchnumberretry'];this[_0x46f6('0xe')]=_0x20c450[_0x46f6('0xe')];this['countabandonedretry']=_0x20c450[_0x46f6('0x10')];this[_0x46f6('0xf')]=_0x20c450[_0x46f6('0xf')];this['countagentrejectretry']=_0x20c450['countagentrejectretry'];this[_0x46f6('0x11')]=_0x594296[_0x46f6('0x11')];this[_0x46f6('0x12')]=_0x20c450['name'];this[_0x46f6('0x13')]=_0x20c450[_0x46f6('0x14')];this[_0x46f6('0x15')]=_0x20c450[_0x46f6('0x15')];this[_0x46f6('0x16')]=_0x20c450[_0x46f6('0x16')];this[_0x46f6('0x17')]=_0x20c450[_0x46f6('0x17')];this['endtime']=this['droptime'];this[_0x46f6('0x18')]=getSeconds(_0x20c450['responsetime'],_0x20c450[_0x46f6('0x15')]);this[_0x46f6('0x19')]=getSeconds(this[_0x46f6('0x17')],_0x20c450[_0x46f6('0x16')]);this['talktime']=0x0;this[_0x46f6('0x8')]=_0x594296['queue'];this[_0x46f6('0x1a')]=_0x594296[_0x46f6('0x1b')];this['reason']=_0x594296[_0x46f6('0x1c')];this[_0x46f6('0x1d')]=_0x20c450['callback'];this['callbackuniqueid']=_0x20c450[_0x46f6('0x1e')];this[_0x46f6('0x1f')]=_0x20c450[_0x46f6('0x1f')];this[_0x46f6('0x20')]=_0x20c450[_0x46f6('0x20')];this['ContactId']=_0x20c450[_0x46f6('0x21')];this[_0x46f6('0x22')]=_0x20c450['ListId'];this[_0x46f6('0x23')]=_0x20c450[_0x46f6('0x23')];this[_0x46f6('0x24')]=_0x20c450[_0x46f6('0x24')];this[_0x46f6('0x25')]=_0x20c450[_0x46f6('0x25')];this[_0x46f6('0x26')]=_0x20c450['originatecalleridnum']||'';this['originatecalleridname']=_0x20c450[_0x46f6('0x27')]||'';}module[_0x46f6('0x28')]=QueueCallerAbandon;