1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x1996=['billableseconds','GetVoiceCallReports','moment','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','callerid','outbound','day','YYYY-MM-DD\x20HH:mm:ss','endOf','format','type'];(function(_0x3261ef,_0x3a5413){var _0x3b0737=function(_0x3f5633){while(--_0x3f5633){_0x3261ef['push'](_0x3261ef['shift']());}};_0x3b0737(++_0x3a5413);}(_0x1996,0x1ef));var _0x6199=function(_0x5c2fab,_0x1c684a){_0x5c2fab=_0x5c2fab-0x0;var _0x504944=_0x1996[_0x5c2fab];return _0x504944;};'use strict';var moment=require(_0x6199('0x0'));var util=require('util');var _=require(_0x6199('0x1'));var client=require(_0x6199('0x2'));exports[_0x6199('0x3')]=function(_0x569112){return client[_0x6199('0x4')](_0x6199('0x5'),{'body':_[_0x6199('0x6')](_0x569112,{'source':_0x569112[_0x6199('0x7')],'destinationcontext':_0x569112['context'],'callerid':_0x569112[_0x6199('0x8')],'amaflags':'DOCUMENTATION'}),'log':_0x6199('0x5')});};exports['getVoiceCallReports']=function(){return function(){return client['Request']('GetVoiceCallReport',{'options':{'where':{'type':[_0x6199('0x9')],'createdAt':{'$between':[moment()['startOf'](_0x6199('0xa'))['format'](_0x6199('0xb')),moment()[_0x6199('0xc')]('day')[_0x6199('0xd')](_0x6199('0xb'))]}},'attributes':[_0x6199('0xe'),'disposition','duration',_0x6199('0xf')]},'log':_0x6199('0x10')});};};