Built motion from commit b5a10faa.|2.6.13
[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 _0xdbad=['t38timeout','localstationid','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util','lodash','../../../../config/logger','message','logger','info','addVariables','headerinfo','minrate','format','modem','faxdetect'];(function(_0x2fdf82,_0x322e7c){var _0x2382f5=function(_0x4d6951){while(--_0x4d6951){_0x2fdf82['push'](_0x2fdf82['shift']());}};_0x2382f5(++_0x322e7c);}(_0xdbad,0x87));var _0xddba=function(_0x2fd91a,_0x57bbca){_0x2fd91a=_0x2fd91a-0x0;var _0x2c81c0=_0xdbad[_0x2fd91a];return _0x2c81c0;};'use strict';var util=require(_0xddba('0x0'));var _=require(_0xddba('0x1'));var moment=require('moment');var logger=require(_0xddba('0x2'))('fax');exports[_0xddba('0x3')]=function(_0x34016e){return{'message':_0x34016e};};exports[_0xddba('0x4')]=function(_0x232c81,_0x3f090b){logger[_0xddba('0x5')](_0x232c81,util['inspect'](_0x3f090b,{'showHidden':![],'depth':null}));};exports[_0xddba('0x6')]=function(_0x540feb,_0x568093){var _0x152216={'XMF-ECM':_0x568093['ecm'],'XMF-HEADERINFO':_0x568093[_0xddba('0x7')],'XMF-MINRATE':_0x568093[_0xddba('0x8')],'XMF-MAXRATE':_0x568093['maxrate'],'XMF-MODEM':util[_0xddba('0x9')]('\x22%s\x22',_0x568093[_0xddba('0xa')]),'XMF-GATEWAY':_0x568093['gateway'],'XMF-FAXDETECT':_0x568093[_0xddba('0xb')],'XMF-T38TIMEOUT':_0x568093[_0xddba('0xc')],'XMF-LOCALSTATIONID':_0x568093[_0xddba('0xd')],'XMF-PATH':_0x540feb['path']};return _0x152216;};exports[_0xddba('0xe')]=function(_0x24cbbf,_0x216a11){return{'actionid':_0x24cbbf[_0xddba('0xf')],'action':_0xddba('0x10'),'channel':_0x24cbbf[_0xddba('0x11')],'Exten':_0xddba('0x12'),'Context':_0xddba('0x13'),'Priority':'1','callerid':util[_0xddba('0x9')](_0xddba('0x14'),_0x24cbbf['headerinfo']?_0x24cbbf['headerinfo']:'',_0x24cbbf[_0xddba('0xd')]),'variable':_0x216a11,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x24cbbf[_0xddba('0xf')]};};