Built motion from commit ddca4d0d.|2.5.47
[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 _0xb051=['callerid','CreateVoiceCallReport','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','YYYY-MM-DD\x20HH:mm:ss','endOf','format','type','disposition','duration','billableseconds','GetVoiceCallReports','util','lodash','../client','create','Request','merge','calleridnum','context'];(function(_0x9150c1,_0x187718){var _0x6b1f39=function(_0x4de3ba){while(--_0x4de3ba){_0x9150c1['push'](_0x9150c1['shift']());}};_0x6b1f39(++_0x187718);}(_0xb051,0x151));var _0x1b05=function(_0x10b317,_0x2adf32){_0x10b317=_0x10b317-0x0;var _0x1e3054=_0xb051[_0x10b317];return _0x1e3054;};'use strict';var moment=require('moment');var util=require(_0x1b05('0x0'));var _=require(_0x1b05('0x1'));var client=require(_0x1b05('0x2'));exports[_0x1b05('0x3')]=function(_0x9ad9c3){return client[_0x1b05('0x4')]('CreateVoiceCallReport',{'body':_[_0x1b05('0x5')](_0x9ad9c3,{'source':_0x9ad9c3[_0x1b05('0x6')],'destinationcontext':_0x9ad9c3[_0x1b05('0x7')],'callerid':_0x9ad9c3[_0x1b05('0x8')],'amaflags':'DOCUMENTATION'}),'log':_0x1b05('0x9')});};exports[_0x1b05('0xa')]=function(){return function(){return client[_0x1b05('0x4')](_0x1b05('0xb'),{'options':{'where':{'type':[_0x1b05('0xc')],'createdAt':{'$between':[moment()[_0x1b05('0xd')](_0x1b05('0xe'))['format'](_0x1b05('0xf')),moment()[_0x1b05('0x10')]('day')[_0x1b05('0x11')](_0x1b05('0xf'))]}},'attributes':[_0x1b05('0x12'),_0x1b05('0x13'),_0x1b05('0x14'),_0x1b05('0x15')]},'log':_0x1b05('0x16')});};};