Built motion from commit d1eab355.|2.6.28
[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 _0xb25c=['callerid','GetVoiceCallReport','outbound','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','day','billableseconds','GetVoiceCallReports','moment','util','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum'];(function(_0x2d1402,_0x249b4f){var _0x9927b2=function(_0x3a94df){while(--_0x3a94df){_0x2d1402['push'](_0x2d1402['shift']());}};_0x9927b2(++_0x249b4f);}(_0xb25c,0xc8));var _0xcb25=function(_0x546766,_0x76435f){_0x546766=_0x546766-0x0;var _0x3ddc85=_0xb25c[_0x546766];return _0x3ddc85;};'use strict';var moment=require(_0xcb25('0x0'));var util=require(_0xcb25('0x1'));var _=require(_0xcb25('0x2'));var client=require(_0xcb25('0x3'));exports[_0xcb25('0x4')]=function(_0x1db130){return client[_0xcb25('0x5')](_0xcb25('0x6'),{'body':_[_0xcb25('0x7')](_0x1db130,{'source':_0x1db130[_0xcb25('0x8')],'destinationcontext':_0x1db130['context'],'callerid':_0x1db130[_0xcb25('0x9')],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports['getVoiceCallReports']=function(){return function(){return client[_0xcb25('0x5')](_0xcb25('0xa'),{'options':{'where':{'type':[_0xcb25('0xb')],'createdAt':{'$between':[moment()[_0xcb25('0xc')]('day')[_0xcb25('0xd')](_0xcb25('0xe')),moment()[_0xcb25('0xf')](_0xcb25('0x10'))[_0xcb25('0xd')](_0xcb25('0xe'))]}},'attributes':['type','disposition','duration',_0xcb25('0x11')]},'log':_0xcb25('0x12')});};};