10be007feb19e812a521568fecf20df9bcf29b45
[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 _0x01cf=['faxdetect','localstationid','path','variablesAction','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util','lodash','moment','../../../../config/logger','fax','message','logger','info','inspect','addVariables','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','gateway'];(function(_0x4b20c1,_0xa13194){var _0x11ac6e=function(_0x4218fc){while(--_0x4218fc){_0x4b20c1['push'](_0x4b20c1['shift']());}};_0x11ac6e(++_0xa13194);}(_0x01cf,0x141));var _0xf01c=function(_0x3197cc,_0x550679){_0x3197cc=_0x3197cc-0x0;var _0x19e2cd=_0x01cf[_0x3197cc];return _0x19e2cd;};'use strict';var util=require(_0xf01c('0x0'));var _=require(_0xf01c('0x1'));var moment=require(_0xf01c('0x2'));var logger=require(_0xf01c('0x3'))(_0xf01c('0x4'));exports[_0xf01c('0x5')]=function(_0x5d1054){return{'message':_0x5d1054};};exports[_0xf01c('0x6')]=function(_0x2a17e5,_0x459f50){logger[_0xf01c('0x7')](_0x2a17e5,util[_0xf01c('0x8')](_0x459f50,{'showHidden':![],'depth':null}));};exports[_0xf01c('0x9')]=function(_0x31cd5,_0x4c3b2c){var _0x168d1f={'XMF-ECM':_0x4c3b2c['ecm'],'XMF-HEADERINFO':_0x4c3b2c[_0xf01c('0xa')],'XMF-MINRATE':_0x4c3b2c[_0xf01c('0xb')],'XMF-MAXRATE':_0x4c3b2c[_0xf01c('0xc')],'XMF-MODEM':util[_0xf01c('0xd')](_0xf01c('0xe'),_0x4c3b2c[_0xf01c('0xf')]),'XMF-GATEWAY':_0x4c3b2c[_0xf01c('0x10')],'XMF-FAXDETECT':_0x4c3b2c[_0xf01c('0x11')],'XMF-T38TIMEOUT':_0x4c3b2c['t38timeout'],'XMF-LOCALSTATIONID':_0x4c3b2c[_0xf01c('0x12')],'XMF-PATH':_0x31cd5[_0xf01c('0x13')]};return _0x168d1f;};exports[_0xf01c('0x14')]=function(_0x4de9f7,_0x3f2918){return{'actionid':_0x4de9f7['uniqueid'],'action':_0xf01c('0x15'),'channel':_0x4de9f7[_0xf01c('0x16')],'Exten':_0xf01c('0x17'),'Context':_0xf01c('0x18'),'Priority':'1','callerid':util[_0xf01c('0xd')](_0xf01c('0x19'),_0x4de9f7[_0xf01c('0xa')]?_0x4de9f7[_0xf01c('0xa')]:'',_0x4de9f7['localstationid']),'variable':_0x3f2918,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x4de9f7['uniqueid']};};