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