Built motion from commit 85328c08.|2.5.50
[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 _0x2869=['lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','duration','billableseconds','GetVoiceCallReports'];(function(_0x138814,_0x1b792e){var _0x43dba0=function(_0x5214ac){while(--_0x5214ac){_0x138814['push'](_0x138814['shift']());}};_0x43dba0(++_0x1b792e);}(_0x2869,0x143));var _0x9286=function(_0x228dd4,_0x3fef92){_0x228dd4=_0x228dd4-0x0;var _0x37927d=_0x2869[_0x228dd4];return _0x37927d;};'use strict';var moment=require('moment');var util=require('util');var _=require(_0x9286('0x0'));var client=require(_0x9286('0x1'));exports[_0x9286('0x2')]=function(_0x21b194){return client[_0x9286('0x3')](_0x9286('0x4'),{'body':_[_0x9286('0x5')](_0x21b194,{'source':_0x21b194[_0x9286('0x6')],'destinationcontext':_0x21b194[_0x9286('0x7')],'callerid':_0x21b194['callerid'],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports[_0x9286('0x8')]=function(){return function(){return client[_0x9286('0x3')](_0x9286('0x9'),{'options':{'where':{'type':[_0x9286('0xa')],'createdAt':{'$between':[moment()[_0x9286('0xb')](_0x9286('0xc'))[_0x9286('0xd')](_0x9286('0xe')),moment()[_0x9286('0xf')](_0x9286('0xc'))[_0x9286('0xd')](_0x9286('0xe'))]}},'attributes':['type','disposition',_0x9286('0x10'),_0x9286('0x11')]},'log':_0x9286('0x12')});};};