Built motion from commit 449495f6.|2.6.27
[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 _0x0870=['format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','localstationid','path','originate','xcally-motion-fax','\x22%s\x22\x20<%s>','uniqueid','lodash','moment','../../../../config/logger','fax','message','logger','info','inspect','addVariables','headerinfo','minrate','maxrate'];(function(_0x2a6b4f,_0x444c99){var _0x3da28d=function(_0x27f27c){while(--_0x27f27c){_0x2a6b4f['push'](_0x2a6b4f['shift']());}};_0x3da28d(++_0x444c99);}(_0x0870,0x9c));var _0x0087=function(_0x409df0,_0x5378e8){_0x409df0=_0x409df0-0x0;var _0x33d53e=_0x0870[_0x409df0];return _0x33d53e;};'use strict';var util=require('util');var _=require(_0x0087('0x0'));var moment=require(_0x0087('0x1'));var logger=require(_0x0087('0x2'))(_0x0087('0x3'));exports[_0x0087('0x4')]=function(_0x194052){return{'message':_0x194052};};exports[_0x0087('0x5')]=function(_0x210175,_0x36a534){logger[_0x0087('0x6')](_0x210175,util[_0x0087('0x7')](_0x36a534,{'showHidden':![],'depth':null}));};exports[_0x0087('0x8')]=function(_0x41eebd,_0x3ac6c6){var _0xc944dc={'XMF-ECM':_0x3ac6c6['ecm'],'XMF-HEADERINFO':_0x3ac6c6[_0x0087('0x9')],'XMF-MINRATE':_0x3ac6c6[_0x0087('0xa')],'XMF-MAXRATE':_0x3ac6c6[_0x0087('0xb')],'XMF-MODEM':util[_0x0087('0xc')](_0x0087('0xd'),_0x3ac6c6[_0x0087('0xe')]),'XMF-GATEWAY':_0x3ac6c6[_0x0087('0xf')],'XMF-FAXDETECT':_0x3ac6c6[_0x0087('0x10')],'XMF-T38TIMEOUT':_0x3ac6c6[_0x0087('0x11')],'XMF-LOCALSTATIONID':_0x3ac6c6[_0x0087('0x12')],'XMF-PATH':_0x41eebd[_0x0087('0x13')]};return _0xc944dc;};exports['variablesAction']=function(_0x26c344,_0x1697f2){return{'actionid':_0x26c344['uniqueid'],'action':_0x0087('0x14'),'channel':_0x26c344['channel'],'Exten':_0x0087('0x15'),'Context':'from-sip','Priority':'1','callerid':util[_0x0087('0xc')](_0x0087('0x16'),_0x26c344['headerinfo']?_0x26c344['headerinfo']:'',_0x26c344[_0x0087('0x12')]),'variable':_0x1697f2,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x26c344[_0x0087('0x17')]};};