Built motion from commit (unavailable).|2.3.1
[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 _0xae6e=['outbound','startOf','day','YYYY-MM-DD\x20HH:mm:ss','endOf','format','disposition','duration','billableseconds','GetVoiceCallReports','util','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport'];(function(_0x441563,_0x1d4a28){var _0x2369ec=function(_0x1f97ba){while(--_0x1f97ba){_0x441563['push'](_0x441563['shift']());}};_0x2369ec(++_0x1d4a28);}(_0xae6e,0x191));var _0xeae6=function(_0x1c9c4b,_0x403c99){_0x1c9c4b=_0x1c9c4b-0x0;var _0x338adf=_0xae6e[_0x1c9c4b];return _0x338adf;};'use strict';var moment=require('moment');var util=require(_0xeae6('0x0'));var _=require(_0xeae6('0x1'));var client=require(_0xeae6('0x2'));exports[_0xeae6('0x3')]=function(_0x5c6c49){return client[_0xeae6('0x4')](_0xeae6('0x5'),{'body':_[_0xeae6('0x6')](_0x5c6c49,{'source':_0x5c6c49[_0xeae6('0x7')],'destinationcontext':_0x5c6c49[_0xeae6('0x8')],'callerid':_0x5c6c49[_0xeae6('0x9')],'amaflags':_0xeae6('0xa')}),'log':_0xeae6('0x5')});};exports[_0xeae6('0xb')]=function(){return function(){return client[_0xeae6('0x4')](_0xeae6('0xc'),{'options':{'where':{'type':[_0xeae6('0xd')],'createdAt':{'$between':[moment()[_0xeae6('0xe')](_0xeae6('0xf'))['format'](_0xeae6('0x10')),moment()[_0xeae6('0x11')](_0xeae6('0xf'))[_0xeae6('0x12')](_0xeae6('0x10'))]}},'attributes':['type',_0xeae6('0x13'),_0xeae6('0x14'),_0xeae6('0x15')]},'log':_0xeae6('0x16')});};};