Built motion from commit (unavailable).|2.5.9
[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 _0x9b9b=['maxrate','modem','gateway','faxdetect','localstationid','path','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','lodash','fax','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate'];(function(_0x5ce34a,_0x57887e){var _0x309350=function(_0x52a947){while(--_0x52a947){_0x5ce34a['push'](_0x5ce34a['shift']());}};_0x309350(++_0x57887e);}(_0x9b9b,0x114));var _0xb9b9=function(_0x32083e,_0x130a41){_0x32083e=_0x32083e-0x0;var _0x1efcc7=_0x9b9b[_0x32083e];return _0x1efcc7;};'use strict';var util=require('util');var _=require(_0xb9b9('0x0'));var moment=require('moment');var logger=require('../../../../config/logger')(_0xb9b9('0x1'));exports[_0xb9b9('0x2')]=function(_0x1adf50){return{'message':_0x1adf50};};exports[_0xb9b9('0x3')]=function(_0x1d6ab6,_0x43c8ff){logger[_0xb9b9('0x4')](_0x1d6ab6,util[_0xb9b9('0x5')](_0x43c8ff,{'showHidden':![],'depth':null}));};exports[_0xb9b9('0x6')]=function(_0x3d1a95,_0x85eec){var _0x3ef9c1={'XMF-ECM':_0x85eec[_0xb9b9('0x7')],'XMF-HEADERINFO':_0x85eec[_0xb9b9('0x8')],'XMF-MINRATE':_0x85eec[_0xb9b9('0x9')],'XMF-MAXRATE':_0x85eec[_0xb9b9('0xa')],'XMF-MODEM':util['format']('\x22%s\x22',_0x85eec[_0xb9b9('0xb')]),'XMF-GATEWAY':_0x85eec[_0xb9b9('0xc')],'XMF-FAXDETECT':_0x85eec[_0xb9b9('0xd')],'XMF-T38TIMEOUT':_0x85eec['t38timeout'],'XMF-LOCALSTATIONID':_0x85eec[_0xb9b9('0xe')],'XMF-PATH':_0x3d1a95[_0xb9b9('0xf')]};return _0x3ef9c1;};exports[_0xb9b9('0x10')]=function(_0x4d8856,_0x3430a6){return{'actionid':_0x4d8856[_0xb9b9('0x11')],'action':_0xb9b9('0x12'),'channel':_0x4d8856[_0xb9b9('0x13')],'Exten':_0xb9b9('0x14'),'Context':_0xb9b9('0x15'),'Priority':'1','callerid':util['format']('\x22%s\x22\x20<%s>',_0x4d8856[_0xb9b9('0x8')]?_0x4d8856['headerinfo']:'',_0x4d8856[_0xb9b9('0xe')]),'variable':_0x3430a6,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x4d8856['uniqueid']};};