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