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