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