Built motion from commit b5413ace.|2.6.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 _0xfa72=['moment','../../../../config/logger','fax','message','logger','inspect','addVariables','ecm','headerinfo','maxrate','format','modem','gateway','faxdetect','t38timeout','localstationid','variablesAction','uniqueid','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util','lodash'];(function(_0x57d6d8,_0x171f5d){var _0x9f3550=function(_0x36bd19){while(--_0x36bd19){_0x57d6d8['push'](_0x57d6d8['shift']());}};_0x9f3550(++_0x171f5d);}(_0xfa72,0xee));var _0x2fa7=function(_0x491f7c,_0x1c397f){_0x491f7c=_0x491f7c-0x0;var _0x532c3a=_0xfa72[_0x491f7c];return _0x532c3a;};'use strict';var util=require(_0x2fa7('0x0'));var _=require(_0x2fa7('0x1'));var moment=require(_0x2fa7('0x2'));var logger=require(_0x2fa7('0x3'))(_0x2fa7('0x4'));exports[_0x2fa7('0x5')]=function(_0x3a21d0){return{'message':_0x3a21d0};};exports[_0x2fa7('0x6')]=function(_0x5aa779,_0x372904){logger['info'](_0x5aa779,util[_0x2fa7('0x7')](_0x372904,{'showHidden':![],'depth':null}));};exports[_0x2fa7('0x8')]=function(_0x55bfb1,_0x1ecaca){var _0x783491={'XMF-ECM':_0x1ecaca[_0x2fa7('0x9')],'XMF-HEADERINFO':_0x1ecaca[_0x2fa7('0xa')],'XMF-MINRATE':_0x1ecaca['minrate'],'XMF-MAXRATE':_0x1ecaca[_0x2fa7('0xb')],'XMF-MODEM':util[_0x2fa7('0xc')]('\x22%s\x22',_0x1ecaca[_0x2fa7('0xd')]),'XMF-GATEWAY':_0x1ecaca[_0x2fa7('0xe')],'XMF-FAXDETECT':_0x1ecaca[_0x2fa7('0xf')],'XMF-T38TIMEOUT':_0x1ecaca[_0x2fa7('0x10')],'XMF-LOCALSTATIONID':_0x1ecaca[_0x2fa7('0x11')],'XMF-PATH':_0x55bfb1['path']};return _0x783491;};exports[_0x2fa7('0x12')]=function(_0xd0b55b,_0x35002f){return{'actionid':_0xd0b55b[_0x2fa7('0x13')],'action':'originate','channel':_0xd0b55b[_0x2fa7('0x14')],'Exten':_0x2fa7('0x15'),'Context':_0x2fa7('0x16'),'Priority':'1','callerid':util[_0x2fa7('0xc')](_0x2fa7('0x17'),_0xd0b55b[_0x2fa7('0xa')]?_0xd0b55b[_0x2fa7('0xa')]:'',_0xd0b55b[_0x2fa7('0x11')]),'variable':_0x35002f,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0xd0b55b[_0x2fa7('0x13')]};};