Built motion from commit 3e059bc2.|2.5.32
[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 _0x577d=['DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','format','YYYY-MM-DD\x20HH:mm:ss','day','type','duration','billableseconds','GetVoiceCallReports','moment','util','lodash','create','Request','CreateVoiceCallReport','merge','callerid'];(function(_0x276db8,_0x2eb4ae){var _0x4af957=function(_0x35c902){while(--_0x35c902){_0x276db8['push'](_0x276db8['shift']());}};_0x4af957(++_0x2eb4ae);}(_0x577d,0x1b0));var _0xd577=function(_0x27036e,_0x1f8f6e){_0x27036e=_0x27036e-0x0;var _0x17eade=_0x577d[_0x27036e];return _0x17eade;};'use strict';var moment=require(_0xd577('0x0'));var util=require(_0xd577('0x1'));var _=require(_0xd577('0x2'));var client=require('../client');exports[_0xd577('0x3')]=function(_0x385c22){return client[_0xd577('0x4')](_0xd577('0x5'),{'body':_[_0xd577('0x6')](_0x385c22,{'source':_0x385c22['calleridnum'],'destinationcontext':_0x385c22['context'],'callerid':_0x385c22[_0xd577('0x7')],'amaflags':_0xd577('0x8')}),'log':_0xd577('0x5')});};exports[_0xd577('0x9')]=function(){return function(){return client[_0xd577('0x4')](_0xd577('0xa'),{'options':{'where':{'type':[_0xd577('0xb')],'createdAt':{'$between':[moment()[_0xd577('0xc')]('day')[_0xd577('0xd')](_0xd577('0xe')),moment()['endOf'](_0xd577('0xf'))[_0xd577('0xd')](_0xd577('0xe'))]}},'attributes':[_0xd577('0x10'),'disposition',_0xd577('0x11'),_0xd577('0x12')]},'log':_0xd577('0x13')});};};