Built motion from commit 936e8062.|2.5.33
[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 _0x50a5=['callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','calleridname','number','starttime','responsetime','endtime','ringtime','holdtime','callback','callbackuniqueid'];(function(_0x14e473,_0x3af573){var _0x3ef03a=function(_0x3387ec){while(--_0x3387ec){_0x14e473['push'](_0x14e473['shift']());}};_0x3ef03a(++_0x3af573);}(_0x50a5,0x14d));var _0x550a=function(_0xb5e81b,_0xb7c24c){_0xb5e81b=_0xb5e81b-0x0;var _0x29a987=_0x50a5[_0xb5e81b];return _0x29a987;};'use strict';var util=require('util');var _=require(_0x550a('0x0'));var moment=require(_0x550a('0x1'));function getSeconds(_0x593848,_0x4c927b){var _0x29bd2b=moment(_0x593848)[_0x550a('0x2')](0x0);var _0x2aa083=moment(_0x4c927b)[_0x550a('0x2')](0x0);return _0x29bd2b[_0x550a('0x3')](_0x2aa083,_0x550a('0x4'));}function History(_0x333ace){this[_0x550a('0x5')]=_0x333ace[_0x550a('0x5')];this[_0x550a('0x6')]=_0x333ace[_0x550a('0x6')]||undefined;this[_0x550a('0x7')]=_0x333ace[_0x550a('0x7')];this['campaigntype']=_0x333ace[_0x550a('0x7')]==='outbound'?'queue':_0x333ace['type'];this[_0x550a('0x8')]=_0x333ace[_0x550a('0x8')];this[_0x550a('0x9')]=_0x333ace['countcongestionretry'];this['countnoanswerretry']=_0x333ace[_0x550a('0xa')];this[_0x550a('0xb')]=_0x333ace['countbusyretry']+_0x333ace[_0x550a('0x9')]+_0x333ace[_0x550a('0xa')]+_0x333ace[_0x550a('0xc')]+_0x333ace[_0x550a('0xd')]+_0x333ace[_0x550a('0xe')]+_0x333ace[_0x550a('0xf')]+_0x333ace['countagentrejectretry'];this[_0x550a('0xc')]=_0x333ace[_0x550a('0xc')];this[_0x550a('0xd')]=_0x333ace[_0x550a('0xd')];this[_0x550a('0xe')]=_0x333ace[_0x550a('0xe')];this[_0x550a('0xf')]=_0x333ace[_0x550a('0xf')];this[_0x550a('0x10')]=_0x333ace[_0x550a('0x10')];this[_0x550a('0x11')]=_0x333ace[_0x550a('0x11')];this[_0x550a('0x12')]=_0x333ace['name'];this['calleridnum']=_0x333ace[_0x550a('0x13')];this[_0x550a('0x14')]=_0x333ace[_0x550a('0x14')];this[_0x550a('0x15')]=_0x333ace['responsetime'];this[_0x550a('0x16')]=_0x333ace[_0x550a('0x15')];this[_0x550a('0x17')]=getSeconds(_0x333ace[_0x550a('0x15')],_0x333ace[_0x550a('0x14')]);this[_0x550a('0x18')]=0x0;this['talktime']=0x0;this[_0x550a('0x19')]=_0x333ace[_0x550a('0x19')];this[_0x550a('0x1a')]=_0x333ace[_0x550a('0x1a')];this[_0x550a('0x1b')]=_0x333ace[_0x550a('0x1b')];this[_0x550a('0x1c')]=_0x333ace[_0x550a('0x1c')];this[_0x550a('0x1d')]=_0x333ace['ContactId'];this[_0x550a('0x1e')]=_0x333ace[_0x550a('0x1e')];this[_0x550a('0x1f')]=_0x333ace['UserId'];this[_0x550a('0x20')]=_0x333ace[_0x550a('0x20')];this[_0x550a('0x21')]=_0x333ace['CampaignId'];this[_0x550a('0x22')]=_0x333ace[_0x550a('0x22')]||'';this[_0x550a('0x23')]=_0x333ace[_0x550a('0x23')]||'';}module['exports']=History;