375ab6dfec204f252141b4933bb86c418ccad7cc
[motion2.git] / server / services / ami / rpc / voiceCallReport.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 _0x0247=['duration','billableseconds','GetVoiceCallReports','moment','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type'];(function(_0x453323,_0x495f1d){var _0x108773=function(_0x1d9070){while(--_0x1d9070){_0x453323['push'](_0x453323['shift']());}};_0x108773(++_0x495f1d);}(_0x0247,0x1a1));var _0x7024=function(_0x106732,_0x43a593){_0x106732=_0x106732-0x0;var _0x60c65c=_0x0247[_0x106732];return _0x60c65c;};'use strict';var moment=require(_0x7024('0x0'));var util=require('util');var _=require(_0x7024('0x1'));var client=require(_0x7024('0x2'));exports[_0x7024('0x3')]=function(_0x4b9da6){return client[_0x7024('0x4')](_0x7024('0x5'),{'body':_[_0x7024('0x6')](_0x4b9da6,{'source':_0x4b9da6[_0x7024('0x7')],'destinationcontext':_0x4b9da6[_0x7024('0x8')],'callerid':_0x4b9da6[_0x7024('0x9')],'amaflags':_0x7024('0xa')}),'log':'CreateVoiceCallReport'});};exports[_0x7024('0xb')]=function(){return function(){return client[_0x7024('0x4')](_0x7024('0xc'),{'options':{'where':{'type':[_0x7024('0xd')],'createdAt':{'$between':[moment()[_0x7024('0xe')](_0x7024('0xf'))[_0x7024('0x10')](_0x7024('0x11')),moment()[_0x7024('0x12')](_0x7024('0xf'))[_0x7024('0x10')](_0x7024('0x11'))]}},'attributes':[_0x7024('0x13'),'disposition',_0x7024('0x14'),_0x7024('0x15')]},'log':_0x7024('0x16')});};};