Built motion from commit da617fac.|2.6.6
[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 _0x97dc=['cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','util','lodash','moment','milliseconds','diff','seconds','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridnum','number','starttime','responsetime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','IVR','reason'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x97dc,0x16a));var _0xc97d=function(_0xf9ad24,_0x411644){_0xf9ad24=_0xf9ad24-0x0;var _0x11d9ff=_0x97dc[_0xf9ad24];return _0x11d9ff;};'use strict';var util=require(_0xc97d('0x0'));var _=require(_0xc97d('0x1'));var moment=require(_0xc97d('0x2'));function getSeconds(_0x29c3a7,_0x5bee74){var _0x2b5806=moment(_0x29c3a7)[_0xc97d('0x3')](0x0);var _0x426f3d=moment(_0x5bee74)[_0xc97d('0x3')](0x0);return _0x2b5806[_0xc97d('0x4')](_0x426f3d,_0xc97d('0x5'));}function Hangup(_0x1b4861,_0x19dcd2){this[_0xc97d('0x6')]=0x4;this[_0xc97d('0x7')]=_0xc97d('0x8');this[_0xc97d('0x9')]=_0x1b4861[_0xc97d('0x9')];this[_0xc97d('0xa')]=_0x1b4861[_0xc97d('0xa')];this[_0xc97d('0xb')]=_0x1b4861[_0xc97d('0xa')]===_0xc97d('0xc')?_0xc97d('0xd'):_0x1b4861['type'];this[_0xc97d('0xe')]=_0x1b4861[_0xc97d('0xe')];this['countcongestionretry']=_0x1b4861[_0xc97d('0xf')];this[_0xc97d('0x10')]=_0x1b4861[_0xc97d('0x10')];this[_0xc97d('0x11')]=_0x1b4861['countbusyretry']+_0x1b4861['countcongestionretry']+_0x1b4861['countnoanswerretry']+_0x1b4861[_0xc97d('0x12')]+_0x1b4861[_0xc97d('0x13')]+_0x1b4861[_0xc97d('0x14')]+_0x1b4861['countmachineretry']+_0x1b4861['countagentrejectretry'];this[_0xc97d('0x12')]=_0x1b4861[_0xc97d('0x12')];this['countdropretry']=_0x1b4861[_0xc97d('0x13')];this[_0xc97d('0x14')]=_0x1b4861[_0xc97d('0x14')];this['countmachineretry']=_0x1b4861[_0xc97d('0x15')];this[_0xc97d('0x16')]=_0x1b4861[_0xc97d('0x16')];this['uniqueid']=_0x19dcd2['uniqueid'];this['calleridname']=_0x1b4861['name'];this[_0xc97d('0x17')]=_0x1b4861[_0xc97d('0x18')];this[_0xc97d('0x19')]=_0x1b4861[_0xc97d('0x19')];this[_0xc97d('0x1a')]=_0x1b4861[_0xc97d('0x1a')];this['endtime']=moment()[_0xc97d('0x1b')](_0xc97d('0x1c'));this[_0xc97d('0x1d')]=getSeconds(_0x1b4861[_0xc97d('0x1a')],_0x1b4861['starttime']);this[_0xc97d('0x1e')]=0x0;this[_0xc97d('0x1f')]=getSeconds(this['endtime'],_0x1b4861[_0xc97d('0x1a')]);this[_0xc97d('0xd')]=_0x1b4861[_0xc97d('0xd')];this['membername']=_0xc97d('0x20');this[_0xc97d('0x21')]=_0x19dcd2[_0xc97d('0x22')];this[_0xc97d('0x23')]=_0x1b4861['callback'];this[_0xc97d('0x24')]=_0x1b4861[_0xc97d('0x24')];this['callbackat']=_0x1b4861[_0xc97d('0x25')];this[_0xc97d('0x26')]=_0x1b4861['recallme'];this[_0xc97d('0x27')]=_0x1b4861[_0xc97d('0x27')];this[_0xc97d('0x28')]=_0x1b4861[_0xc97d('0x28')];this[_0xc97d('0x29')]=_0x1b4861[_0xc97d('0x29')];this[_0xc97d('0x2a')]=_0x1b4861[_0xc97d('0x2a')];this[_0xc97d('0x2b')]=_0x1b4861[_0xc97d('0x2b')];}module['exports']=Hangup;