Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.rpc.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 _0x6eb6=['../../config/logger','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','VoiceMailMessage,\x20%s,\x20%s','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x28d843,_0x254cc){var _0x2ffd24=function(_0x404bbb){while(--_0x404bbb){_0x28d843['push'](_0x28d843['shift']());}};_0x2ffd24(++_0x254cc);}(_0x6eb6,0x67));var _0x66eb=function(_0x4edd80,_0x15084a){_0x4edd80=_0x4edd80-0x0;var _0x4ad24b=_0x6eb6[_0x4edd80];return _0x4ad24b;};'use strict';var _=require(_0x66eb('0x0'));var util=require(_0x66eb('0x1'));var moment=require(_0x66eb('0x2'));var BPromise=require(_0x66eb('0x3'));var rs=require(_0x66eb('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x66eb('0x5'))['db'];var utils=require(_0x66eb('0x6'));var logger=require(_0x66eb('0x7'))('rpc');var config=require(_0x66eb('0x8'));var jayson=require(_0x66eb('0x9'));var client=jayson[_0x66eb('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1b79e8,_0x56060f,_0x33ff67){return new BPromise(function(_0x34a5d6,_0x575375){return client[_0x66eb('0xb')](_0x1b79e8,_0x33ff67)[_0x66eb('0xc')](function(_0x4ca582){logger[_0x66eb('0xd')]('VoiceMailMessage,\x20%s,\x20%s',_0x56060f,_0x66eb('0xe'));logger[_0x66eb('0xf')](_0x66eb('0x10'),_0x56060f,_0x66eb('0xe'),JSON[_0x66eb('0x11')](_0x4ca582));if(_0x4ca582[_0x66eb('0x12')]){if(_0x4ca582[_0x66eb('0x12')][_0x66eb('0x13')]===0x1f4){logger[_0x66eb('0x12')]('VoiceMailMessage,\x20%s,\x20%s',_0x56060f,_0x4ca582[_0x66eb('0x12')][_0x66eb('0x14')]);return _0x575375(_0x4ca582[_0x66eb('0x12')][_0x66eb('0x14')]);}logger[_0x66eb('0x12')](_0x66eb('0x15'),_0x56060f,_0x4ca582[_0x66eb('0x12')][_0x66eb('0x14')]);return _0x34a5d6(_0x4ca582[_0x66eb('0x12')][_0x66eb('0x14')]);}else{logger[_0x66eb('0xd')](_0x66eb('0x15'),_0x56060f,_0x66eb('0xe'));_0x34a5d6(_0x4ca582['result']['message']);}})['catch'](function(_0x535b5b){logger[_0x66eb('0x12')](_0x66eb('0x15'),_0x56060f,_0x535b5b);_0x575375(_0x535b5b);});});}