Built motion from commit bab6f49e.|2.6.17
[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 _0x74ae=['gateway','faxdetect','localstationid','variablesAction','uniqueid','originate','xcally-motion-fax','format','util','lodash','moment','../../../../config/logger','info','inspect','addVariables','ecm','headerinfo','maxrate','\x22%s\x22'];(function(_0x176dc3,_0x3581bf){var _0xbbf1b9=function(_0x1d545f){while(--_0x1d545f){_0x176dc3['push'](_0x176dc3['shift']());}};_0xbbf1b9(++_0x3581bf);}(_0x74ae,0xec));var _0xe74a=function(_0x27841e,_0x45435f){_0x27841e=_0x27841e-0x0;var _0x30d008=_0x74ae[_0x27841e];return _0x30d008;};'use strict';var util=require(_0xe74a('0x0'));var _=require(_0xe74a('0x1'));var moment=require(_0xe74a('0x2'));var logger=require(_0xe74a('0x3'))('fax');exports['message']=function(_0x4abb9b){return{'message':_0x4abb9b};};exports['logger']=function(_0x4d6172,_0x1edba0){logger[_0xe74a('0x4')](_0x4d6172,util[_0xe74a('0x5')](_0x1edba0,{'showHidden':![],'depth':null}));};exports[_0xe74a('0x6')]=function(_0x3da3e0,_0x1a7736){var _0x4529e6={'XMF-ECM':_0x1a7736[_0xe74a('0x7')],'XMF-HEADERINFO':_0x1a7736[_0xe74a('0x8')],'XMF-MINRATE':_0x1a7736['minrate'],'XMF-MAXRATE':_0x1a7736[_0xe74a('0x9')],'XMF-MODEM':util['format'](_0xe74a('0xa'),_0x1a7736['modem']),'XMF-GATEWAY':_0x1a7736[_0xe74a('0xb')],'XMF-FAXDETECT':_0x1a7736[_0xe74a('0xc')],'XMF-T38TIMEOUT':_0x1a7736['t38timeout'],'XMF-LOCALSTATIONID':_0x1a7736[_0xe74a('0xd')],'XMF-PATH':_0x3da3e0['path']};return _0x4529e6;};exports[_0xe74a('0xe')]=function(_0x306dc5,_0x28f5c9){return{'actionid':_0x306dc5[_0xe74a('0xf')],'action':_0xe74a('0x10'),'channel':_0x306dc5['channel'],'Exten':_0xe74a('0x11'),'Context':'from-sip','Priority':'1','callerid':util[_0xe74a('0x12')]('\x22%s\x22\x20<%s>',_0x306dc5[_0xe74a('0x8')]?_0x306dc5[_0xe74a('0x8')]:'',_0x306dc5[_0xe74a('0xd')]),'variable':_0x28f5c9,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x306dc5[_0xe74a('0xf')]};};