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