311e3125f18670a744b54da282257626403975ae
[motion-next.git] / server / services / ami / rpc / voiceCallReport.js
1 const a1124_0xc534=['endOf','lodash','billableseconds','moment','context','outbound','merge','create','CreateVoiceCallReport','callerid','day','Request','startOf','format','YYYY-MM-DD\x20HH:mm:ss','type','disposition','GetVoiceCallReports','getVoiceCallReports'];(function(_0x3feb3f,_0xc534cd){const _0x41e5d0=function(_0x1825a2){while(--_0x1825a2){_0x3feb3f['push'](_0x3feb3f['shift']());}};_0x41e5d0(++_0xc534cd);}(a1124_0xc534,0x195));const a1124_0x41e5=function(_0x3feb3f,_0xc534cd){_0x3feb3f=_0x3feb3f-0x0;let _0x41e5d0=a1124_0xc534[_0x3feb3f];return _0x41e5d0;};const _0x50bd5e=a1124_0x41e5;'use strict';const moment=require(_0x50bd5e('0x10')),_=require(_0x50bd5e('0xe')),client=require('../client');exports[_0x50bd5e('0x1')]=function(_0x1825a2){const _0x146921=_0x50bd5e;return client[_0x146921('0x5')]('CreateVoiceCallReport',{'body':_[_0x146921('0x0')](_0x1825a2,{'source':_0x1825a2['calleridnum'],'destinationcontext':_0x1825a2[_0x146921('0x11')],'callerid':_0x1825a2[_0x146921('0x3')],'amaflags':'DOCUMENTATION'}),'log':_0x146921('0x2')});},exports[_0x50bd5e('0xc')]=function(){return function(){const _0x5a454d=a1124_0x41e5;return client[_0x5a454d('0x5')]('GetVoiceCallReport',{'options':{'where':{'type':[_0x5a454d('0x12')],'createdAt':{'$between':[moment()[_0x5a454d('0x6')]('day')[_0x5a454d('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x5a454d('0xd')](_0x5a454d('0x4'))['format'](_0x5a454d('0x8'))]}},'attributes':[_0x5a454d('0x9'),_0x5a454d('0xa'),'duration',_0x5a454d('0xf')]},'log':_0x5a454d('0xb')});};};