Built motion from commit e6806ed6.|2.6.0
[motion2.git] / server / services / ami / dialer / additionalPhone.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 _0xe4d8=['UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','number','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','recallme','ContactId','ListId'];(function(_0x2a4190,_0x5ae88b){var _0x7b774c=function(_0x196f2b){while(--_0x196f2b){_0x2a4190['push'](_0x2a4190['shift']());}};_0x7b774c(++_0x5ae88b);}(_0xe4d8,0x1e7));var _0x8e4d=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xe4d8[_0x21a9d9];return _0x46adce;};'use strict';var util=require(_0x8e4d('0x0'));var _=require(_0x8e4d('0x1'));var moment=require(_0x8e4d('0x2'));function getSeconds(_0x3ad88f,_0x121a2e){var _0x5d31eb=moment(_0x3ad88f)['milliseconds'](0x0);var _0x10dae8=moment(_0x121a2e)[_0x8e4d('0x3')](0x0);return _0x5d31eb[_0x8e4d('0x4')](_0x10dae8,_0x8e4d('0x5'));}function AdditionalPhone(_0x2fecd5){this['uniqueid']=_0x2fecd5['uniqueid'];this[_0x8e4d('0x6')]=_0x2fecd5[_0x8e4d('0x6')]||undefined;this[_0x8e4d('0x7')]=_0x2fecd5[_0x8e4d('0x7')];this['campaigntype']=_0x2fecd5['type']===_0x8e4d('0x8')?_0x8e4d('0x9'):_0x2fecd5[_0x8e4d('0x7')];this[_0x8e4d('0xa')]=_0x2fecd5['countbusyretry'];this[_0x8e4d('0xb')]=_0x2fecd5['countcongestionretry'];this['countnoanswerretry']=_0x2fecd5['countnoanswerretry'];this['countglobal']=_0x2fecd5['countbusyretry']+_0x2fecd5[_0x8e4d('0xb')]+_0x2fecd5['countnoanswerretry']+_0x2fecd5[_0x8e4d('0xc')]+_0x2fecd5[_0x8e4d('0xd')]+_0x2fecd5[_0x8e4d('0xe')]+_0x2fecd5[_0x8e4d('0xf')]+_0x2fecd5[_0x8e4d('0x10')];this[_0x8e4d('0xc')]=_0x2fecd5[_0x8e4d('0xc')];this[_0x8e4d('0xd')]=_0x2fecd5[_0x8e4d('0xd')];this['countabandonedretry']=_0x2fecd5['countabandonedretry'];this[_0x8e4d('0xf')]=_0x2fecd5['countmachineretry'];this[_0x8e4d('0x10')]=_0x2fecd5[_0x8e4d('0x10')];this[_0x8e4d('0x9')]=_0x2fecd5[_0x8e4d('0x9')];this[_0x8e4d('0x11')]=_0x2fecd5['name'];this[_0x8e4d('0x12')]=_0x2fecd5[_0x8e4d('0x13')];this['starttime']=_0x2fecd5[_0x8e4d('0x14')];this['responsetime']=_0x2fecd5[_0x8e4d('0x15')];this[_0x8e4d('0x16')]=_0x2fecd5[_0x8e4d('0x15')];this[_0x8e4d('0x17')]=getSeconds(_0x2fecd5[_0x8e4d('0x15')],_0x2fecd5[_0x8e4d('0x14')]);this[_0x8e4d('0x18')]=0x0;this[_0x8e4d('0x19')]=0x0;this[_0x8e4d('0x1a')]=_0x2fecd5['callback'];this['callbackuniqueid']=_0x2fecd5[_0x8e4d('0x1b')];this['callbackat']=_0x2fecd5['callbackat'];this[_0x8e4d('0x1c')]=_0x2fecd5['recallme'];this[_0x8e4d('0x1d')]=_0x2fecd5[_0x8e4d('0x1d')];this[_0x8e4d('0x1e')]=_0x2fecd5[_0x8e4d('0x1e')];this[_0x8e4d('0x1f')]=_0x2fecd5[_0x8e4d('0x1f')];this['VoiceQueueId']=_0x2fecd5[_0x8e4d('0x20')];this[_0x8e4d('0x21')]=_0x2fecd5['CampaignId'];this['originatecalleridnum']=_0x2fecd5[_0x8e4d('0x22')]||'';this[_0x8e4d('0x23')]=_0x2fecd5[_0x8e4d('0x23')]||'';}module[_0x8e4d('0x24')]=History;