a10eaee7f97b45ea8d1aff9a452340f1da9dbfc3
[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 _0xfb60=['gateway','faxdetect','t38timeout','localstationid','path','uniqueid','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','headerinfo','moment','../../../../config/logger','fax','message','logger','info','inspect','addVariables','ecm','minrate','maxrate','format','\x22%s\x22','modem'];(function(_0x62a9d5,_0x237642){var _0x1bf638=function(_0x30dc00){while(--_0x30dc00){_0x62a9d5['push'](_0x62a9d5['shift']());}};_0x1bf638(++_0x237642);}(_0xfb60,0x1ac));var _0x0fb6=function(_0x22205c,_0x473493){_0x22205c=_0x22205c-0x0;var _0x3f5efe=_0xfb60[_0x22205c];return _0x3f5efe;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0x0fb6('0x0'));var logger=require(_0x0fb6('0x1'))(_0x0fb6('0x2'));exports[_0x0fb6('0x3')]=function(_0x169e6c){return{'message':_0x169e6c};};exports[_0x0fb6('0x4')]=function(_0x4d376c,_0x5cc58d){logger[_0x0fb6('0x5')](_0x4d376c,util[_0x0fb6('0x6')](_0x5cc58d,{'showHidden':![],'depth':null}));};exports[_0x0fb6('0x7')]=function(_0x3fa562,_0x4457dd){var _0x256fd9={'XMF-ECM':_0x4457dd[_0x0fb6('0x8')],'XMF-HEADERINFO':_0x4457dd['headerinfo'],'XMF-MINRATE':_0x4457dd[_0x0fb6('0x9')],'XMF-MAXRATE':_0x4457dd[_0x0fb6('0xa')],'XMF-MODEM':util[_0x0fb6('0xb')](_0x0fb6('0xc'),_0x4457dd[_0x0fb6('0xd')]),'XMF-GATEWAY':_0x4457dd[_0x0fb6('0xe')],'XMF-FAXDETECT':_0x4457dd[_0x0fb6('0xf')],'XMF-T38TIMEOUT':_0x4457dd[_0x0fb6('0x10')],'XMF-LOCALSTATIONID':_0x4457dd[_0x0fb6('0x11')],'XMF-PATH':_0x3fa562[_0x0fb6('0x12')]};return _0x256fd9;};exports['variablesAction']=function(_0x443ffd,_0x10b8a8){return{'actionid':_0x443ffd[_0x0fb6('0x13')],'action':_0x0fb6('0x14'),'channel':_0x443ffd[_0x0fb6('0x15')],'Exten':_0x0fb6('0x16'),'Context':_0x0fb6('0x17'),'Priority':'1','callerid':util[_0x0fb6('0xb')](_0x0fb6('0x18'),_0x443ffd['headerinfo']?_0x443ffd[_0x0fb6('0x19')]:'',_0x443ffd[_0x0fb6('0x11')]),'variable':_0x10b8a8,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x443ffd['uniqueid']};};