Built motion from commit d9028345.|2.5.43
[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 _0x4927=['Answer','scheduledat','type','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','uniqueid','calleridname','name','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','lodash','milliseconds','seconds','state','statedesc'];(function(_0x34e142,_0x129489){var _0x36db86=function(_0x34ac6a){while(--_0x34ac6a){_0x34e142['push'](_0x34e142['shift']());}};_0x36db86(++_0x129489);}(_0x4927,0x121));var _0x7492=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x4927[_0x3ab51d];return _0x29a04e;};'use strict';var util=require('util');var _=require(_0x7492('0x0'));var moment=require('moment');function getSeconds(_0x3f99bf,_0x3603b1){var _0x299396=moment(_0x3f99bf)[_0x7492('0x1')](0x0);var _0x4ccd9f=moment(_0x3603b1)[_0x7492('0x1')](0x0);return _0x299396['diff'](_0x4ccd9f,_0x7492('0x2'));}function Hangup(_0x180fd5,_0x310df0){this[_0x7492('0x3')]=0x4;this[_0x7492('0x4')]=_0x7492('0x5');this[_0x7492('0x6')]=_0x180fd5[_0x7492('0x6')];this[_0x7492('0x7')]=_0x180fd5[_0x7492('0x7')];this['campaigntype']=_0x180fd5['type']==='outbound'?_0x7492('0x8'):_0x180fd5['type'];this[_0x7492('0x9')]=_0x180fd5[_0x7492('0x9')];this[_0x7492('0xa')]=_0x180fd5['countcongestionretry'];this[_0x7492('0xb')]=_0x180fd5[_0x7492('0xb')];this[_0x7492('0xc')]=_0x180fd5[_0x7492('0x9')]+_0x180fd5[_0x7492('0xa')]+_0x180fd5[_0x7492('0xb')]+_0x180fd5['countnosuchnumberretry']+_0x180fd5[_0x7492('0xd')]+_0x180fd5[_0x7492('0xe')]+_0x180fd5[_0x7492('0xf')]+_0x180fd5[_0x7492('0x10')];this[_0x7492('0x11')]=_0x180fd5[_0x7492('0x11')];this[_0x7492('0xd')]=_0x180fd5[_0x7492('0xd')];this[_0x7492('0xe')]=_0x180fd5[_0x7492('0xe')];this[_0x7492('0xf')]=_0x180fd5[_0x7492('0xf')];this[_0x7492('0x10')]=_0x180fd5[_0x7492('0x10')];this[_0x7492('0x12')]=_0x310df0['uniqueid'];this[_0x7492('0x13')]=_0x180fd5[_0x7492('0x14')];this['calleridnum']=_0x180fd5[_0x7492('0x15')];this[_0x7492('0x16')]=_0x180fd5[_0x7492('0x16')];this['responsetime']=_0x180fd5[_0x7492('0x17')];this[_0x7492('0x18')]=moment()[_0x7492('0x19')](_0x7492('0x1a'));this[_0x7492('0x1b')]=getSeconds(_0x180fd5[_0x7492('0x17')],_0x180fd5[_0x7492('0x16')]);this[_0x7492('0x1c')]=0x0;this[_0x7492('0x1d')]=getSeconds(this[_0x7492('0x18')],_0x180fd5[_0x7492('0x17')]);this[_0x7492('0x8')]=_0x180fd5[_0x7492('0x8')];this[_0x7492('0x1e')]=_0x7492('0x1f');this[_0x7492('0x20')]=_0x310df0[_0x7492('0x21')];this['callback']=_0x180fd5[_0x7492('0x22')];this[_0x7492('0x23')]=_0x180fd5[_0x7492('0x23')];this[_0x7492('0x24')]=_0x180fd5[_0x7492('0x24')];this[_0x7492('0x25')]=_0x180fd5[_0x7492('0x25')];this[_0x7492('0x26')]=_0x180fd5[_0x7492('0x26')];this['ListId']=_0x180fd5[_0x7492('0x27')];this[_0x7492('0x28')]=_0x180fd5[_0x7492('0x28')];this['VoiceQueueId']=_0x180fd5[_0x7492('0x29')];this['CampaignId']=_0x180fd5['CampaignId'];}module['exports']=Hangup;