445d77360e4ac083bc5fadf37a2c2efb180e098c
[motion2.git] / server / services / ami / dialer / models / 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 _0x3122=['callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','../utils','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','amd','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','number','starttime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','responsetime','holdtime','talktime','membername','IVR','reason','cause-txt','callback'];(function(_0x3d5a80,_0x45acbe){var _0x4f85d1=function(_0x5e84b5){while(--_0x5e84b5){_0x3d5a80['push'](_0x3d5a80['shift']());}};_0x4f85d1(++_0x45acbe);}(_0x3122,0xe5));var _0x2312=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x3122[_0x167cc1];return _0x10bc4b;};'use strict';var moment=require('moment');var utils=require(_0x2312('0x0'));function Hangup(_0x4b6c15,_0x486472){this['state']=0x4;this[_0x2312('0x1')]=_0x2312('0x2');this['scheduledat']=_0x4b6c15[_0x2312('0x3')];this[_0x2312('0x4')]=_0x4b6c15[_0x2312('0x4')];this[_0x2312('0x5')]=_0x4b6c15[_0x2312('0x4')]===_0x2312('0x6')?_0x2312('0x7'):_0x4b6c15[_0x2312('0x4')];this[_0x2312('0x8')]=_0x4b6c15[_0x2312('0x8')]||![];this[_0x2312('0x9')]=_0x4b6c15[_0x2312('0x9')];this[_0x2312('0xa')]=_0x4b6c15['countcongestionretry'];this[_0x2312('0xb')]=_0x4b6c15[_0x2312('0xb')];this['countglobal']=_0x4b6c15[_0x2312('0x9')]+_0x4b6c15[_0x2312('0xa')]+_0x4b6c15[_0x2312('0xb')]+_0x4b6c15[_0x2312('0xc')]+_0x4b6c15[_0x2312('0xd')]+_0x4b6c15[_0x2312('0xe')]+_0x4b6c15['countmachineretry']+_0x4b6c15['countagentrejectretry'];this[_0x2312('0xc')]=_0x4b6c15['countnosuchnumberretry'];this[_0x2312('0xd')]=_0x4b6c15[_0x2312('0xd')];this[_0x2312('0xe')]=_0x4b6c15[_0x2312('0xe')];this[_0x2312('0xf')]=_0x4b6c15[_0x2312('0xf')];this[_0x2312('0x10')]=_0x4b6c15[_0x2312('0x10')];this[_0x2312('0x11')]=_0x486472['uniqueid'];this[_0x2312('0x12')]=_0x4b6c15[_0x2312('0x13')];this['calleridnum']=_0x4b6c15[_0x2312('0x14')];this[_0x2312('0x15')]=_0x4b6c15['starttime'];this['responsetime']=_0x4b6c15['responsetime'];this[_0x2312('0x16')]=moment()[_0x2312('0x17')](_0x2312('0x18'));this[_0x2312('0x19')]=utils[_0x2312('0x1a')](_0x4b6c15[_0x2312('0x1b')],_0x4b6c15[_0x2312('0x15')]);this[_0x2312('0x1c')]=0x0;this[_0x2312('0x1d')]=utils[_0x2312('0x1a')](this[_0x2312('0x16')],_0x4b6c15[_0x2312('0x1b')]);this[_0x2312('0x7')]=_0x4b6c15['queue'];this[_0x2312('0x1e')]=_0x2312('0x1f');this[_0x2312('0x20')]=_0x486472[_0x2312('0x21')];this[_0x2312('0x22')]=_0x4b6c15['callback'];this[_0x2312('0x23')]=_0x4b6c15['callbackuniqueid'];this[_0x2312('0x24')]=_0x4b6c15[_0x2312('0x24')];this[_0x2312('0x25')]=_0x4b6c15[_0x2312('0x25')];this[_0x2312('0x26')]=_0x4b6c15[_0x2312('0x26')];this[_0x2312('0x27')]=_0x4b6c15[_0x2312('0x27')];this[_0x2312('0x28')]=_0x4b6c15[_0x2312('0x28')];this['VoiceQueueId']=_0x4b6c15[_0x2312('0x29')];this[_0x2312('0x2a')]=_0x4b6c15[_0x2312('0x2a')];}module[_0x2312('0x2b')]=Hangup;