Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / services / ami / dialer / final.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 _0x110e=['callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','calleridname','starttime','endtime','ringtime','holdtime','talktime','callback'];(function(_0xadba8a,_0x4c6fb1){var _0x36f4c8=function(_0x4d7fe1){while(--_0x4d7fe1){_0xadba8a['push'](_0xadba8a['shift']());}};_0x36f4c8(++_0x4c6fb1);}(_0x110e,0x68));var _0xe110=function(_0x565ed7,_0x398228){_0x565ed7=_0x565ed7-0x0;var _0x183ad7=_0x110e[_0x565ed7];return _0x183ad7;};'use strict';var util=require(_0xe110('0x0'));var _=require(_0xe110('0x1'));var moment=require('moment');function getSeconds(_0x1a21dd,_0x2a7c73){var _0x2a4965=moment(_0x1a21dd)[_0xe110('0x2')](0x0);var _0x3f8825=moment(_0x2a7c73)['milliseconds'](0x0);return _0x2a4965['diff'](_0x3f8825,'seconds');}function Final(_0x5b82b3){this[_0xe110('0x3')]=_0x5b82b3['uniqueid'];this[_0xe110('0x4')]=_0x5b82b3[_0xe110('0x4')];this[_0xe110('0x5')]=_0x5b82b3[_0xe110('0x5')];this[_0xe110('0x6')]=_0x5b82b3[_0xe110('0x5')]===_0xe110('0x7')?_0xe110('0x8'):_0x5b82b3[_0xe110('0x5')];this['countbusyretry']=_0x5b82b3[_0xe110('0x9')];this[_0xe110('0xa')]=_0x5b82b3['countcongestionretry'];this[_0xe110('0xb')]=_0x5b82b3[_0xe110('0xb')];this[_0xe110('0xc')]=_0x5b82b3[_0xe110('0x9')]+_0x5b82b3['countcongestionretry']+_0x5b82b3['countnoanswerretry'];this['queue']=_0x5b82b3[_0xe110('0x8')];this[_0xe110('0xd')]=_0x5b82b3['calleridname'];this['calleridnum']=_0x5b82b3['calleridnum'];this[_0xe110('0xe')]=_0x5b82b3[_0xe110('0xe')];this['responsetime']=_0x5b82b3['responsetime'];this[_0xe110('0xf')]=_0x5b82b3['responsetime'];this[_0xe110('0x10')]=_0x5b82b3[_0xe110('0x10')]||0x0;this[_0xe110('0x11')]=_0x5b82b3[_0xe110('0x11')]||0x0;this['talktime']=_0x5b82b3[_0xe110('0x12')]||0x0;this[_0xe110('0x13')]=_0x5b82b3['callback'];this['callbackuniqueid']=_0x5b82b3[_0xe110('0x14')];this['callbackat']=_0x5b82b3[_0xe110('0x15')];this[_0xe110('0x16')]=_0x5b82b3['recallme'];this[_0xe110('0x17')]=_0x5b82b3[_0xe110('0x17')];this[_0xe110('0x18')]=_0x5b82b3[_0xe110('0x18')];this[_0xe110('0x19')]=_0x5b82b3['UserId'];this[_0xe110('0x1a')]=_0x5b82b3[_0xe110('0x1a')];this['CampaignId']=_0x5b82b3[_0xe110('0x1b')];this[_0xe110('0x1c')]=_0x5b82b3[_0xe110('0x1c')]||'';this[_0xe110('0x1d')]=_0x5b82b3[_0xe110('0x1d')]||'';}module[_0xe110('0x1e')]=Final;