Built motion from commit 6f14c8ba.|2.6.29
[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 _0x5f96=['context','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','day','endOf','type','disposition','billableseconds','moment','lodash','../client','create','Request','CreateVoiceCallReport','merge'];(function(_0x8bc41d,_0x222006){var _0x4a145c=function(_0x29dae0){while(--_0x29dae0){_0x8bc41d['push'](_0x8bc41d['shift']());}};_0x4a145c(++_0x222006);}(_0x5f96,0x16f));var _0x65f9=function(_0x2dadb9,_0x42cfe6){_0x2dadb9=_0x2dadb9-0x0;var _0x2f0097=_0x5f96[_0x2dadb9];return _0x2f0097;};'use strict';var moment=require(_0x65f9('0x0'));var util=require('util');var _=require(_0x65f9('0x1'));var client=require(_0x65f9('0x2'));exports[_0x65f9('0x3')]=function(_0x18151f){return client[_0x65f9('0x4')](_0x65f9('0x5'),{'body':_[_0x65f9('0x6')](_0x18151f,{'source':_0x18151f['calleridnum'],'destinationcontext':_0x18151f[_0x65f9('0x7')],'callerid':_0x18151f[_0x65f9('0x8')],'amaflags':_0x65f9('0x9')}),'log':_0x65f9('0x5')});};exports[_0x65f9('0xa')]=function(){return function(){return client['Request'](_0x65f9('0xb'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()['startOf'](_0x65f9('0xc'))['format']('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x65f9('0xd')](_0x65f9('0xc'))['format']('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':[_0x65f9('0xe'),_0x65f9('0xf'),'duration',_0x65f9('0x10')]},'log':'GetVoiceCallReports'});};};