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