Built motion from commit (unavailable).|2.5.6
[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 _0x55d9=['getVoiceCallReports','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','disposition','duration','billableseconds','GetVoiceCallReports','util','lodash','../client','create','Request','CreateVoiceCallReport','calleridnum','context','callerid','DOCUMENTATION'];(function(_0x4d1ee9,_0x394a78){var _0x9a5456=function(_0x224f3b){while(--_0x224f3b){_0x4d1ee9['push'](_0x4d1ee9['shift']());}};_0x9a5456(++_0x394a78);}(_0x55d9,0x185));var _0x955d=function(_0x5b2a15,_0xd200ec){_0x5b2a15=_0x5b2a15-0x0;var _0x33038d=_0x55d9[_0x5b2a15];return _0x33038d;};'use strict';var moment=require('moment');var util=require(_0x955d('0x0'));var _=require(_0x955d('0x1'));var client=require(_0x955d('0x2'));exports[_0x955d('0x3')]=function(_0x544d81){return client[_0x955d('0x4')](_0x955d('0x5'),{'body':_['merge'](_0x544d81,{'source':_0x544d81[_0x955d('0x6')],'destinationcontext':_0x544d81[_0x955d('0x7')],'callerid':_0x544d81[_0x955d('0x8')],'amaflags':_0x955d('0x9')}),'log':_0x955d('0x5')});};exports[_0x955d('0xa')]=function(){return function(){return client[_0x955d('0x4')]('GetVoiceCallReport',{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0x955d('0xb')](_0x955d('0xc'))[_0x955d('0xd')](_0x955d('0xe')),moment()['endOf']('day')[_0x955d('0xd')](_0x955d('0xe'))]}},'attributes':['type',_0x955d('0xf'),_0x955d('0x10'),_0x955d('0x11')]},'log':_0x955d('0x12')});};};