Built motion from commit (unavailable).|2.3.96
[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 _0x4489=['scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridname','exports','util','lodash','milliseconds','uniqueid'];(function(_0x169722,_0x1b94f5){var _0x14055e=function(_0x5c900a){while(--_0x5c900a){_0x169722['push'](_0x169722['shift']());}};_0x14055e(++_0x1b94f5);}(_0x4489,0x164));var _0x9448=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4489[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0x9448('0x0'));var _=require(_0x9448('0x1'));var moment=require('moment');function getSeconds(_0x39e8d9,_0x12e7d8){var _0x2856c8=moment(_0x39e8d9)[_0x9448('0x2')](0x0);var _0x4f7c08=moment(_0x12e7d8)['milliseconds'](0x0);return _0x2856c8['diff'](_0x4f7c08,'seconds');}function Final(_0x541cbe){this[_0x9448('0x3')]=_0x541cbe['uniqueid'];this[_0x9448('0x4')]=_0x541cbe['scheduledat'];this[_0x9448('0x5')]=_0x541cbe[_0x9448('0x5')];this[_0x9448('0x6')]=_0x541cbe['type']==='outbound'?'queue':_0x541cbe[_0x9448('0x5')];this[_0x9448('0x7')]=_0x541cbe[_0x9448('0x7')];this[_0x9448('0x8')]=_0x541cbe[_0x9448('0x8')];this['countnoanswerretry']=_0x541cbe[_0x9448('0x9')];this[_0x9448('0xa')]=_0x541cbe[_0x9448('0x7')]+_0x541cbe[_0x9448('0x8')]+_0x541cbe[_0x9448('0x9')];this[_0x9448('0xb')]=_0x541cbe[_0x9448('0xb')];this[_0x9448('0xc')]=_0x541cbe['calleridname'];this[_0x9448('0xd')]=_0x541cbe['calleridnum'];this[_0x9448('0xe')]=_0x541cbe[_0x9448('0xe')];this['responsetime']=_0x541cbe[_0x9448('0xf')];this[_0x9448('0x10')]=_0x541cbe[_0x9448('0xf')];this[_0x9448('0x11')]=_0x541cbe[_0x9448('0x11')]||0x0;this[_0x9448('0x12')]=_0x541cbe[_0x9448('0x12')]||0x0;this[_0x9448('0x13')]=_0x541cbe['talktime']||0x0;this[_0x9448('0x14')]=_0x541cbe['callback'];this[_0x9448('0x15')]=_0x541cbe[_0x9448('0x15')];this[_0x9448('0x16')]=_0x541cbe[_0x9448('0x16')];this[_0x9448('0x17')]=_0x541cbe[_0x9448('0x17')];this[_0x9448('0x18')]=_0x541cbe[_0x9448('0x18')];this[_0x9448('0x19')]=_0x541cbe[_0x9448('0x19')];this['UserId']=_0x541cbe[_0x9448('0x1a')];this['VoiceQueueId']=_0x541cbe['VoiceQueueId'];this[_0x9448('0x1b')]=_0x541cbe['CampaignId'];this['originatecalleridnum']=_0x541cbe['originatecalleridnum']||'';this[_0x9448('0x1c')]=_0x541cbe['originatecalleridname']||'';}module[_0x9448('0x1d')]=Final;