Built motion from commit efa66e19.|2.6.22
[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 _0xf335=['maxrate','format','\x22%s\x22','faxdetect','t38timeout','localstationid','path','variablesAction','originate','channel','from-sip','\x22%s\x22\x20<%s>','headerinfo','uniqueid','util','moment','../../../../config/logger','fax','message','info','addVariables','ecm','minrate'];(function(_0x5f15c4,_0x3db215){var _0x28d1d2=function(_0x488f19){while(--_0x488f19){_0x5f15c4['push'](_0x5f15c4['shift']());}};_0x28d1d2(++_0x3db215);}(_0xf335,0x195));var _0x5f33=function(_0xc6a818,_0x2e0c14){_0xc6a818=_0xc6a818-0x0;var _0x57feef=_0xf335[_0xc6a818];return _0x57feef;};'use strict';var util=require(_0x5f33('0x0'));var _=require('lodash');var moment=require(_0x5f33('0x1'));var logger=require(_0x5f33('0x2'))(_0x5f33('0x3'));exports[_0x5f33('0x4')]=function(_0x6ba549){return{'message':_0x6ba549};};exports['logger']=function(_0x3e7cb7,_0x39b9de){logger[_0x5f33('0x5')](_0x3e7cb7,util['inspect'](_0x39b9de,{'showHidden':![],'depth':null}));};exports[_0x5f33('0x6')]=function(_0x487f43,_0xdccb27){var _0x7d0201={'XMF-ECM':_0xdccb27[_0x5f33('0x7')],'XMF-HEADERINFO':_0xdccb27['headerinfo'],'XMF-MINRATE':_0xdccb27[_0x5f33('0x8')],'XMF-MAXRATE':_0xdccb27[_0x5f33('0x9')],'XMF-MODEM':util[_0x5f33('0xa')](_0x5f33('0xb'),_0xdccb27['modem']),'XMF-GATEWAY':_0xdccb27['gateway'],'XMF-FAXDETECT':_0xdccb27[_0x5f33('0xc')],'XMF-T38TIMEOUT':_0xdccb27[_0x5f33('0xd')],'XMF-LOCALSTATIONID':_0xdccb27[_0x5f33('0xe')],'XMF-PATH':_0x487f43[_0x5f33('0xf')]};return _0x7d0201;};exports[_0x5f33('0x10')]=function(_0x36b202,_0x22029f){return{'actionid':_0x36b202['uniqueid'],'action':_0x5f33('0x11'),'channel':_0x36b202[_0x5f33('0x12')],'Exten':'xcally-motion-fax','Context':_0x5f33('0x13'),'Priority':'1','callerid':util[_0x5f33('0xa')](_0x5f33('0x14'),_0x36b202[_0x5f33('0x15')]?_0x36b202[_0x5f33('0x15')]:'',_0x36b202['localstationid']),'variable':_0x22029f,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x36b202[_0x5f33('0x16')]};};