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