462852e418c1dd44dbaba919da96a292236d0b36
[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 _0xa18b=['originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countmachineretry','countagentrejectretry','countdropretry','countabandonedretry','calleridname','name','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum'];(function(_0x41c690,_0x3a5dbb){var _0x1006e4=function(_0x13f18d){while(--_0x13f18d){_0x41c690['push'](_0x41c690['shift']());}};_0x1006e4(++_0x3a5dbb);}(_0xa18b,0x173));var _0xba18=function(_0x4eb7e6,_0x451464){_0x4eb7e6=_0x4eb7e6-0x0;var _0x3cf508=_0xa18b[_0x4eb7e6];return _0x3cf508;};'use strict';var util=require(_0xba18('0x0'));var _=require(_0xba18('0x1'));var moment=require(_0xba18('0x2'));function getSeconds(_0x4ea250,_0x2a282a){var _0xbad845=moment(_0x4ea250)['milliseconds'](0x0);var _0x256e32=moment(_0x2a282a)[_0xba18('0x3')](0x0);return _0xbad845[_0xba18('0x4')](_0x256e32,_0xba18('0x5'));}function AdditionalPhone(_0xf98b4b){this[_0xba18('0x6')]=_0xf98b4b[_0xba18('0x6')];this[_0xba18('0x7')]=_0xf98b4b[_0xba18('0x7')]||undefined;this[_0xba18('0x8')]=_0xf98b4b[_0xba18('0x8')];this[_0xba18('0x9')]=_0xf98b4b['type']===_0xba18('0xa')?_0xba18('0xb'):_0xf98b4b[_0xba18('0x8')];this[_0xba18('0xc')]=_0xf98b4b['countbusyretry'];this[_0xba18('0xd')]=_0xf98b4b['countcongestionretry'];this[_0xba18('0xe')]=_0xf98b4b['countnoanswerretry'];this[_0xba18('0xf')]=_0xf98b4b['countbusyretry']+_0xf98b4b[_0xba18('0xd')]+_0xf98b4b['countnoanswerretry']+_0xf98b4b[_0xba18('0x10')]+_0xf98b4b['countdropretry']+_0xf98b4b['countabandonedretry']+_0xf98b4b[_0xba18('0x11')]+_0xf98b4b[_0xba18('0x12')];this[_0xba18('0x10')]=_0xf98b4b[_0xba18('0x10')];this['countdropretry']=_0xf98b4b[_0xba18('0x13')];this['countabandonedretry']=_0xf98b4b[_0xba18('0x14')];this[_0xba18('0x11')]=_0xf98b4b['countmachineretry'];this[_0xba18('0x12')]=_0xf98b4b[_0xba18('0x12')];this[_0xba18('0xb')]=_0xf98b4b[_0xba18('0xb')];this[_0xba18('0x15')]=_0xf98b4b[_0xba18('0x16')];this[_0xba18('0x17')]=_0xf98b4b['number'];this[_0xba18('0x18')]=_0xf98b4b['starttime'];this['responsetime']=_0xf98b4b[_0xba18('0x19')];this[_0xba18('0x1a')]=_0xf98b4b[_0xba18('0x19')];this[_0xba18('0x1b')]=getSeconds(_0xf98b4b['responsetime'],_0xf98b4b['starttime']);this[_0xba18('0x1c')]=0x0;this['talktime']=0x0;this[_0xba18('0x1d')]=_0xf98b4b['callback'];this['callbackuniqueid']=_0xf98b4b[_0xba18('0x1e')];this[_0xba18('0x1f')]=_0xf98b4b['callbackat'];this[_0xba18('0x20')]=_0xf98b4b[_0xba18('0x20')];this[_0xba18('0x21')]=_0xf98b4b['ContactId'];this[_0xba18('0x22')]=_0xf98b4b[_0xba18('0x22')];this['UserId']=_0xf98b4b[_0xba18('0x23')];this[_0xba18('0x24')]=_0xf98b4b[_0xba18('0x24')];this[_0xba18('0x25')]=_0xf98b4b[_0xba18('0x25')];this['originatecalleridnum']=_0xf98b4b[_0xba18('0x26')]||'';this[_0xba18('0x27')]=_0xf98b4b[_0xba18('0x27')]||'';}module[_0xba18('0x28')]=History;