1bc52a98b6ece8fb7837e1f0209ca53566ec8ba2
[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 _0xf817=['bulkCreate','log','add\x20user','catch','../mysqldb','push','format','%s%s','agent','password','friend','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','actpass','\x22%s\x22\x20<%s>','User'];(function(_0x1c7137,_0x4c7c26){var _0xeb4432=function(_0x26d850){while(--_0x26d850){_0x1c7137['push'](_0x1c7137['shift']());}};_0xeb4432(++_0x4c7c26);}(_0xf817,0xee));var _0x7f81=function(_0x379fb4,_0x154b16){_0x379fb4=_0x379fb4-0x0;var _0x3442f2=_0xf817[_0x379fb4];return _0x3442f2;};'use strict';var util=require('util');var db=require(_0x7f81('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x7f81('0x1')]({'name':util[_0x7f81('0x2')](_0x7f81('0x3'),_0x7f81('0x4'),i),'fullname':util[_0x7f81('0x2')](_0x7f81('0x3'),'agent',i),'email':util['format']('%s%s@xcally.com',_0x7f81('0x4'),i),'role':_0x7f81('0x4'),'password':_0x7f81('0x5'),'internal':0xfa0+i,'type':_0x7f81('0x6'),'transport':['udp','ws','wss'],'disallow':[_0x7f81('0x7')],'allow':[_0x7f81('0x8')],'defaultuser':util[_0x7f81('0x2')](_0x7f81('0x3'),_0x7f81('0x4'),i),'encryption':_0x7f81('0x9'),'avpf':_0x7f81('0x9'),'force_avp':_0x7f81('0x9'),'icesupport':_0x7f81('0x9'),'dtlsenable':_0x7f81('0x9'),'dtlsverify':'no','dtlscertfile':_0x7f81('0xa'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':_0x7f81('0xb'),'callerid':util['format'](_0x7f81('0xc'),util[_0x7f81('0x2')](_0x7f81('0x3'),'agent',i),0xfa0+i)});}db[_0x7f81('0xd')][_0x7f81('0xe')](users)['then'](function(){console[_0x7f81('0xf')](_0x7f81('0x10'));})[_0x7f81('0x11')](function(_0x4bd8d4){console['log'](_0x4bd8d4);});