Built motion from commit 753c950e.|2.5.42
[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 _0xbb87=['responsetime','endtime','ringtime','holdtime','talktime','membername','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','state','statedesc','Answer','scheduledat','type','outbound','queue','countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','number','starttime'];(function(_0x175e89,_0x20835f){var _0x2ed996=function(_0x56239f){while(--_0x56239f){_0x175e89['push'](_0x175e89['shift']());}};_0x2ed996(++_0x20835f);}(_0xbb87,0x16a));var _0x7bb8=function(_0x12ce11,_0x14e9be){_0x12ce11=_0x12ce11-0x0;var _0x1dfebd=_0xbb87[_0x12ce11];return _0x1dfebd;};'use strict';var util=require(_0x7bb8('0x0'));var _=require(_0x7bb8('0x1'));var moment=require(_0x7bb8('0x2'));function getSeconds(_0x5203dd,_0x3080f0){var _0x1a9a61=moment(_0x5203dd)['milliseconds'](0x0);var _0x5a56ff=moment(_0x3080f0)[_0x7bb8('0x3')](0x0);return _0x1a9a61[_0x7bb8('0x4')](_0x5a56ff,'seconds');}function Hangup(_0x2e05cf,_0x3c47be){this[_0x7bb8('0x5')]=0x4;this[_0x7bb8('0x6')]=_0x7bb8('0x7');this[_0x7bb8('0x8')]=_0x2e05cf['scheduledat'];this[_0x7bb8('0x9')]=_0x2e05cf['type'];this['campaigntype']=_0x2e05cf['type']===_0x7bb8('0xa')?_0x7bb8('0xb'):_0x2e05cf[_0x7bb8('0x9')];this[_0x7bb8('0xc')]=_0x2e05cf[_0x7bb8('0xc')];this['countcongestionretry']=_0x2e05cf['countcongestionretry'];this[_0x7bb8('0xd')]=_0x2e05cf[_0x7bb8('0xd')];this[_0x7bb8('0xe')]=_0x2e05cf[_0x7bb8('0xc')]+_0x2e05cf[_0x7bb8('0xf')]+_0x2e05cf['countnoanswerretry']+_0x2e05cf[_0x7bb8('0x10')]+_0x2e05cf[_0x7bb8('0x11')]+_0x2e05cf[_0x7bb8('0x12')]+_0x2e05cf['countmachineretry']+_0x2e05cf[_0x7bb8('0x13')];this[_0x7bb8('0x10')]=_0x2e05cf[_0x7bb8('0x10')];this['countdropretry']=_0x2e05cf[_0x7bb8('0x11')];this[_0x7bb8('0x12')]=_0x2e05cf[_0x7bb8('0x12')];this[_0x7bb8('0x14')]=_0x2e05cf[_0x7bb8('0x14')];this[_0x7bb8('0x13')]=_0x2e05cf[_0x7bb8('0x13')];this[_0x7bb8('0x15')]=_0x3c47be['uniqueid'];this[_0x7bb8('0x16')]=_0x2e05cf['name'];this['calleridnum']=_0x2e05cf[_0x7bb8('0x17')];this[_0x7bb8('0x18')]=_0x2e05cf[_0x7bb8('0x18')];this[_0x7bb8('0x19')]=_0x2e05cf[_0x7bb8('0x19')];this[_0x7bb8('0x1a')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x7bb8('0x1b')]=getSeconds(_0x2e05cf[_0x7bb8('0x19')],_0x2e05cf[_0x7bb8('0x18')]);this[_0x7bb8('0x1c')]=0x0;this[_0x7bb8('0x1d')]=getSeconds(this[_0x7bb8('0x1a')],_0x2e05cf[_0x7bb8('0x19')]);this[_0x7bb8('0xb')]=_0x2e05cf[_0x7bb8('0xb')];this[_0x7bb8('0x1e')]='IVR';this[_0x7bb8('0x1f')]=_0x3c47be[_0x7bb8('0x20')];this[_0x7bb8('0x21')]=_0x2e05cf[_0x7bb8('0x21')];this['callbackuniqueid']=_0x2e05cf[_0x7bb8('0x22')];this[_0x7bb8('0x23')]=_0x2e05cf[_0x7bb8('0x23')];this[_0x7bb8('0x24')]=_0x2e05cf[_0x7bb8('0x24')];this[_0x7bb8('0x25')]=_0x2e05cf[_0x7bb8('0x25')];this[_0x7bb8('0x26')]=_0x2e05cf['ListId'];this[_0x7bb8('0x27')]=_0x2e05cf[_0x7bb8('0x27')];this['VoiceQueueId']=_0x2e05cf[_0x7bb8('0x28')];this[_0x7bb8('0x29')]=_0x2e05cf[_0x7bb8('0x29')];}module[_0x7bb8('0x2a')]=Hangup;