Built motion from commit 994c64e1.|2.6.1
[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 _0x76c0=['exports','util','lodash','moment','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','queue','countcongestionretry','countnoanswerretry','countglobal','countbusyretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','number','starttime','responsetime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname'];(function(_0x3da707,_0x30c36d){var _0x342ee7=function(_0x175135){while(--_0x175135){_0x3da707['push'](_0x3da707['shift']());}};_0x342ee7(++_0x30c36d);}(_0x76c0,0xe5));var _0x076c=function(_0x7bbbd8,_0x127c19){_0x7bbbd8=_0x7bbbd8-0x0;var _0x2df23c=_0x76c0[_0x7bbbd8];return _0x2df23c;};'use strict';var util=require(_0x076c('0x0'));var _=require(_0x076c('0x1'));var moment=require(_0x076c('0x2'));function getSeconds(_0x174098,_0x33e677){var _0x4dbc9f=moment(_0x174098)[_0x076c('0x3')](0x0);var _0x469817=moment(_0x33e677)[_0x076c('0x3')](0x0);return _0x4dbc9f['diff'](_0x469817,_0x076c('0x4'));}function AdditionalPhone(_0x587fd7){this['uniqueid']=_0x587fd7[_0x076c('0x5')];this[_0x076c('0x6')]=_0x587fd7[_0x076c('0x6')]||undefined;this[_0x076c('0x7')]=_0x587fd7[_0x076c('0x7')];this[_0x076c('0x8')]=_0x587fd7['type']==='outbound'?_0x076c('0x9'):_0x587fd7[_0x076c('0x7')];this['countbusyretry']=_0x587fd7['countbusyretry'];this['countcongestionretry']=_0x587fd7[_0x076c('0xa')];this[_0x076c('0xb')]=_0x587fd7['countnoanswerretry'];this[_0x076c('0xc')]=_0x587fd7[_0x076c('0xd')]+_0x587fd7[_0x076c('0xa')]+_0x587fd7[_0x076c('0xb')]+_0x587fd7[_0x076c('0xe')]+_0x587fd7[_0x076c('0xf')]+_0x587fd7[_0x076c('0x10')]+_0x587fd7[_0x076c('0x11')]+_0x587fd7['countagentrejectretry'];this[_0x076c('0xe')]=_0x587fd7[_0x076c('0xe')];this[_0x076c('0xf')]=_0x587fd7[_0x076c('0xf')];this[_0x076c('0x10')]=_0x587fd7['countabandonedretry'];this['countmachineretry']=_0x587fd7['countmachineretry'];this['countagentrejectretry']=_0x587fd7[_0x076c('0x12')];this[_0x076c('0x9')]=_0x587fd7[_0x076c('0x9')];this[_0x076c('0x13')]=_0x587fd7['name'];this[_0x076c('0x14')]=_0x587fd7[_0x076c('0x15')];this['starttime']=_0x587fd7[_0x076c('0x16')];this[_0x076c('0x17')]=_0x587fd7[_0x076c('0x17')];this['endtime']=_0x587fd7['responsetime'];this[_0x076c('0x18')]=getSeconds(_0x587fd7['responsetime'],_0x587fd7[_0x076c('0x16')]);this[_0x076c('0x19')]=0x0;this[_0x076c('0x1a')]=0x0;this['callback']=_0x587fd7[_0x076c('0x1b')];this[_0x076c('0x1c')]=_0x587fd7['callbackuniqueid'];this[_0x076c('0x1d')]=_0x587fd7[_0x076c('0x1d')];this['recallme']=_0x587fd7['recallme'];this[_0x076c('0x1e')]=_0x587fd7[_0x076c('0x1e')];this['ListId']=_0x587fd7[_0x076c('0x1f')];this[_0x076c('0x20')]=_0x587fd7[_0x076c('0x20')];this[_0x076c('0x21')]=_0x587fd7[_0x076c('0x21')];this[_0x076c('0x22')]=_0x587fd7[_0x076c('0x22')];this[_0x076c('0x23')]=_0x587fd7[_0x076c('0x23')]||'';this['originatecalleridname']=_0x587fd7[_0x076c('0x24')]||'';}module[_0x076c('0x25')]=History;