Built motion from commit (unavailable).|2.3.92
[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 _0x2f19=['lodash','../client','create','CreateVoiceCallReport','merge','callerid','DOCUMENTATION','getVoiceCallReports','Request','GetVoiceCallReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','day','disposition','duration','billableseconds','GetVoiceCallReports','moment','util'];(function(_0x1b2af3,_0x3a1e61){var _0x131fa0=function(_0x481dae){while(--_0x481dae){_0x1b2af3['push'](_0x1b2af3['shift']());}};_0x131fa0(++_0x3a1e61);}(_0x2f19,0xee));var _0x92f1=function(_0x229d7e,_0x5bc489){_0x229d7e=_0x229d7e-0x0;var _0xa78280=_0x2f19[_0x229d7e];return _0xa78280;};'use strict';var moment=require(_0x92f1('0x0'));var util=require(_0x92f1('0x1'));var _=require(_0x92f1('0x2'));var client=require(_0x92f1('0x3'));exports[_0x92f1('0x4')]=function(_0x2dced4){return client['Request'](_0x92f1('0x5'),{'body':_[_0x92f1('0x6')](_0x2dced4,{'source':_0x2dced4['calleridnum'],'destinationcontext':_0x2dced4['context'],'callerid':_0x2dced4[_0x92f1('0x7')],'amaflags':_0x92f1('0x8')}),'log':_0x92f1('0x5')});};exports[_0x92f1('0x9')]=function(){return function(){return client[_0x92f1('0xa')](_0x92f1('0xb'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0x92f1('0xc')]('day')[_0x92f1('0xd')](_0x92f1('0xe')),moment()['endOf'](_0x92f1('0xf'))[_0x92f1('0xd')](_0x92f1('0xe'))]}},'attributes':['type',_0x92f1('0x10'),_0x92f1('0x11'),_0x92f1('0x12')]},'log':_0x92f1('0x13')});};};