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