Built motion from commit 1cfc41f6.|2.5.41
[motion2.git] / server / services / ami / dialer / hangup.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 _0xf900=['callbackat','recallme','ContactId','ListId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','state','statedesc','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','endtime','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','responsetime','IVR','reason','cause-txt','callback','callbackuniqueid'];(function(_0xad52f6,_0x30a905){var _0x549e24=function(_0x42412c){while(--_0x42412c){_0xad52f6['push'](_0xad52f6['shift']());}};_0x549e24(++_0x30a905);}(_0xf900,0x13b));var _0x0f90=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xf900[_0xfae23b];return _0x200640;};'use strict';var util=require(_0x0f90('0x0'));var _=require(_0x0f90('0x1'));var moment=require(_0x0f90('0x2'));function getSeconds(_0x4967a5,_0x3462f6){var _0x55c5e5=moment(_0x4967a5)['milliseconds'](0x0);var _0x1f0972=moment(_0x3462f6)[_0x0f90('0x3')](0x0);return _0x55c5e5[_0x0f90('0x4')](_0x1f0972,'seconds');}function Hangup(_0x20514f,_0x4e9668){this[_0x0f90('0x5')]=0x4;this[_0x0f90('0x6')]='Answer';this['scheduledat']=_0x20514f[_0x0f90('0x7')];this[_0x0f90('0x8')]=_0x20514f[_0x0f90('0x8')];this[_0x0f90('0x9')]=_0x20514f[_0x0f90('0x8')]===_0x0f90('0xa')?_0x0f90('0xb'):_0x20514f['type'];this[_0x0f90('0xc')]=_0x20514f[_0x0f90('0xc')];this[_0x0f90('0xd')]=_0x20514f[_0x0f90('0xd')];this[_0x0f90('0xe')]=_0x20514f[_0x0f90('0xe')];this[_0x0f90('0xf')]=_0x20514f['countbusyretry']+_0x20514f[_0x0f90('0xd')]+_0x20514f[_0x0f90('0xe')]+_0x20514f[_0x0f90('0x10')]+_0x20514f[_0x0f90('0x11')]+_0x20514f[_0x0f90('0x12')]+_0x20514f[_0x0f90('0x13')]+_0x20514f[_0x0f90('0x14')];this['countnosuchnumberretry']=_0x20514f[_0x0f90('0x10')];this['countdropretry']=_0x20514f[_0x0f90('0x11')];this[_0x0f90('0x12')]=_0x20514f[_0x0f90('0x12')];this[_0x0f90('0x13')]=_0x20514f[_0x0f90('0x13')];this[_0x0f90('0x14')]=_0x20514f[_0x0f90('0x14')];this[_0x0f90('0x15')]=_0x4e9668['uniqueid'];this[_0x0f90('0x16')]=_0x20514f[_0x0f90('0x17')];this[_0x0f90('0x18')]=_0x20514f[_0x0f90('0x19')];this[_0x0f90('0x1a')]=_0x20514f[_0x0f90('0x1a')];this['responsetime']=_0x20514f['responsetime'];this[_0x0f90('0x1b')]=moment()['format'](_0x0f90('0x1c'));this[_0x0f90('0x1d')]=getSeconds(_0x20514f['responsetime'],_0x20514f['starttime']);this[_0x0f90('0x1e')]=0x0;this['talktime']=getSeconds(this[_0x0f90('0x1b')],_0x20514f[_0x0f90('0x1f')]);this[_0x0f90('0xb')]=_0x20514f[_0x0f90('0xb')];this['membername']=_0x0f90('0x20');this[_0x0f90('0x21')]=_0x4e9668[_0x0f90('0x22')];this['callback']=_0x20514f[_0x0f90('0x23')];this[_0x0f90('0x24')]=_0x20514f[_0x0f90('0x24')];this[_0x0f90('0x25')]=_0x20514f['callbackat'];this[_0x0f90('0x26')]=_0x20514f[_0x0f90('0x26')];this[_0x0f90('0x27')]=_0x20514f[_0x0f90('0x27')];this[_0x0f90('0x28')]=_0x20514f[_0x0f90('0x28')];this['UserId']=_0x20514f['UserId'];this[_0x0f90('0x29')]=_0x20514f[_0x0f90('0x29')];this[_0x0f90('0x2a')]=_0x20514f['CampaignId'];}module[_0x0f90('0x2b')]=Hangup;