b5810d99b15e5790b67cbb1b5c044cc54acb5931
[motion2.git] / server / config / seedUsers.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 _0xf00a=['wss','ulaw','yes','/etc/pki/tls/certs/motion.crt','actpass','\x22%s\x22\x20<%s>','User','bulkCreate','log','catch','push','%s%s','agent','format','%s%s@xcally.com','friend'];(function(_0x1e3c02,_0x5c07a2){var _0x4d26d7=function(_0x367ed9){while(--_0x367ed9){_0x1e3c02['push'](_0x1e3c02['shift']());}};_0x4d26d7(++_0x5c07a2);}(_0xf00a,0x19a));var _0xaf00=function(_0x4eeca4,_0x5901c9){_0x4eeca4=_0x4eeca4-0x0;var _0x430031=_0xf00a[_0x4eeca4];return _0x430031;};'use strict';var util=require('util');var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xaf00('0x0')]({'name':util['format'](_0xaf00('0x1'),_0xaf00('0x2'),i),'fullname':util[_0xaf00('0x3')](_0xaf00('0x1'),_0xaf00('0x2'),i),'email':util[_0xaf00('0x3')](_0xaf00('0x4'),'agent',i),'role':_0xaf00('0x2'),'password':'password','internal':0xfa0+i,'type':_0xaf00('0x5'),'transport':['udp','ws',_0xaf00('0x6')],'disallow':['all'],'allow':[_0xaf00('0x7')],'defaultuser':util[_0xaf00('0x3')](_0xaf00('0x1'),_0xaf00('0x2'),i),'encryption':'yes','avpf':_0xaf00('0x8'),'force_avp':_0xaf00('0x8'),'icesupport':'yes','dtlsenable':_0xaf00('0x8'),'dtlsverify':'no','dtlscertfile':_0xaf00('0x9'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':_0xaf00('0xa'),'callerid':util[_0xaf00('0x3')](_0xaf00('0xb'),util[_0xaf00('0x3')]('%s%s',_0xaf00('0x2'),i),0xfa0+i)});}db[_0xaf00('0xc')][_0xaf00('0xd')](users)['then'](function(){console[_0xaf00('0xe')]('add\x20user');})[_0xaf00('0xf')](function(_0x328245){console['log'](_0x328245);});