6fafb43713d3d367ac3257bf5c5986875374ee2b
[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 _0x866e=['moment','util','lodash','../client','create','Request','CreateVoiceCallReport','merge','context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports'];(function(_0xbcb6,_0x8e00a9){var _0x58899b=function(_0x35e0c4){while(--_0x35e0c4){_0xbcb6['push'](_0xbcb6['shift']());}};_0x58899b(++_0x8e00a9);}(_0x866e,0xa8));var _0xe866=function(_0x277e7d,_0x54b29c){_0x277e7d=_0x277e7d-0x0;var _0x33568d=_0x866e[_0x277e7d];return _0x33568d;};'use strict';var moment=require(_0xe866('0x0'));var util=require(_0xe866('0x1'));var _=require(_0xe866('0x2'));var client=require(_0xe866('0x3'));exports[_0xe866('0x4')]=function(_0x5d8e1a){return client[_0xe866('0x5')](_0xe866('0x6'),{'body':_[_0xe866('0x7')](_0x5d8e1a,{'source':_0x5d8e1a['calleridnum'],'destinationcontext':_0x5d8e1a[_0xe866('0x8')],'callerid':_0x5d8e1a[_0xe866('0x9')],'amaflags':_0xe866('0xa')}),'log':_0xe866('0x6')});};exports[_0xe866('0xb')]=function(){return function(){return client['Request'](_0xe866('0xc'),{'options':{'where':{'type':[_0xe866('0xd')],'createdAt':{'$between':[moment()[_0xe866('0xe')](_0xe866('0xf'))[_0xe866('0x10')](_0xe866('0x11')),moment()[_0xe866('0x12')]('day')[_0xe866('0x10')]('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':[_0xe866('0x13'),_0xe866('0x14'),_0xe866('0x15'),_0xe866('0x16')]},'log':_0xe866('0x17')});};};