572172994108a012a3dfed806ea7d5f148686a04
[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 _0x83a4=['countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','getSeconds','holdtime','talktime','queue','membername','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','exports','../utils','state','statedesc','Answer','scheduledat','type','outbound','amd','countbusyretry'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x83a4,0x187));var _0x483a=function(_0x13e741,_0x5d3c24){_0x13e741=_0x13e741-0x0;var _0x3f8bb3=_0x83a4[_0x13e741];return _0x3f8bb3;};'use strict';var moment=require('moment');var utils=require(_0x483a('0x0'));function Hangup(_0x4769ee,_0x4bf29b){this[_0x483a('0x1')]=0x4;this[_0x483a('0x2')]=_0x483a('0x3');this[_0x483a('0x4')]=_0x4769ee[_0x483a('0x4')];this[_0x483a('0x5')]=_0x4769ee['type'];this['campaigntype']=_0x4769ee[_0x483a('0x5')]===_0x483a('0x6')?'queue':_0x4769ee[_0x483a('0x5')];this[_0x483a('0x7')]=_0x4769ee[_0x483a('0x7')]||![];this[_0x483a('0x8')]=_0x4769ee[_0x483a('0x8')];this['countcongestionretry']=_0x4769ee['countcongestionretry'];this[_0x483a('0x9')]=_0x4769ee[_0x483a('0x9')];this[_0x483a('0xa')]=_0x4769ee['countbusyretry']+_0x4769ee[_0x483a('0xb')]+_0x4769ee[_0x483a('0x9')]+_0x4769ee[_0x483a('0xc')]+_0x4769ee[_0x483a('0xd')]+_0x4769ee[_0x483a('0xe')]+_0x4769ee['countmachineretry']+_0x4769ee[_0x483a('0xf')];this[_0x483a('0xc')]=_0x4769ee[_0x483a('0xc')];this[_0x483a('0xd')]=_0x4769ee[_0x483a('0xd')];this[_0x483a('0xe')]=_0x4769ee[_0x483a('0xe')];this[_0x483a('0x10')]=_0x4769ee[_0x483a('0x10')];this[_0x483a('0xf')]=_0x4769ee[_0x483a('0xf')];this[_0x483a('0x11')]=_0x4bf29b[_0x483a('0x11')];this[_0x483a('0x12')]=_0x4769ee['name'];this[_0x483a('0x13')]=_0x4769ee[_0x483a('0x14')];this[_0x483a('0x15')]=_0x4769ee['starttime'];this[_0x483a('0x16')]=_0x4769ee['responsetime'];this[_0x483a('0x17')]=moment()[_0x483a('0x18')](_0x483a('0x19'));this['ringtime']=utils[_0x483a('0x1a')](_0x4769ee[_0x483a('0x16')],_0x4769ee[_0x483a('0x15')]);this[_0x483a('0x1b')]=0x0;this[_0x483a('0x1c')]=utils[_0x483a('0x1a')](this[_0x483a('0x17')],_0x4769ee['responsetime']);this[_0x483a('0x1d')]=_0x4769ee[_0x483a('0x1d')];this[_0x483a('0x1e')]='IVR';this['reason']=_0x4bf29b[_0x483a('0x1f')];this[_0x483a('0x20')]=_0x4769ee[_0x483a('0x20')];this[_0x483a('0x21')]=_0x4769ee[_0x483a('0x21')];this['callbackat']=_0x4769ee[_0x483a('0x22')];this[_0x483a('0x23')]=_0x4769ee[_0x483a('0x23')];this[_0x483a('0x24')]=_0x4769ee[_0x483a('0x24')];this['ListId']=_0x4769ee['ListId'];this[_0x483a('0x25')]=_0x4769ee['UserId'];this[_0x483a('0x26')]=_0x4769ee['VoiceQueueId'];this['CampaignId']=_0x4769ee['CampaignId'];}module[_0x483a('0x27')]=Hangup;