Built motion from commit f74363e9.|2.6.34
[motion2.git] / server / services / ami / fax / util / util.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 _0xb7e1=['logger','info','inspect','headerinfo','minrate','format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','localstationid','path','variablesAction','originate','channel','xcally-motion-fax','from-sip','util','moment','fax','message'];(function(_0x16f19d,_0x52ed6a){var _0x2023cd=function(_0xc27457){while(--_0xc27457){_0x16f19d['push'](_0x16f19d['shift']());}};_0x2023cd(++_0x52ed6a);}(_0xb7e1,0x96));var _0x1b7e=function(_0x41491f,_0x451ffe){_0x41491f=_0x41491f-0x0;var _0x37746c=_0xb7e1[_0x41491f];return _0x37746c;};'use strict';var util=require(_0x1b7e('0x0'));var _=require('lodash');var moment=require(_0x1b7e('0x1'));var logger=require('../../../../config/logger')(_0x1b7e('0x2'));exports[_0x1b7e('0x3')]=function(_0x374743){return{'message':_0x374743};};exports[_0x1b7e('0x4')]=function(_0x40701f,_0x4440c8){logger[_0x1b7e('0x5')](_0x40701f,util[_0x1b7e('0x6')](_0x4440c8,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x517969,_0x53f703){var _0x43bb21={'XMF-ECM':_0x53f703['ecm'],'XMF-HEADERINFO':_0x53f703[_0x1b7e('0x7')],'XMF-MINRATE':_0x53f703[_0x1b7e('0x8')],'XMF-MAXRATE':_0x53f703['maxrate'],'XMF-MODEM':util[_0x1b7e('0x9')](_0x1b7e('0xa'),_0x53f703[_0x1b7e('0xb')]),'XMF-GATEWAY':_0x53f703[_0x1b7e('0xc')],'XMF-FAXDETECT':_0x53f703[_0x1b7e('0xd')],'XMF-T38TIMEOUT':_0x53f703[_0x1b7e('0xe')],'XMF-LOCALSTATIONID':_0x53f703[_0x1b7e('0xf')],'XMF-PATH':_0x517969[_0x1b7e('0x10')]};return _0x43bb21;};exports[_0x1b7e('0x11')]=function(_0x118429,_0x592ca5){return{'actionid':_0x118429['uniqueid'],'action':_0x1b7e('0x12'),'channel':_0x118429[_0x1b7e('0x13')],'Exten':_0x1b7e('0x14'),'Context':_0x1b7e('0x15'),'Priority':'1','callerid':util[_0x1b7e('0x9')]('\x22%s\x22\x20<%s>',_0x118429[_0x1b7e('0x7')]?_0x118429[_0x1b7e('0x7')]:'',_0x118429['localstationid']),'variable':_0x592ca5,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x118429['uniqueid']};};