Built motion from commit c116dc8b.|2.6.30
[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 _0x6dc9=['variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','util','moment','../../../../config/logger','logger','inspect','addVariables','ecm','headerinfo','maxrate','format','modem','gateway','faxdetect','t38timeout','localstationid','path'];(function(_0x4da611,_0x2f4cec){var _0x37e7e6=function(_0x28873e){while(--_0x28873e){_0x4da611['push'](_0x4da611['shift']());}};_0x37e7e6(++_0x2f4cec);}(_0x6dc9,0xa0));var _0x96dc=function(_0x22c15a,_0x2d6084){_0x22c15a=_0x22c15a-0x0;var _0x1071ca=_0x6dc9[_0x22c15a];return _0x1071ca;};'use strict';var util=require(_0x96dc('0x0'));var _=require('lodash');var moment=require(_0x96dc('0x1'));var logger=require(_0x96dc('0x2'))('fax');exports['message']=function(_0x34210f){return{'message':_0x34210f};};exports[_0x96dc('0x3')]=function(_0x3f4988,_0x106e4a){logger['info'](_0x3f4988,util[_0x96dc('0x4')](_0x106e4a,{'showHidden':![],'depth':null}));};exports[_0x96dc('0x5')]=function(_0x181d3f,_0x5c7da0){var _0xf7a3e8={'XMF-ECM':_0x5c7da0[_0x96dc('0x6')],'XMF-HEADERINFO':_0x5c7da0[_0x96dc('0x7')],'XMF-MINRATE':_0x5c7da0['minrate'],'XMF-MAXRATE':_0x5c7da0[_0x96dc('0x8')],'XMF-MODEM':util[_0x96dc('0x9')]('\x22%s\x22',_0x5c7da0[_0x96dc('0xa')]),'XMF-GATEWAY':_0x5c7da0[_0x96dc('0xb')],'XMF-FAXDETECT':_0x5c7da0[_0x96dc('0xc')],'XMF-T38TIMEOUT':_0x5c7da0[_0x96dc('0xd')],'XMF-LOCALSTATIONID':_0x5c7da0[_0x96dc('0xe')],'XMF-PATH':_0x181d3f[_0x96dc('0xf')]};return _0xf7a3e8;};exports[_0x96dc('0x10')]=function(_0x4c41c3,_0x2d5e6a){return{'actionid':_0x4c41c3[_0x96dc('0x11')],'action':_0x96dc('0x12'),'channel':_0x4c41c3[_0x96dc('0x13')],'Exten':_0x96dc('0x14'),'Context':_0x96dc('0x15'),'Priority':'1','callerid':util[_0x96dc('0x9')]('\x22%s\x22\x20<%s>',_0x4c41c3[_0x96dc('0x7')]?_0x4c41c3[_0x96dc('0x7')]:'',_0x4c41c3['localstationid']),'variable':_0x2d5e6a,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x4c41c3['uniqueid']};};