b3bdf05ff11470f9382e605af42c40257520eb83
[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 _0x0d41=['format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','seconds','state','statedesc','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','endtime'];(function(_0xd0a38,_0x2ee8b0){var _0x15bc90=function(_0x5dc3aa){while(--_0x5dc3aa){_0xd0a38['push'](_0xd0a38['shift']());}};_0x15bc90(++_0x2ee8b0);}(_0x0d41,0x1af));var _0x10d4=function(_0x340272,_0x44810f){_0x340272=_0x340272-0x0;var _0x351619=_0x0d41[_0x340272];return _0x351619;};'use strict';var util=require(_0x10d4('0x0'));var _=require(_0x10d4('0x1'));var moment=require(_0x10d4('0x2'));function getSeconds(_0x4e5b9d,_0x53ce59){var _0x5d906a=moment(_0x4e5b9d)[_0x10d4('0x3')](0x0);var _0x52b625=moment(_0x53ce59)[_0x10d4('0x3')](0x0);return _0x5d906a[_0x10d4('0x4')](_0x52b625,_0x10d4('0x5'));}function Hangup(_0x3f6b06,_0x90e8d4){this[_0x10d4('0x6')]=0x4;this[_0x10d4('0x7')]='Answer';this[_0x10d4('0x8')]=_0x3f6b06[_0x10d4('0x8')];this[_0x10d4('0x9')]=_0x3f6b06[_0x10d4('0x9')];this['campaigntype']=_0x3f6b06[_0x10d4('0x9')]===_0x10d4('0xa')?_0x10d4('0xb'):_0x3f6b06[_0x10d4('0x9')];this[_0x10d4('0xc')]=_0x3f6b06[_0x10d4('0xc')];this[_0x10d4('0xd')]=_0x3f6b06[_0x10d4('0xd')];this[_0x10d4('0xe')]=_0x3f6b06[_0x10d4('0xe')];this[_0x10d4('0xf')]=_0x3f6b06[_0x10d4('0xc')]+_0x3f6b06[_0x10d4('0xd')]+_0x3f6b06[_0x10d4('0xe')]+_0x3f6b06[_0x10d4('0x10')]+_0x3f6b06[_0x10d4('0x11')]+_0x3f6b06[_0x10d4('0x12')]+_0x3f6b06[_0x10d4('0x13')]+_0x3f6b06[_0x10d4('0x14')];this[_0x10d4('0x10')]=_0x3f6b06[_0x10d4('0x10')];this[_0x10d4('0x11')]=_0x3f6b06[_0x10d4('0x11')];this[_0x10d4('0x12')]=_0x3f6b06[_0x10d4('0x12')];this['countmachineretry']=_0x3f6b06[_0x10d4('0x13')];this['countagentrejectretry']=_0x3f6b06[_0x10d4('0x14')];this[_0x10d4('0x15')]=_0x90e8d4[_0x10d4('0x15')];this[_0x10d4('0x16')]=_0x3f6b06[_0x10d4('0x17')];this[_0x10d4('0x18')]=_0x3f6b06[_0x10d4('0x19')];this[_0x10d4('0x1a')]=_0x3f6b06[_0x10d4('0x1a')];this[_0x10d4('0x1b')]=_0x3f6b06[_0x10d4('0x1b')];this[_0x10d4('0x1c')]=moment()[_0x10d4('0x1d')](_0x10d4('0x1e'));this[_0x10d4('0x1f')]=getSeconds(_0x3f6b06[_0x10d4('0x1b')],_0x3f6b06[_0x10d4('0x1a')]);this[_0x10d4('0x20')]=0x0;this[_0x10d4('0x21')]=getSeconds(this[_0x10d4('0x1c')],_0x3f6b06[_0x10d4('0x1b')]);this[_0x10d4('0xb')]=_0x3f6b06[_0x10d4('0xb')];this['membername']=_0x10d4('0x22');this[_0x10d4('0x23')]=_0x90e8d4[_0x10d4('0x24')];this[_0x10d4('0x25')]=_0x3f6b06[_0x10d4('0x25')];this[_0x10d4('0x26')]=_0x3f6b06[_0x10d4('0x26')];this[_0x10d4('0x27')]=_0x3f6b06['callbackat'];this[_0x10d4('0x28')]=_0x3f6b06[_0x10d4('0x28')];this['ContactId']=_0x3f6b06[_0x10d4('0x29')];this['ListId']=_0x3f6b06['ListId'];this[_0x10d4('0x2a')]=_0x3f6b06['UserId'];this[_0x10d4('0x2b')]=_0x3f6b06[_0x10d4('0x2b')];this[_0x10d4('0x2c')]=_0x3f6b06[_0x10d4('0x2c')];}module[_0x10d4('0x2d')]=Hangup;