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