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