Built motion from commit 25580385.|2.6.2
[motion2.git] / server / services / ami / dialer / 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 _0x71ab=['callbackat','ContactId','ListId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','seconds','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countabandonedretry','uniqueid','calleridname','name','calleridnum','starttime','responsetime','format','ringtime','holdtime','talktime','endtime','membername','reason','cause-txt','callback','callbackuniqueid'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0x71ab,0x192));var _0xb71a=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x71ab[_0x138adb];return _0x1b27f2;};'use strict';var util=require(_0xb71a('0x0'));var _=require(_0xb71a('0x1'));var moment=require(_0xb71a('0x2'));function getSeconds(_0x46db7a,_0x120d98){var _0x3def70=moment(_0x46db7a)['milliseconds'](0x0);var _0x5d6626=moment(_0x120d98)[_0xb71a('0x3')](0x0);return _0x3def70[_0xb71a('0x4')](_0x5d6626,_0xb71a('0x5'));}function Hangup(_0x40ec09,_0x84decb){this['state']=0x4;this[_0xb71a('0x6')]=_0xb71a('0x7');this[_0xb71a('0x8')]=_0x40ec09['scheduledat'];this[_0xb71a('0x9')]=_0x40ec09[_0xb71a('0x9')];this[_0xb71a('0xa')]=_0x40ec09[_0xb71a('0x9')]===_0xb71a('0xb')?_0xb71a('0xc'):_0x40ec09[_0xb71a('0x9')];this[_0xb71a('0xd')]=_0x40ec09[_0xb71a('0xd')];this[_0xb71a('0xe')]=_0x40ec09[_0xb71a('0xe')];this[_0xb71a('0xf')]=_0x40ec09[_0xb71a('0xf')];this[_0xb71a('0x10')]=_0x40ec09[_0xb71a('0xd')]+_0x40ec09['countcongestionretry']+_0x40ec09['countnoanswerretry']+_0x40ec09['countnosuchnumberretry']+_0x40ec09[_0xb71a('0x11')]+_0x40ec09['countabandonedretry']+_0x40ec09[_0xb71a('0x12')]+_0x40ec09[_0xb71a('0x13')];this[_0xb71a('0x14')]=_0x40ec09[_0xb71a('0x14')];this[_0xb71a('0x11')]=_0x40ec09[_0xb71a('0x11')];this['countabandonedretry']=_0x40ec09[_0xb71a('0x15')];this[_0xb71a('0x12')]=_0x40ec09[_0xb71a('0x12')];this[_0xb71a('0x13')]=_0x40ec09[_0xb71a('0x13')];this[_0xb71a('0x16')]=_0x84decb['uniqueid'];this[_0xb71a('0x17')]=_0x40ec09[_0xb71a('0x18')];this[_0xb71a('0x19')]=_0x40ec09['number'];this['starttime']=_0x40ec09[_0xb71a('0x1a')];this[_0xb71a('0x1b')]=_0x40ec09[_0xb71a('0x1b')];this['endtime']=moment()[_0xb71a('0x1c')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xb71a('0x1d')]=getSeconds(_0x40ec09[_0xb71a('0x1b')],_0x40ec09[_0xb71a('0x1a')]);this[_0xb71a('0x1e')]=0x0;this[_0xb71a('0x1f')]=getSeconds(this[_0xb71a('0x20')],_0x40ec09[_0xb71a('0x1b')]);this[_0xb71a('0xc')]=_0x40ec09[_0xb71a('0xc')];this[_0xb71a('0x21')]='IVR';this[_0xb71a('0x22')]=_0x84decb[_0xb71a('0x23')];this[_0xb71a('0x24')]=_0x40ec09[_0xb71a('0x24')];this[_0xb71a('0x25')]=_0x40ec09[_0xb71a('0x25')];this['callbackat']=_0x40ec09[_0xb71a('0x26')];this['recallme']=_0x40ec09['recallme'];this[_0xb71a('0x27')]=_0x40ec09['ContactId'];this[_0xb71a('0x28')]=_0x40ec09[_0xb71a('0x28')];this['UserId']=_0x40ec09['UserId'];this[_0xb71a('0x29')]=_0x40ec09['VoiceQueueId'];this[_0xb71a('0x2a')]=_0x40ec09[_0xb71a('0x2a')];}module[_0xb71a('0x2b')]=Hangup;