acf907672ca19125c64cd2f1e24fba4bd2dec9fd
[motion2.git] / server / services / ami / dialer / history.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 _0xd950=['name','calleridnum','number','responsetime','endtime','ringtime','starttime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countglobal','countnoanswerretry','countnosuchnumberretry','countmachineretry','countagentrejectretry','countdropretry','countabandonedretry','calleridname'];(function(_0xbd08b4,_0x4790ed){var _0x314f1e=function(_0x161589){while(--_0x161589){_0xbd08b4['push'](_0xbd08b4['shift']());}};_0x314f1e(++_0x4790ed);}(_0xd950,0x67));var _0x0d95=function(_0x491916,_0x227ab4){_0x491916=_0x491916-0x0;var _0x3d4149=_0xd950[_0x491916];return _0x3d4149;};'use strict';var util=require(_0x0d95('0x0'));var _=require(_0x0d95('0x1'));var moment=require(_0x0d95('0x2'));function getSeconds(_0x1b49c4,_0x15b83f){var _0x6481f4=moment(_0x1b49c4)['milliseconds'](0x0);var _0x1baafa=moment(_0x15b83f)[_0x0d95('0x3')](0x0);return _0x6481f4[_0x0d95('0x4')](_0x1baafa,_0x0d95('0x5'));}function History(_0x431fb6){this['uniqueid']=_0x431fb6['uniqueid'];this[_0x0d95('0x6')]=_0x431fb6[_0x0d95('0x6')]||undefined;this[_0x0d95('0x7')]=_0x431fb6['type'];this[_0x0d95('0x8')]=_0x431fb6[_0x0d95('0x7')]==='outbound'?_0x0d95('0x9'):_0x431fb6['type'];this[_0x0d95('0xa')]=_0x431fb6[_0x0d95('0xa')];this[_0x0d95('0xb')]=_0x431fb6[_0x0d95('0xb')];this['countnoanswerretry']=_0x431fb6['countnoanswerretry'];this[_0x0d95('0xc')]=_0x431fb6['countbusyretry']+_0x431fb6['countcongestionretry']+_0x431fb6[_0x0d95('0xd')]+_0x431fb6[_0x0d95('0xe')]+_0x431fb6['countdropretry']+_0x431fb6['countabandonedretry']+_0x431fb6[_0x0d95('0xf')]+_0x431fb6[_0x0d95('0x10')];this[_0x0d95('0xe')]=_0x431fb6['countnosuchnumberretry'];this[_0x0d95('0x11')]=_0x431fb6[_0x0d95('0x11')];this[_0x0d95('0x12')]=_0x431fb6[_0x0d95('0x12')];this[_0x0d95('0xf')]=_0x431fb6['countmachineretry'];this['countagentrejectretry']=_0x431fb6[_0x0d95('0x10')];this[_0x0d95('0x9')]=_0x431fb6[_0x0d95('0x9')];this[_0x0d95('0x13')]=_0x431fb6[_0x0d95('0x14')];this[_0x0d95('0x15')]=_0x431fb6[_0x0d95('0x16')];this['starttime']=_0x431fb6['starttime'];this[_0x0d95('0x17')]=_0x431fb6[_0x0d95('0x17')];this[_0x0d95('0x18')]=_0x431fb6['responsetime'];this[_0x0d95('0x19')]=getSeconds(_0x431fb6[_0x0d95('0x17')],_0x431fb6[_0x0d95('0x1a')]);this[_0x0d95('0x1b')]=0x0;this[_0x0d95('0x1c')]=0x0;this[_0x0d95('0x1d')]=_0x431fb6[_0x0d95('0x1d')];this[_0x0d95('0x1e')]=_0x431fb6[_0x0d95('0x1e')];this['callbackat']=_0x431fb6[_0x0d95('0x1f')];this[_0x0d95('0x20')]=_0x431fb6['recallme'];this[_0x0d95('0x21')]=_0x431fb6[_0x0d95('0x21')];this['ListId']=_0x431fb6[_0x0d95('0x22')];this[_0x0d95('0x23')]=_0x431fb6[_0x0d95('0x23')];this[_0x0d95('0x24')]=_0x431fb6[_0x0d95('0x24')];this[_0x0d95('0x25')]=_0x431fb6[_0x0d95('0x25')];this['originatecalleridnum']=_0x431fb6[_0x0d95('0x26')]||'';this[_0x0d95('0x27')]=_0x431fb6[_0x0d95('0x27')]||'';}module[_0x0d95('0x28')]=History;