Built motion from commit eddce310.|2.6.12
[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 _0xcae5=['billableseconds','GetVoiceCallReports','moment','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type'];(function(_0x5a3788,_0x152638){var _0x346b8b=function(_0x5dc4cf){while(--_0x5dc4cf){_0x5a3788['push'](_0x5a3788['shift']());}};_0x346b8b(++_0x152638);}(_0xcae5,0x14c));var _0x5cae=function(_0x13f068,_0x3c080f){_0x13f068=_0x13f068-0x0;var _0x343a81=_0xcae5[_0x13f068];return _0x343a81;};'use strict';var moment=require(_0x5cae('0x0'));var util=require('util');var _=require(_0x5cae('0x1'));var client=require(_0x5cae('0x2'));exports[_0x5cae('0x3')]=function(_0x42a971){return client[_0x5cae('0x4')](_0x5cae('0x5'),{'body':_[_0x5cae('0x6')](_0x42a971,{'source':_0x42a971[_0x5cae('0x7')],'destinationcontext':_0x42a971[_0x5cae('0x8')],'callerid':_0x42a971[_0x5cae('0x9')],'amaflags':_0x5cae('0xa')}),'log':_0x5cae('0x5')});};exports[_0x5cae('0xb')]=function(){return function(){return client['Request'](_0x5cae('0xc'),{'options':{'where':{'type':[_0x5cae('0xd')],'createdAt':{'$between':[moment()[_0x5cae('0xe')](_0x5cae('0xf'))[_0x5cae('0x10')](_0x5cae('0x11')),moment()[_0x5cae('0x12')](_0x5cae('0xf'))[_0x5cae('0x10')](_0x5cae('0x11'))]}},'attributes':[_0x5cae('0x13'),'disposition','duration',_0x5cae('0x14')]},'log':_0x5cae('0x15')});};};