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